From eb7366f400867d3f401fe60f06d848d6d1448457 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 17 十月 2022 17:41:56 +0800
Subject: [PATCH] 2022.10.17
---
pages/m_user/sceneauthentication/sceneauthentication.json | 2
service/authservice.js | 60 +++
pages/m_user/behaviors/b_login.js | 2
pages/m_user/companyauthentication/companyauthentication.js | 1
base/behaviors/b_inputCheck.js | 7
pages/m_user/base_c/c_company-info/c_company-info.js | 119 +++++
pages/m_user/userlogin/userlogin.wxss | 15
service/ledgerservice.js | 4
base/behaviors/b_upload.js | 1
component/uploader/uploader.js | 2
res/icons/icon6.png | 0
service/baserequest.js | 15
pages/m_user/p_about/p_about.json | 4
component/uploader/uploader.wxml | 2
pages/m_user/mine/mine.wxss | 30 +
base/behaviors/b_loadingToast.js | 15
pages/m_user/p_about/p_about.wxml | 25 +
pages/m_user/p_about/p_about.js | 60 +++
pages/m_ledger/ledgerupload/ledgerupload.js | 3
res/icons/scene_info.png | 0
pages/m_user/p_changepw/p_changepw.wxss | 6
pages/m_user/personalauthentication/personalauthentication.wxss | 77 ++++
pages/m_promise/promiseinfo/promiseinfo.js | 2
project.config.json | 2
res/icons/personal.png | 0
pages/m_user/companyauthentication/companyauthentication.wxml | 2
pages/home/home.js | 7
pages/m_user/userlogin/userlogin.js | 23 +
res/icons/app_icon.png | 0
app.wxss | 4
pages/m_user/base_c/c_company-info/c_company-info.wxml | 8
res/icons/icon3.png | 0
pages/m_user/userlogin/userlogin.wxml | 31 +
pages/m_user/p_changepw/p_changepw.json | 10
pages/m_ledger/behaviors/b_uploadLedger.js | 2
app.js | 5
pages/m_user/sceneauthentication/sceneauthentication.wxml | 2
component/gallery/gallery.wxml | 2
pages/m_user/companyauthentication/companyauthentication.json | 2
pages/m_user/base_c/c_scene-info/c_scene-info.js | 102 +++-
pages/m_learn/learn/learn.wxml | 6
pages/m_user/personalauthentication/personalauthentication.json | 10
pages/m_user/mine/mine.wxml | 29 +
data/sceneInfo.js | 61 +++
base/behaviors/b_loadingStatus.js | 16
pages/m_user/p_about/p_about.wxss | 45 ++
pages/m_user/p_changepw/p_changepw.js | 93 ++++
pages/m_user/p_changepw/p_changepw.wxml | 15
app.json | 5
pages/m_user/mine/mine.js | 23 +
pages/m_user/personalauthentication/personalauthentication.wxml | 42 ++
pages/m_user/base_c/c_scene-info/c_scene-info.wxml | 2
pages/m_user/personalauthentication/personalauthentication.js | 127 ++++++
service/userservice.js | 5
54 files changed, 1,020 insertions(+), 113 deletions(-)
diff --git a/app.js b/app.js
index 7011527..db53ec6 100644
--- a/app.js
+++ b/app.js
@@ -1,5 +1,6 @@
// app.js
import moment from './utils/moment.min'
+import $f from "./service/baserequest"
App({
onLaunch() {
@@ -20,7 +21,9 @@
perPage: 5,
userInfo: null,
accessToken: null,
- isLogin: false
+ isLogin: false,
+ version: '浣撻獙鐗� 1.0.0',
+ agreement: $f.baseFileUrl + '/agreement/涓皬寰紒涓氱敓鎬佺幆澧冨畧娉曟櫤鑳芥湇鍔″井淇″皬绋嬪簭鏈嶅姟鍗忚.docx'
},
// 鏅鸿兘鍜ㄨ缁撴灉绫诲瀷鏂囨湰杞崲
cosultTypeName: (typeId) => {
diff --git a/app.json b/app.json
index 8629d70..d4957c5 100644
--- a/app.json
+++ b/app.json
@@ -45,7 +45,10 @@
"pages/m_user/companyregister/companyregister",
"pages/m_user/companyauthentication/companyauthentication",
"pages/m_user/base_c/c_company-info/c_company-info",
- "pages/m_user/sceneauthentication/sceneauthentication"
+ "pages/m_user/sceneauthentication/sceneauthentication",
+ "pages/m_user/personalauthentication/personalauthentication",
+ "pages/m_user/p_about/p_about",
+ "pages/m_user/p_changepw/p_changepw"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/app.wxss b/app.wxss
index 25494ee..40ab536 100644
--- a/app.wxss
+++ b/app.wxss
@@ -3,8 +3,8 @@
page {
--fyui-primary-color: #59D5B3;
- --fyui-text-color_1: #191919;
- --fyui-text-color_2: #7F7F7F;
+ --fyui-text-color_1: #3a3a3a;
+ --fyui-text-color_2: #666666;
--fyui-text-color_3: #B2B2B2;
--fyui-BG_1: #F5F5F5;
--fyui-BG-COLOR-ACTIVE: #ececec5d;
diff --git a/pages/m_user/behaviors/b_inputCheck.js b/base/behaviors/b_inputCheck.js
similarity index 96%
rename from pages/m_user/behaviors/b_inputCheck.js
rename to base/behaviors/b_inputCheck.js
index db93e12..2697fde 100644
--- a/pages/m_user/behaviors/b_inputCheck.js
+++ b/base/behaviors/b_inputCheck.js
@@ -26,12 +26,13 @@
index,
mode
} = e.currentTarget.dataset
- let i = e.detail.value.concat(e.detail.code)
if (mode == 'region') {
+ const i = e.detail.value.concat(e.detail.code)
this.setData({
[`msg[${index}].value`]: i
})
} else if (mode == 'selector') {
+ const i = e.detail.value
this.setData({
[`msg[${index}].selectIndex`]: i,
[`msg[${index}].value`]: this.data.msg[index].options[i].value
@@ -177,13 +178,13 @@
let msg = this.data.msg
if (msg) {
- let info = {}
+ const info = this.data.info
msg.forEach(m => {
info[m.id] = m.value
});
this.setData({info})
this.triggerEvent('onSubmit', info)
- this.submit()
+ if (typeof this._submit === 'function') this._submit()
}
},
}
diff --git a/base/behaviors/b_loadingStatus.js b/base/behaviors/b_loadingStatus.js
index ebbd92d..ec08a60 100644
--- a/base/behaviors/b_loadingStatus.js
+++ b/base/behaviors/b_loadingStatus.js
@@ -9,17 +9,29 @@
perPage: 10,
totalCount: 0,
loading: false,
- needLoadMore: false
+ needLoadMore: false,
+ timeout: false
},
+ timeoutId: '',
+ lastLoading: false,
observers: {
'loading': function (loading) {
+ if (this.lastLoading == loading) return
if (loading) {
+ clearTimeout(this.timeoutId)
this._loadStart()
this._loading()
- setTimeout(() => { this.setData({loading: false}) }, 20000);
+ this.timeoutId = setTimeout(() => {
+ this.setData({
+ loading: false,
+ timeout: true
+ })
+ }, 10000);
} else {
+ clearTimeout(this.timeoutId)
this._loadComplete()
}
+ this.lastLoading = loading
},
'cPage, tPage': function (cPage, tPage) {
this.setData({
diff --git a/base/behaviors/b_loadingToast.js b/base/behaviors/b_loadingToast.js
index 25e45ca..13e60b0 100644
--- a/base/behaviors/b_loadingToast.js
+++ b/base/behaviors/b_loadingToast.js
@@ -1,5 +1,3 @@
-const { clearTimeout } = require("timers");
-
/**
* 鏁版嵁鍔犺浇寮圭獥
* 鏍规嵁鍔犺浇鐘舵�侊紝灞曠ず瀵瑰簲鐨勫脊绐�
@@ -8,20 +6,16 @@
module.exports = Behavior({
data: {
loadingText: '鍔犺浇涓�',
- loadCompleteText: '鍔犺浇瀹屾垚'
+ loadCompleteText: '鍔犺浇瀹屾垚',
+ timeoutText: '鍔犺浇瓒呮椂'
},
- timeoutId: '',
methods: {
// 鍔犺浇寮�濮媡oast
loadStart() {
- clearTimeout(this.timeoutId)
wx.showLoading({
title: this.data.loadingText,
mask: true,
})
- this.timeoutId = setTimeout(() => {
- wx.hideLoading()
- }, 20000);
},
// 鍔犺浇涓璽oast
loading() {
@@ -29,13 +23,12 @@
},
// 鍔犺浇瀹屾垚toast
loadComplete() {
- clearTimeout(this.timeoutId)
wx.hideLoading({
success: (res) => {
wx.showToast({
- title: this.data.loadCompleteText,
+ title: this.data.timeout ? this.data.timeoutText : this.data.loadCompleteText,
duration: 1000,
- icon: 'success',
+ icon: this.data.timeout ? 'error' : 'success',
mask: true,
})
},
diff --git a/base/behaviors/b_upload.js b/base/behaviors/b_upload.js
index 85f3e61..24957a8 100644
--- a/base/behaviors/b_upload.js
+++ b/base/behaviors/b_upload.js
@@ -18,7 +18,6 @@
this.setData({
imgFiles: data
})
- console.log(imgFiles);
},
/**
* 鐩戝惉鍥剧墖鍒犻櫎鍔ㄤ綔
diff --git a/component/gallery/gallery.wxml b/component/gallery/gallery.wxml
index c2b2086..9a31a4c 100644
--- a/component/gallery/gallery.wxml
+++ b/component/gallery/gallery.wxml
@@ -8,6 +8,6 @@
</block>
</swiper>
<view class="weui-gallery__opr" wx:if="{{showDelete}}">
- <navigator bindtap="deleteImg" class="weui-gallery__del">鍒犻櫎</navigator>
+ <view bindtap="deleteImg" class="weui-gallery__del">鍒犻櫎</view>
</view>
</view>
diff --git a/component/uploader/uploader.js b/component/uploader/uploader.js
index 21e9e1a..889eea3 100644
--- a/component/uploader/uploader.js
+++ b/component/uploader/uploader.js
@@ -327,7 +327,7 @@
src:files[0].url,
quality:20,
success(data){
- console.log(data)
+ console.log('compressImage', data)
},
fail(){
diff --git a/component/uploader/uploader.wxml b/component/uploader/uploader.wxml
index d0a2874..c51dab3 100644
--- a/component/uploader/uploader.wxml
+++ b/component/uploader/uploader.wxml
@@ -25,7 +25,7 @@
</view>
</view>
<view wx:else class="weui-uploader__file" data-index="{{index}}" bindtap="previewImage">
- <image class="weui-uploader__img" src="{{item.url}}" mode="aspectFit" />
+ <image class="weui-uploader__img" src="{{item.url}}" mode="aspectFill" />
</view>
</block>
</view>
diff --git a/data/sceneInfo.js b/data/sceneInfo.js
index 4d8a3b2..eaa8633 100644
--- a/data/sceneInfo.js
+++ b/data/sceneInfo.js
@@ -15,6 +15,7 @@
input: true,
value: '',
noValue: false,
+ required: false
},
{
name: "缁忚惀鑿滅郴",
@@ -102,7 +103,7 @@
},
{
name: "鑱旂郴浜�",
- id: "biContract",
+ id: "biContact",
input: true,
value: '',
noValue: false,
@@ -391,4 +392,60 @@
return map
}
-export default sceneInfo
\ No newline at end of file
+/**
+ * 鍦烘櫙娉ㄥ唽鏃讹紝闇�瑕佹彁浜ょ殑鍙拌处绫诲瀷
+ * 鍚庣画闇�瑕佽皟鏁翠负鎺ュ彛鑾峰彇鍔ㄦ�佷俊鎭�
+ */
+const sceneLedger = {
+ '1': {
+ ledgerSubTypeId: 2101,
+ ledgerName: '椋熷搧缁忚惀璁稿彲璇�',
+ sceneType: 1
+ }
+}
+
+/**
+ * 浼佷笟娉ㄥ唽鏃讹紝闇�瑕佹彁浜ょ殑鍙拌处绫诲瀷
+ * 鍚庣画闇�瑕佽皟鏁翠负鎺ュ彛鑾峰彇鍔ㄦ�佷俊鎭�
+ */
+const companyLedger = {
+ '1': {
+ ledgerSubTypeId: 2100,
+ ledgerName: '钀ヤ笟鎵х収',
+ sceneType: 1
+ },
+ '2': {
+ ledgerSubTypeId: 500,
+ ledgerName: '浼佷笟淇℃伅',
+ sceneType: 2
+ },
+ '3': {
+ ledgerSubTypeId: 900,
+ ledgerName: '浼佷笟淇℃伅',
+ sceneType: 3
+ },
+ '4': {
+ ledgerSubTypeId: 1300,
+ ledgerName: '浼佷笟淇℃伅',
+ sceneType: 4
+ },
+ '5': {
+ ledgerSubTypeId: 1700,
+ ledgerName: '浼佷笟淇℃伅',
+ sceneType: 5
+ },
+ '6': {
+ ledgerSubTypeId: 100,
+ ledgerName: '浼佷笟淇℃伅',
+ sceneType: 6
+ },
+ '7': {
+ ledgerSubTypeId: 2500,
+ ledgerName: '钀ヤ笟鎵х収',
+ sceneType: 7
+ },
+}
+
+module.exports = {
+ sceneInfo, sceneLedger, companyLedger
+}
\ No newline at end of file
diff --git a/pages/home/home.js b/pages/home/home.js
index af065cf..09bf701 100644
--- a/pages/home/home.js
+++ b/pages/home/home.js
@@ -55,6 +55,13 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad: function (options) {
+ //鍒ゆ柇鐢ㄦ埛鏄惁涓洪娆$櫥褰曪紝鍐冲畾鏄惁寮哄埗淇敼榛樿瀵嗙爜
+ if (app.globalData.userInfo.remark == null || app.globalData.userInfo.remark == '') {
+ wx.navigateTo({
+ url: '/pages/m_user/p_changepw/p_changepw',
+ })
+ }
+
wx.getStorage({
key: 'accessToken',
success: (result) => {
diff --git a/pages/m_learn/learn/learn.wxml b/pages/m_learn/learn/learn.wxml
index 448fdcd..b0d37e6 100644
--- a/pages/m_learn/learn/learn.wxml
+++ b/pages/m_learn/learn/learn.wxml
@@ -36,7 +36,7 @@
<image src="/res/icons/learn_1.png" class="image-btn__2" mode="aspectFit" />
<view class="image-btn_title">
<view class="image-btn_title_t">瀹堟硶瑙嗛</view>
- <view>瀹堟硶鍩硅鏉愭枡</view>
+ <view>瀹堟硶鍩硅瑙嗛</view>
<mp-icon class="image-btn_goto" icon="arrow" color="#7F7F7F" size="8" type="filled"></mp-icon>
</view>
@@ -45,8 +45,8 @@
<view class="image-btn" style="background-color: #F4EED3;" bindtap="goto" data-index="1">
<image src="/res/icons/learn_2.png" class="image-btn__2" mode="aspectFit" />
<view class="image-btn_title">
- <view class="image-btn_title_t">鎵ф硶妗堜緥</view>
- <view>鎵ф硶鐫e療妗堜緥</view>
+ <view class="image-btn_title_t">杩濇硶妗堜緥</view>
+ <view>鍏稿瀷杩濇硶妗堜緥</view>
<mp-icon class="image-btn_goto" icon="arrow" color="#7F7F7F" size="8" type="filled"></mp-icon>
</view>
</view>
diff --git a/pages/m_ledger/behaviors/b_uploadLedger.js b/pages/m_ledger/behaviors/b_uploadLedger.js
index 3c2df1e..d7b4a60 100644
--- a/pages/m_ledger/behaviors/b_uploadLedger.js
+++ b/pages/m_ledger/behaviors/b_uploadLedger.js
@@ -28,7 +28,7 @@
this.setData({loading: true})
ledgerservice.uploadLedger(app.globalData.accessToken.userId, ledger, path, {
success (res) {
- this.setData({loading: false})
+ that.setData({loading: false})
if (typeof that._success === 'function') {
that._success(res)
}
diff --git a/pages/m_ledger/ledgerupload/ledgerupload.js b/pages/m_ledger/ledgerupload/ledgerupload.js
index e3ce8ec..3ee34f4 100644
--- a/pages/m_ledger/ledgerupload/ledgerupload.js
+++ b/pages/m_ledger/ledgerupload/ledgerupload.js
@@ -84,6 +84,7 @@
}
},
+ //鎻愪氦鍙拌处
submitLedger() {
this.setData({
showDialog: false,
@@ -91,6 +92,7 @@
this._uploadLedger()
},
+ //鍙拌处鎻愪氦鎴愬姛鍚�
_success(res) {
this.getOpenerEventChannel().emit('uploadOver', {
indexGroup: that.data.indexGroup
@@ -100,6 +102,7 @@
})
},
+ //鍥剧墖鏀惧ぇ棰勮
previewImage(e) {
const {
index
diff --git a/pages/m_promise/promiseinfo/promiseinfo.js b/pages/m_promise/promiseinfo/promiseinfo.js
index 113a3ee..1b72d34 100644
--- a/pages/m_promise/promiseinfo/promiseinfo.js
+++ b/pages/m_promise/promiseinfo/promiseinfo.js
@@ -181,7 +181,7 @@
msg
})
}
- })
+ }, app.globalData.accessToken.openId)
},
onSubmit: function () {
diff --git a/pages/m_user/base_c/c_company-info/c_company-info.js b/pages/m_user/base_c/c_company-info/c_company-info.js
index ef96e39..7788910 100644
--- a/pages/m_user/base_c/c_company-info/c_company-info.js
+++ b/pages/m_user/base_c/c_company-info/c_company-info.js
@@ -1,6 +1,16 @@
// pages/m_user/base_c/c_company-info/c_company-info.js
+import {companyLedger} from '../../../../data/sceneInfo'
+import userservice from '../../../../service/userservice'
+import authservice from '../../../../service/authservice'
+import ledgerservice from "../../../../service/ledgerservice"
+import b_inputCheck from '../../../../base/behaviors/b_inputCheck'
+import b_uploadLedger from '../../../m_ledger/behaviors/b_uploadLedger'
+import b_loadingToast from '../../../../base/behaviors/b_loadingToast'
+
+const app = getApp()
Component({
+ behaviors: [b_inputCheck, b_uploadLedger, b_loadingToast],
options: {
addGlobalClass: true,
},
@@ -11,6 +21,10 @@
submitText: {
type: String,
value: '鎻愪氦'
+ },
+ sceneType: {
+ type: String,
+ value: '1'
},
},
/**
@@ -29,47 +43,59 @@
sceneTypeIndex: 0,
msg: [{
name: "浼佷笟鍚嶇О",
- id: "department",
+ id: "ciName",
input: true,
value: '',
noValue: false,
},
{
name: "浼佷笟鍦板潃",
- id: "address",
+ id: "ciAddress",
input: true,
value: '',
noValue: false,
},
{
name: "淇$敤浠g爜",
- id: "code",
+ id: "ciOrgCode",
input: true,
value: "",
noValue: false,
},
{
name: "娉曚汉",
- id: "contract",
+ id: "ciJuridicalPerson",
input: true,
value: '',
noValue: false,
},
{
name: "鑱旂郴浜�",
- id: "contract",
+ id: "ciContactName",
input: true,
value: '',
noValue: false,
},
{
name: "鑱旂郴鏂瑰紡",
- id: "contract",
+ id: "ciTelephone",
input: true,
value: '',
noValue: false,
},
],
+ },
+
+ ready() {
+ this.setData({
+ loadingText: '涓婁紶涓�',
+ loadCompleteText: '涓婁紶瀹屾垚'
+ })
+
+ this.setData({
+ ledger: companyLedger[this.data.sceneType]
+ })
+ this.getCompanyInfo()
},
/**
@@ -83,6 +109,87 @@
})
},
+ //鑾峰彇浼佷笟淇℃伅
+ getCompanyInfo() {
+ var that = this
+ userservice.getBaseInfo(app.globalData.accessToken.userId, {
+ success(data) {
+ const msg = that.data.msg
+ if (data.company != null) {
+ const info = data.company
+ msg[0].value = info.ciName
+ msg[1].value = info.ciAddress
+ msg[2].value = info.ciOrgCode
+ msg[3].value = info.ciJuridicalPerson
+ msg[4].value = info.ciContactName
+ msg[5].value = info.ciTelephone
+ that.setData({
+ msg, info
+ })
+ }
+ }
+ }, app.globalData.accessToken.openId)
+ ledgerservice.getLedgerDetail(
+ app.globalData.accessToken.userId, that.data.ledger.ledgerSubTypeId, that.data.ledger.sceneType, undefined, {
+ success(res) {
+ if (res.length > 0) {
+ let detail = res[0]
+ if (detail.upLoad) {
+ let imgFiles = [{
+ url: detail.path1[0],
+ loading: false
+ }]
+ that.setData({
+ imgFiles
+ })
+ }
+ }
+ }
+ })
+ },
+
+ //鎻愪氦浼佷笟淇℃伅
+ _submit() {
+ var that = this
+ this.setData({loading: true})
+ authservice.authCompany(app.globalData.accessToken.openId, this.data.info, {
+ success(res) {
+ that.submintLedger()
+ },
+ })
+ },
+
+ //鎻愪氦鍥剧墖淇℃伅
+ submintLedger() {
+ if (this.data.imgFiles.length == 0) {
+ this.setData({
+ loading: false
+ })
+ wx.navigateBack({
+ delta: 1,
+ })
+ return
+ }
+ if (this.data.imgFiles[0].url.indexOf('http') != -1) {
+ wx.downloadFile({
+ url: this.data.imgFiles[0].url,
+ success: (res) => {
+ const imgPath = res.tempFilePath
+ this.data.imgFiles[0].url = imgPath
+ this._uploadLedger()
+ }
+ })
+ } else {
+ this._uploadLedger()
+ }
+ },
+
+ //涓婁紶瀹屾垚鍚庯紝鍥為��
+ _success(res) {
+ wx.navigateBack({
+ delta: 1,
+ })
+ }
}
})
\ No newline at end of file
diff --git a/pages/m_user/base_c/c_company-info/c_company-info.wxml b/pages/m_user/base_c/c_company-info/c_company-info.wxml
index b0c01a4..fe94b59 100644
--- a/pages/m_user/base_c/c_company-info/c_company-info.wxml
+++ b/pages/m_user/base_c/c_company-info/c_company-info.wxml
@@ -1,15 +1,17 @@
<!--pages/m_user/base_c/c_company-info/c_company-info.wxml-->
<view class="page__bd">
- <view class="top-card">
+ <!-- <view class="top-card">
<view class="tag"><text style="color: transparent;">*</text>浼佷笟绫诲瀷</view>
<picker mode="selector" bindchange="changeSceneType" value="{{sceneTypeIndex}}" range="{{sceneTypes}}" range-key="name" class="value">
<view class="picker-text">{{sceneTypes[sceneTypeIndex].name}}</view>
</picker>
<mp-icon icon="arrow" color="#59D5B3" size="{{10}}"></mp-icon>
- </view>
+ </view> -->
+ <mp-toptips type="error" msg="{{errorMsg}}" show="{{errorMsg}}" delay="2000"></mp-toptips>
+
<view class="items">
<mp-cells>
- <input-cell wx:for="{{msg}}" wx:key="id" item="{{item}}" bindpassValue="changeMsg"></input-cell>
+ <input-cell id="{{item.id}}" wx:for="{{msg}}" wx:key="index" item="{{item}}" bindpassValue="changeMsg"></input-cell>
</mp-cells>
</view>
<view class="weui-upload-view">
diff --git a/pages/m_user/base_c/c_scene-info/c_scene-info.js b/pages/m_user/base_c/c_scene-info/c_scene-info.js
index 402c046..a9bf9c5 100644
--- a/pages/m_user/base_c/c_scene-info/c_scene-info.js
+++ b/pages/m_user/base_c/c_scene-info/c_scene-info.js
@@ -1,8 +1,9 @@
// pages/m_user/base_c/c_scene-info/c_scene-info.js
-import sceneInfo from '../../../../data/sceneInfo'
+import {sceneInfo, sceneLedger} from '../../../../data/sceneInfo'
import userservice from '../../../../service/userservice'
import deviceservice from '../../../../service/deviceservice'
-import b_inputCheck from '../../behaviors/b_inputCheck'
+import ledgerservice from "../../../../service/ledgerservice"
+import b_inputCheck from '../../../../base/behaviors/b_inputCheck'
import b_uploadLedger from '../../../m_ledger/behaviors/b_uploadLedger'
import b_loadingToast from '../../../../base/behaviors/b_loadingToast'
@@ -31,29 +32,18 @@
}
},
- attached() {
+ ready() {
this.setData({
loadingText: '涓婁紶涓�',
loadCompleteText: '涓婁紶瀹屾垚'
})
- },
-
- pageLifetimes: {
- show: function () {
- // 椤甸潰琚睍绀�
- const info = sceneInfo()
- this.setData({
- msg: info.get(this.data.sceneType)
- })
- //鑾峰彇鍦烘櫙淇℃伅
- this.getSceneInfo()
- },
- hide: function () {
- // 椤甸潰琚殣钘�
- },
- resize: function (size) {
- // 椤甸潰灏哄鍙樺寲
- }
+ const info = sceneInfo()
+ this.setData({
+ msg: info.get(this.data.sceneType),
+ ledger: sceneLedger[this.data.sceneType]
+ })
+ //鑾峰彇鍦烘櫙淇℃伅
+ this.getSceneInfo()
},
/**
@@ -82,14 +72,12 @@
msg[3].value = data.baseInfo.biAddress
msg[10].value = data.baseInfo.biContact
msg[11].value = data.baseInfo.biTelephone
- msg[12].value = data.baseInfo.biTownName == null ? [] :
- [
- data.baseInfo.biProvinceName, data.baseInfo.biCityName, data.baseInfo.biDistrictName, data.baseInfo.biTownName,
- data.baseInfo.biProvinceCode, data.baseInfo.biCityCode, data.baseInfo.biDistrictCode, data.baseInfo.biTownCode,
+ msg[12].value = data.baseInfo.biTownName == null ? [] : [
+ data.baseInfo.biProvinceName, data.baseInfo.biCityName, data.baseInfo.biDistrictName, data.baseInfo.biTownName,
+ data.baseInfo.biProvinceCode, data.baseInfo.biCityCode, data.baseInfo.biDistrictCode, data.baseInfo.biTownCode,
]
- msg[12].displayValue = data.baseInfo.biTownName == null ? [] :
- [
- data.baseInfo.biProvinceName, data.baseInfo.biCityName, data.baseInfo.biDistrictName, data.baseInfo.biTownName,
+ msg[12].displayValue = data.baseInfo.biTownName == null ? [] : [
+ data.baseInfo.biProvinceName, data.baseInfo.biCityName, data.baseInfo.biDistrictName, data.baseInfo.biTownName,
]
}
if (data.specialInfo != null) {
@@ -103,7 +91,7 @@
if (v == o.name) {
o.checked = true
break
- }else if (o.hasRemark) {
+ } else if (o.hasRemark) {
o.checked = true
o.remark += v
}
@@ -137,7 +125,7 @@
if (v == o.name) {
o.checked = true
break
- }else if (o.hasRemark) {
+ } else if (o.hasRemark) {
o.checked = true
o.remark += v
}
@@ -166,6 +154,23 @@
}
}
})
+ ledgerservice.getLedgerDetail(
+ app.globalData.accessToken.userId, that.data.ledger.ledgerSubTypeId, that.data.ledger.sceneType, undefined, {
+ success(res) {
+ if (res.length > 0) {
+ let detail = res[0]
+ if (detail.upLoad) {
+ let imgFiles = [{
+ url: detail.path1[0],
+ loading: false
+ }]
+ that.setData({
+ imgFiles
+ })
+ }
+ }
+ }
+ })
break;
case '2':
@@ -193,13 +198,15 @@
msg
})
}
- })
+ }, app.globalData.accessToken.openId)
},
//鎻愪氦鍦烘櫙淇℃伅
- submit() {
+ _submit() {
var that = this
- this.setData({loading: true})
+ this.setData({
+ loading: true
+ })
//閽堝涓嶅悓鍦烘櫙锛屾暟鎹粨鏋勪細鏈変笉鍚岀殑瀹氬埗闇�姹�
switch (this.data.sceneType) {
case '1':
@@ -227,7 +234,34 @@
//鎻愪氦鍥剧墖淇℃伅
submintLedger() {
- this._uploadLedger()
+ if (this.data.imgFiles.length == 0) {
+ this.setData({
+ loading: false
+ })
+ wx.navigateBack({
+ delta: 1,
+ })
+ return
+ }
+ if (this.data.imgFiles[0].url.indexOf('http') != -1) {
+ wx.downloadFile({
+ url: this.data.imgFiles[0].url,
+ success: (res) => {
+ const imgPath = res.tempFilePath
+ this.data.imgFiles[0].url = imgPath
+ this._uploadLedger()
+ }
+ })
+ } else {
+ this._uploadLedger()
+ }
+ },
+
+ //涓婁紶瀹屾垚鍚庯紝鍥為��
+ _success(res) {
+ wx.navigateBack({
+ delta: 1,
+ })
}
}
})
\ No newline at end of file
diff --git a/pages/m_user/base_c/c_scene-info/c_scene-info.wxml b/pages/m_user/base_c/c_scene-info/c_scene-info.wxml
index 08ed0a7..47d1781 100644
--- a/pages/m_user/base_c/c_scene-info/c_scene-info.wxml
+++ b/pages/m_user/base_c/c_scene-info/c_scene-info.wxml
@@ -22,7 +22,7 @@
<picker wx:if="{{item.pickerMode == 'selector'}}" mode="selector" bindchange="pickerChange" data-index="{{index}}" data-mode="selector" value="{{item.selectIndex}}" range="{{item.options}}" range-key="name" class="value">
<view class="picker-text">{{item.options[item.selectIndex].name}}</view>
</picker>
- <picker wx:elif="{{item.pickerMode == 'region'}}" mode="region" bindchange="pickerChange" data-index="{{index}}" data-mode="region" value="{{item.displayValue}}" class="value" level="sub-district" custom-item="绌�">
+ <picker wx:elif="{{item.pickerMode == 'region'}}" mode="region" bindchange="pickerChange" data-index="{{index}}" data-mode="region" value="{{item.displayValue}}" class="value" level="sub-district">
<view class="picker-text" wx:if="{{item.value.length > 0}}">{{item.value[0] + (item.value[1] == item.value[0] ? '' : item.value[1]) + item.value[2] + item.value[3]}}</view>
<view wx:else class="picker-text" style="color: #B2B2B2;">璇烽�夋嫨琛楅晣</view>
</picker>
diff --git a/pages/m_user/behaviors/b_login.js b/pages/m_user/behaviors/b_login.js
index b6b0335..6bd86ca 100644
--- a/pages/m_user/behaviors/b_login.js
+++ b/pages/m_user/behaviors/b_login.js
@@ -63,7 +63,7 @@
that.gotoHomePage()
}
})
-
+
} else {
that._onLoginFail()
}
diff --git a/pages/m_user/companyauthentication/companyauthentication.js b/pages/m_user/companyauthentication/companyauthentication.js
index d7503f5..a12d1e3 100644
--- a/pages/m_user/companyauthentication/companyauthentication.js
+++ b/pages/m_user/companyauthentication/companyauthentication.js
@@ -1,5 +1,4 @@
// pages/m_user/companyauthentication/companyauthentication.js
-import $f from '../../../service/baserequest'
Page({
diff --git a/pages/m_user/companyauthentication/companyauthentication.json b/pages/m_user/companyauthentication/companyauthentication.json
index 3e7e803..d9b7455 100644
--- a/pages/m_user/companyauthentication/companyauthentication.json
+++ b/pages/m_user/companyauthentication/companyauthentication.json
@@ -1,5 +1,5 @@
{
- "navigationBarTitleText": "浼佷笟璁よ瘉",
+ "navigationBarTitleText": "浼佷笟淇℃伅璁よ瘉",
"usingComponents": {
"c-company-info": "../base_c/c_company-info/c_company-info"
}
diff --git a/pages/m_user/companyauthentication/companyauthentication.wxml b/pages/m_user/companyauthentication/companyauthentication.wxml
index 5340b3e..3d88020 100644
--- a/pages/m_user/companyauthentication/companyauthentication.wxml
+++ b/pages/m_user/companyauthentication/companyauthentication.wxml
@@ -1,6 +1,6 @@
<!--pages/m_user/companyauthentication/companyauthentication.wxml-->
<view class="page">
<image class="banner-bg" src="/res/icons/companyinfo-1.png" mode="widthFix"></image>
- <view class="tips">璇蜂粩缁嗘鏌ョ郴缁熼鐣欑殑浼佷笟淇℃伅锛岀‘璁ゆ槸鍚︽纭紝璋冩暣瀹屾垚鍚庢彁浜ゅ畬鎴愪紒涓氳璇�</view>
+ <view class="tips">璇蜂粩缁嗘鏌ヤ互涓嬩俊鎭紝纭鏄惁姝g‘锛岃皟鏁村畬鎴愬悗鎻愪氦瀹屾垚璁よ瘉锛堝叾涓甫*鐨勪负蹇呭~椤癸紝鍏朵綑涓洪�夊~椤癸級</view>
<c-company-info></c-company-info>
</view>
diff --git a/pages/m_user/mine/mine.js b/pages/m_user/mine/mine.js
index 8f30e7f..372e5c7 100644
--- a/pages/m_user/mine/mine.js
+++ b/pages/m_user/mine/mine.js
@@ -9,6 +9,7 @@
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
+ version: app.globalData.version,
//璁よ瘉鐘舵�侊紝[浼佷笟, 鍦烘櫙, 涓汉]
authStatus:[]
},
@@ -20,6 +21,10 @@
this.setData({
userRealName: app.globalData.userInfo.realname
})
+ this.getBaseInfo()
+ },
+
+ onShow() {
this.getAuthStatus()
},
@@ -41,6 +46,19 @@
}
}
})
+ },
+
+ getBaseInfo() {
+ var that = this
+ userservice.getBaseInfo(app.globalData.accessToken.userId, {
+ success(data) {
+ if (data.company != null) {
+ that.setData({
+ companyName: data.company.ciName
+ })
+ }
+ }
+ }, app.globalData.accessToken.openId)
},
logout() {
@@ -70,6 +88,9 @@
break;
case "5":
url = "/pages/m_service/p_schedule/p_schedule"
+ break;
+ case "6":
+ url = "/pages/m_user/p_about/p_about"
break;
}
if (url != "") {
@@ -103,7 +124,7 @@
break;
//涓汉璁よ瘉
case "2":
- url = ""
+ url = "/pages/m_user/personalauthentication/personalauthentication"
break;
}
if (url != "") {
diff --git a/pages/m_user/mine/mine.wxml b/pages/m_user/mine/mine.wxml
index 7358e45..fe965cd 100644
--- a/pages/m_user/mine/mine.wxml
+++ b/pages/m_user/mine/mine.wxml
@@ -5,27 +5,29 @@
<image class="user-icon" src="/res/icons/learn_2.png" mode="aspectFill"></image>
<view class="flex-v">
<view class="user-name">{{userRealName}}</view>
- <view class="user-tag">
- <!-- <view>浼佷笟鏈璇�</view>
- <view>搴楅摵鏈璇�</view>
- <view>涓汉鏈璇�</view> -->
- </view>
+ <view class="user-tag">{{companyName}}</view>
</view>
</view>
</view>
<view class="page__bd">
<view class="fyui-panel user-authentication">
<view bindtap="gotoAuthentication" data-index="0">
+ <text class="{{authStatus[0] ? 'status-1' : 'status-2'}}">{{authStatus[0] ? '宸茶璇�' : '鏈璇�'}}</text>
<image src="/res/icons/icon3.png"></image>
- <view>{{authStatus[0] ? '淇敼浼佷笟淇℃伅' : '浼佷笟淇℃伅璁よ瘉'}}</view>
+ <!-- <view>{{authStatus[0] ? '淇敼浼佷笟淇℃伅' : '浼佷笟淇℃伅璁よ瘉'}}</view> -->
+ <view>浼佷笟淇℃伅璁よ瘉</view>
</view>
<view bindtap="gotoAuthentication" data-index="1">
- <image src="/res/icons/icon3.png"></image>
- <view>{{authStatus[1] ? '淇敼搴楅摵淇℃伅' : '搴楅摵淇℃伅璁よ瘉'}}</view>
+ <text class="{{authStatus[1] ? 'status-1' : 'status-2'}}">{{authStatus[1] ? '宸茶璇�' : '鏈璇�'}}</text>
+ <image src="/res/icons/scene_info.png"></image>
+ <!-- <view>{{authStatus[1] ? '淇敼搴楅摵淇℃伅' : '搴楅摵淇℃伅璁よ瘉'}}</view> -->
+ <view>搴楅摵淇℃伅璁よ瘉</view>
</view>
<view bindtap="gotoAuthentication" data-index="2">
- <image src="/res/icons/icon3.png"></image>
- <view>{{authStatus[2] ? '淇敼涓汉淇℃伅' : '涓汉淇℃伅璁よ瘉'}}</view>
+ <text class="{{authStatus[2] ? 'status-1' : 'status-2'}}">{{authStatus[2] ? '宸茶璇�' : '鏈璇�'}}</text>
+ <image src="/res/icons/personal.png"></image>
+ <!-- <view>{{authStatus[2] ? '淇敼涓汉淇℃伅' : '涓汉淇℃伅璁よ瘉'}}</view> -->
+ <view>涓汉淇℃伅璁よ瘉</view>
</view>
</view>
<view class="fyui-panel">
@@ -71,6 +73,13 @@
<view class="fyui-cell__bd">鐜繚鏃ョ▼</view>
<view class="fyui-cell__ft"></view>
</view>
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="6">
+ <view class="fyui-cell__hd">
+ <image src="/res/icons/icon6.png" class="icon" />
+ </view>
+ <view class="fyui-cell__bd">鍏充簬</view>
+ <view class="fyui-cell__ft">{{version}}</view>
+ </view>
</view>
</view>
diff --git a/pages/m_user/mine/mine.wxss b/pages/m_user/mine/mine.wxss
index a8668fd..c6d237d 100644
--- a/pages/m_user/mine/mine.wxss
+++ b/pages/m_user/mine/mine.wxss
@@ -53,18 +53,44 @@
}
.user-authentication {
+ position: relative;
display: flex;
justify-content: space-between;
}
.user-authentication>view {
+ position: relative;
text-align: center;
- padding: 36px 16px;
+ padding: 20px 16px;
font-size: 14px;
- color: var(--fyui-text-color_1);
+ color: var(--fyui-text-color_2);
}
.user-authentication>view>image {
width: 40px;
height: 40px;
+}
+
+.user-authentication .status-1{
+ position: absolute;
+ top: 36px;
+ right: 10px;
+ font-size: 10px;
+ color: white;
+ background-color: #05EDC4;
+ border: white 2px solid;
+ padding: 0 4px;
+ border-radius: 4px;
+}
+
+.user-authentication .status-2{
+ position: absolute;
+ top: 36px;
+ right: 10px;
+ font-size: 10px;
+ color: white;
+ background-color: #F20202;
+ border: white 2px solid;
+ padding: 0 4px;
+ border-radius: 4px;
}
\ No newline at end of file
diff --git a/pages/m_user/p_about/p_about.js b/pages/m_user/p_about/p_about.js
new file mode 100644
index 0000000..71b5867
--- /dev/null
+++ b/pages/m_user/p_about/p_about.js
@@ -0,0 +1,60 @@
+// pages/m_user/p_about/p_about.js
+const app = getApp()
+
+Page({
+
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ version: app.globalData.version,
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+
+ },
+
+ goto(e) {
+ var url = ""
+ var index = e.currentTarget.dataset.index
+ switch (index) {
+ case "0":
+ wx.downloadFile({
+ url: app.globalData.agreement,
+ success: function (res) {
+ wx.hideLoading()
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('鎵撳紑鏂囨。鎴愬姛')
+ },
+ fail(error) {
+ console.log(error);
+ }
+ })
+ }
+ })
+ return;
+ case "1":
+ url = "/pages/m_user/p_changepw/p_changepw"
+ break;
+ }
+ if (url != "") {
+ wx.navigateTo({
+ url: url
+ })
+ } else {
+ wx.showToast({
+ title: '鍔熻兘鏁鏈熷緟',
+ duration: 1000,
+ icon: 'none',
+ mask: true,
+ })
+ }
+ },
+
+})
\ No newline at end of file
diff --git a/pages/m_user/p_about/p_about.json b/pages/m_user/p_about/p_about.json
new file mode 100644
index 0000000..2677d80
--- /dev/null
+++ b/pages/m_user/p_about/p_about.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "鍏充簬",
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/m_user/p_about/p_about.wxml b/pages/m_user/p_about/p_about.wxml
new file mode 100644
index 0000000..f4976d2
--- /dev/null
+++ b/pages/m_user/p_about/p_about.wxml
@@ -0,0 +1,25 @@
+<!--pages/m_user/p_about/p_about.wxml-->
+<view class="page">
+ <view class="page__hd">
+ <image src="/res/icons/app_icon.png"></image>
+ <view>{{version}}</view>
+ </view>
+ <view class="page__bd">
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="0">
+ <view class="fyui-cell__hd">
+ </view>
+ <view class="fyui-cell__bd">鏈嶅姟鍗忚</view>
+ <view class="fyui-cell__ft"></view>
+ </view>
+ <view class="fyui-cell fyui-cell_select title" bindtap="goto" data-index="1">
+ <view class="fyui-cell__hd">
+ </view>
+ <view class="fyui-cell__bd">淇敼瀵嗙爜</view>
+ <view class="fyui-cell__ft"></view>
+ </view>
+ </view>
+ <view class="page__ft">
+ <view>涓氬姟鎸囧锛氫笂娴峰競鐢熸�佺幆澧冨眬鎵ф硶鎬婚槦</view>
+ <view>鎶�鏈敮鎸侊細涓婃捣椋炵窘鐜繚绉戞妧鏈夐檺鍏徃</view>
+ </view>
+</view>
\ No newline at end of file
diff --git a/pages/m_user/p_about/p_about.wxss b/pages/m_user/p_about/p_about.wxss
new file mode 100644
index 0000000..b1a3227
--- /dev/null
+++ b/pages/m_user/p_about/p_about.wxss
@@ -0,0 +1,45 @@
+/* pages/m_user/p_about/p_about.wxss */
+.title:active {
+ background-color: var(--fyui-BG-COLOR-ACTIVE);
+}
+
+.fyui-cell_select {
+ font-size: 16px;
+ padding-top: 12px;
+ padding-bottom: 12px;
+ border-bottom: 1px solid rgb(238, 238, 238);
+}
+
+.page {
+ justify-content: space-between;
+ background-color: transparent;
+}
+
+.page__hd {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ height: 30vh;
+}
+
+.page__hd>image{
+ width: 88px;
+ height: 88px;
+}
+
+.page__hd>view{
+ font-size: 14px;
+ color: var(--fyui-text-color_2);
+ margin-top: 16px;
+}
+
+.page__bd{
+ flex: 1;
+ color: var(--fyui-text-color_1);
+}
+
+.page__ft{
+ font-size: 12px;
+ color: var(--fyui-text-color_3);
+}
\ No newline at end of file
diff --git a/pages/m_user/p_changepw/p_changepw.js b/pages/m_user/p_changepw/p_changepw.js
new file mode 100644
index 0000000..9043dbc
--- /dev/null
+++ b/pages/m_user/p_changepw/p_changepw.js
@@ -0,0 +1,93 @@
+// pages/m_user/p_changepw/p_changepw.js
+import b_inputCheck from '../../../base/behaviors/b_inputCheck'
+import b_loadingToast from '../../../base/behaviors/b_loadingToast'
+
+Page({
+ behaviors: [b_inputCheck, b_loadingToast],
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ msg: [{
+ name: "鍘熷瘑鐮�",
+ id: "oldPassword",
+ input: true,
+ type: 'password',
+ value: '',
+ noValue: false,
+ },
+ {
+ name: "鏂板瘑鐮�",
+ id: "newPassword",
+ input: true,
+ type: 'password',
+ value: '',
+ noValue: false,
+ },
+ {
+ name: "纭瀵嗙爜",
+ id: "pwCheck",
+ input: true,
+ type: 'password',
+ value: "",
+ noValue: false,
+ },
+ ],
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜�
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/m_user/p_changepw/p_changepw.json b/pages/m_user/p_changepw/p_changepw.json
new file mode 100644
index 0000000..4c64798
--- /dev/null
+++ b/pages/m_user/p_changepw/p_changepw.json
@@ -0,0 +1,10 @@
+{
+ "navigationBarTitleText": "淇敼瀵嗙爜",
+ "usingComponents": {
+ "mp-cells":"/component/cells/cells",
+ "input-cell":"/component/inputcell/inputcell",
+ "mp-icon": "/component/icon/icon",
+ "mp-toptips":"/component/toptips/toptips",
+ "mp-upload":"/component/uploader/uploader"
+ }
+}
\ No newline at end of file
diff --git a/pages/m_user/p_changepw/p_changepw.wxml b/pages/m_user/p_changepw/p_changepw.wxml
new file mode 100644
index 0000000..6ef54d1
--- /dev/null
+++ b/pages/m_user/p_changepw/p_changepw.wxml
@@ -0,0 +1,15 @@
+<!--pages/m_user/p_changepw/p_changepw.wxml-->
+<view class="page">
+ <!-- <mp-toptips type="error" msg="{{errorMsg}}" show="{{errorMsg}}" delay="2000"></mp-toptips> -->
+
+ <view class="page__bd">
+ <view class="items">
+ <mp-cells>
+ <input-cell id="{{item.id}}" wx:for="{{msg}}" wx:key="id" item="{{item}}" bindpassValue="changeMsg"></input-cell>
+ </mp-cells>
+ </view>
+ </view>
+ <view class="page__ft">
+ <view class="submit" bindtap="onSubmit">鎻愪氦</view>
+ </view>
+</view>
\ No newline at end of file
diff --git a/pages/m_user/p_changepw/p_changepw.wxss b/pages/m_user/p_changepw/p_changepw.wxss
new file mode 100644
index 0000000..b948ff4
--- /dev/null
+++ b/pages/m_user/p_changepw/p_changepw.wxss
@@ -0,0 +1,6 @@
+/* pages/m_user/p_changepw/p_changepw.wxss */
+.items {
+ position: relative;
+ padding: 0 16px;
+ background-color: white;
+}
\ No newline at end of file
diff --git a/pages/m_user/personalauthentication/personalauthentication.js b/pages/m_user/personalauthentication/personalauthentication.js
new file mode 100644
index 0000000..a4d2b8d
--- /dev/null
+++ b/pages/m_user/personalauthentication/personalauthentication.js
@@ -0,0 +1,127 @@
+// pages/m_user/personalauthentication/personalauthentication.js
+import userservice from '../../../service/userservice'
+import authservice from '../../../service/authservice'
+import b_inputCheck from '../../../base/behaviors/b_inputCheck'
+import b_loadingToast from '../../../base/behaviors/b_loadingToast'
+
+const app = getApp()
+
+Page({
+ behaviors: [b_inputCheck, b_loadingToast],
+ /**
+ * 椤甸潰鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ idTypes: [
+ {value: '0', name: '韬唤璇�'},
+ ],
+ idTypeIndex: 0,
+ msg: [{
+ name: "濮撳悕",
+ id: "piName",
+ input: true,
+ value: '',
+ noValue: false,
+ },
+ {
+ name: "璇佷欢绫诲瀷",
+ id: "piIdType",
+ type: 'picker',
+ pickerMode: 'selector',
+ value: '',
+ noValue: false,
+ selectIndex: 0,
+ options: [
+ {name: '鏈�夋嫨', value: '-1'},
+ {name: '韬唤璇�', value: '0'},
+ ]
+ },
+ {
+ name: "璇佷欢缂栧彿",
+ id: "piId",
+ input: true,
+ value: "",
+ noValue: false,
+ },
+ {
+ name: "鑱屼綅",
+ id: "piPosition",
+ type: 'picker',
+ pickerMode: 'selector',
+ value: '',
+ noValue: false,
+ selectIndex: 0,
+ options: [
+ {name: '鏈�夋嫨', value: '-1'},
+ {name: '绠$悊鍛�', value: '0'},
+ {name: '鑱屽憳', value: '1'},
+ ]
+ },
+ ],
+ },
+
+ /**
+ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
+ */
+ onLoad(options) {
+ this.setData({
+ loadingText: '涓婁紶涓�',
+ loadCompleteText: '涓婁紶瀹屾垚'
+ })
+ this.getPersonalInfo()
+ },
+
+ changeIDType(e) {
+ let i = e.detail.value
+ this.setData({
+ idTypeIndex: i
+ })
+ },
+
+ getPersonalInfo() {
+ var that = this
+ userservice.getBaseInfo(app.globalData.accessToken.userId, {
+ success(data) {
+ const msg = that.data.msg
+ if (data.personalInfo != null) {
+ const info = data.personalInfo
+ msg[0].value = info.piName
+ msg[1].value = info.piIdType
+ for (let i = 0; i < msg[1].options.length; i++) {
+ const o = msg[1].options[i];
+ if (o.name == msg[1].value) {
+ msg[1].selectIndex = i
+ break
+ }
+ }
+ msg[2].value = info.piId
+ msg[3].value = info.piPosition
+ for (let i = 0; i < msg[3].options.length; i++) {
+ const o = msg[3].options[i];
+ if (o.name == msg[3].value) {
+ msg[3].selectIndex = i
+ break
+ }
+ }
+ that.setData({
+ msg, info
+ })
+ }
+ }
+ }, app.globalData.accessToken.openId)
+ },
+
+ //鎻愪氦涓汉淇℃伅
+ _submit() {
+ var that = this
+ this.setData({loading: true})
+ authservice.authPersonal(app.globalData.accessToken.openId, this.data.info, {
+ success(res) {
+ that.setData({loading: false})
+ wx.navigateBack({
+ delta: 1,
+ })
+ },
+ })
+ },
+})
\ No newline at end of file
diff --git a/pages/m_user/personalauthentication/personalauthentication.json b/pages/m_user/personalauthentication/personalauthentication.json
new file mode 100644
index 0000000..c681697
--- /dev/null
+++ b/pages/m_user/personalauthentication/personalauthentication.json
@@ -0,0 +1,10 @@
+{
+ "navigationBarTitleText": "涓汉淇℃伅璁よ瘉",
+ "usingComponents": {
+ "mp-cells":"/component/cells/cells",
+ "input-cell":"/component/inputcell/inputcell",
+ "mp-icon": "/component/icon/icon",
+ "mp-toptips":"/component/toptips/toptips",
+ "mp-upload":"/component/uploader/uploader"
+ }
+}
\ No newline at end of file
diff --git a/pages/m_user/personalauthentication/personalauthentication.wxml b/pages/m_user/personalauthentication/personalauthentication.wxml
new file mode 100644
index 0000000..32e1c3a
--- /dev/null
+++ b/pages/m_user/personalauthentication/personalauthentication.wxml
@@ -0,0 +1,42 @@
+<!--pages/m_user/personalauthentication/personalauthentication.wxml-->
+<mp-toptips type="error" msg="{{errorMsg}}" show="{{errorMsg}}" delay="2000"></mp-toptips>
+<view class="page">
+ <image class="banner-bg" src="/res/icons/companyinfo-1.png" mode="widthFix"></image>
+ <view class="tips">璇蜂粩缁嗘鏌ヤ互涓嬩俊鎭紝纭鏄惁姝g‘锛岃皟鏁村畬鎴愬悗鎻愪氦瀹屾垚璁よ瘉锛堝叾涓甫*鐨勪负蹇呭~椤癸紝鍏朵綑涓洪�夊~椤癸級</view>
+ <view class="page__bd">
+ <!-- <view class="top-card">
+ <view class="tag"><text style="color: transparent;">*</text>浼佷笟绫诲瀷</view>
+ <picker mode="selector" bindchange="changeSceneType" value="{{sceneTypeIndex}}" range="{{sceneTypes}}" range-key="name" class="value">
+ <view class="picker-text">{{sceneTypes[sceneTypeIndex].name}}</view>
+ </picker>
+ <mp-icon icon="arrow" color="#59D5B3" size="{{10}}"></mp-icon>
+ </view> -->
+ <view class="items">
+ <mp-cells>
+ <block wx:for="{{msg}}" wx:key="index">
+ <block wx:if="{{item.type == 'picker'}}">
+ <view class="hr-view"></view>
+ <view class="top-card">
+ <view id="{{item.id}}" class="tag"><text class="{{item.required != false ? 'required' : 'not-required'}}">*</text>{{item.name}}</view>
+ <picker wx:if="{{item.pickerMode == 'selector'}}" mode="selector" bindchange="pickerChange" data-index="{{index}}" data-mode="selector" value="{{item.selectIndex}}" range="{{item.options}}" range-key="name" class="value">
+ <view class="picker-text">{{item.options[item.selectIndex].name}}</view>
+ </picker>
+ <picker wx:elif="{{item.pickerMode == 'region'}}" mode="region" bindchange="pickerChange" data-index="{{index}}" data-mode="region" value="{{item.displayValue}}" class="value" level="sub-district" custom-item="绌�">
+ <view class="picker-text" wx:if="{{item.value.length > 0}}">{{item.value[0] + (item.value[1] == item.value[0] ? '' : item.value[1]) + item.value[2] + item.value[3]}}</view>
+ <view wx:else class="picker-text" style="color: #B2B2B2;">璇烽�夋嫨琛楅晣</view>
+ </picker>
+ <mp-icon icon="arrow" color="black" size="{{10}}"></mp-icon>
+ </view>
+ </block>
+ <input-cell id="{{item.id}}" wx:else item="{{item}}" bindpassValue="changeMsg"></input-cell>
+ </block>
+ </mp-cells>
+ </view>
+ <!-- <view class="weui-upload-view">
+ <mp-upload title="涓婁紶钀ヤ笟鎵х収" titleClass="upload-title-class" max-count="1" files="{{imgFiles}}" binduploadImg="uploadFile" binddelete="delImg"></mp-upload>
+ </view> -->
+ </view>
+ <view class="page__ft">
+ <view class="submit" bindtap="onSubmit">涓婁紶</view>
+ </view>
+</view>
\ No newline at end of file
diff --git a/pages/m_user/personalauthentication/personalauthentication.wxss b/pages/m_user/personalauthentication/personalauthentication.wxss
new file mode 100644
index 0000000..353b474
--- /dev/null
+++ b/pages/m_user/personalauthentication/personalauthentication.wxss
@@ -0,0 +1,77 @@
+/* pages/m_user/personalauthentication/personalauthentication.wxss */
+.tips {
+ position: relative;
+ color: white;
+ padding: 16px;
+ font-size: 14px;
+ font-weight: 550;
+}
+
+.banner-bg {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 0;
+ /* background-color: aqua; */
+}
+
+.top-card {
+ position: relative;
+ display: flex;
+ flex-direction: row;
+ background-color: white;
+ border-top-left-radius: 8px;
+ border-top-right-radius: 8px;
+ padding: 8px 0px;
+ /* margin: 0 8px; */
+ font-size: 16px;
+}
+
+.picker-text {
+ /* color: var(--fyui-primary-color); */
+ color: var(--fyui-text-color_1);
+}
+
+.items {
+ position: relative;
+ padding: 0 16px;
+ background-color: white;
+}
+
+.top-card .tag {
+ /* display: inline-block; */
+ width: 32vw;
+ white-space: nowrap;
+}
+
+.top-card .value {
+ flex-grow: 1;
+}
+
+.top-card .value view {
+ max-width: 200px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.weui-upload-view {
+ background-color: white;
+ padding: 16px;
+}
+
+.page__ft {
+ background-color: white;
+}
+
+.required {
+ color: red;
+ text-align: center;
+ vertical-align: middle;
+}
+
+.not-required {
+ color: transparent;
+}
\ No newline at end of file
diff --git a/pages/m_user/sceneauthentication/sceneauthentication.json b/pages/m_user/sceneauthentication/sceneauthentication.json
index 0ed9cb8..9192c22 100644
--- a/pages/m_user/sceneauthentication/sceneauthentication.json
+++ b/pages/m_user/sceneauthentication/sceneauthentication.json
@@ -1,5 +1,5 @@
{
- "navigationBarTitleText": "搴楅摵璁よ瘉",
+ "navigationBarTitleText": "搴楅摵淇℃伅璁よ瘉",
"usingComponents": {
"c-scene-info": "../base_c/c_scene-info/c_scene-info"
}
diff --git a/pages/m_user/sceneauthentication/sceneauthentication.wxml b/pages/m_user/sceneauthentication/sceneauthentication.wxml
index b2abbca..716bf9f 100644
--- a/pages/m_user/sceneauthentication/sceneauthentication.wxml
+++ b/pages/m_user/sceneauthentication/sceneauthentication.wxml
@@ -1,7 +1,7 @@
<!--pages/m_user/sceneauthentication/sceneauthentication.wxml-->
<view class="page">
<image class="banner-bg" src="/res/icons/companyinfo-1.png" mode="widthFix"></image>
- <view class="tips">璇蜂粩缁嗘鏌ョ郴缁熼鐣欑殑浼佷笟淇℃伅锛岀‘璁ゆ槸鍚︽纭紝璋冩暣瀹屾垚鍚庢彁浜ゅ畬鎴愪紒涓氳璇�</view>
+ <view class="tips">璇蜂粩缁嗘鏌ヤ互涓嬩俊鎭紝纭鏄惁姝g‘锛岃皟鏁村畬鎴愬悗鎻愪氦瀹屾垚璁よ瘉锛堝叾涓甫*鐨勪负蹇呭~椤癸紝鍏朵綑涓洪�夊~椤癸級</view>
<c-scene-info sceneType="{{sceneType}}" bindonSubmit="onSubmit"></c-scene-info>
</view>
diff --git a/pages/m_user/userlogin/userlogin.js b/pages/m_user/userlogin/userlogin.js
index e218a45..ddd88f8 100644
--- a/pages/m_user/userlogin/userlogin.js
+++ b/pages/m_user/userlogin/userlogin.js
@@ -118,5 +118,28 @@
})
return false
}
+ },
+
+ gotoAgreement() {
+ wx.showLoading({
+ title: ' 鎵撳紑涓�',
+ mask: true,
+ })
+ wx.downloadFile({
+ url: app.globalData.agreement,
+ success: function (res) {
+ wx.hideLoading()
+ const filePath = res.tempFilePath
+ wx.openDocument({
+ filePath: filePath,
+ success: function (res) {
+ console.log('鎵撳紑鏂囨。鎴愬姛')
+ },
+ fail(error) {
+ console.log(error);
+ }
+ })
+ }
+ })
}
})
\ No newline at end of file
diff --git a/pages/m_user/userlogin/userlogin.wxml b/pages/m_user/userlogin/userlogin.wxml
index 72e0557..0bc52d8 100644
--- a/pages/m_user/userlogin/userlogin.wxml
+++ b/pages/m_user/userlogin/userlogin.wxml
@@ -1,13 +1,24 @@
<!--pages/m_user/userlogin/userlogin.wxml-->
-<view>
- <image class="banner-bg" src="{{bgPath}}"></image>
- <view class="login-btn">
- <view class="submit" bindtap="loginWx">寰俊鐢ㄦ埛涓�閿櫥褰�</view>
- <view class="login-btn_text" bindtap="gotoLogin">璐﹀彿瀵嗙爜鐧诲綍/娉ㄥ唽</view>
+<view class="page">
+ <view class="page__bd">
+ <image class="banner-bg" src="{{bgPath}}"></image>
+ <view class="login-btn">
+ <view class="submit" bindtap="loginWx">寰俊鐢ㄦ埛涓�閿櫥褰�</view>
+ <view class="login-btn_text" bindtap="gotoLogin">璐﹀彿瀵嗙爜鐧诲綍/娉ㄥ唽</view>
+ </view>
+ <view class="weui-agree">
+ <label bindtap="checkboxChange">
+ <checkbox class="weui-agree__checkbox-check" value="{{agree}}" checked="{{agree}}" />
+ <span class="weui-agree__checkbox"></span>
+ <span class="weui-agree__text">闃呰骞跺悓鎰�</span>
+ </label>
+ <span class="weui-agree__text"><text bindtap="gotoAgreement">銆婁腑灏忎紒涓氬畧娉曟湇鍔″钩鍙扮敤鎴锋潯娆俱��</text>
+ <!-- 鍙�<text>銆婇殣绉佹潯娆俱��</text> -->
+ </span>
+ </view>
</view>
- <label class="weui-agree" bindtap="checkboxChange">
- <checkbox class="weui-agree__checkbox-check" value="{{agree}}" checked="{{agree}}" />
- <span class="weui-agree__checkbox"></span>
- <span class="weui-agree__text">闃呰骞跺悓鎰�<text>銆婁腑灏忎紒涓氬畧娉曟湇鍔″钩鍙扮敤鎴锋潯娆俱��</text>鍙�<text>銆婇殣绉佹潯娆俱��</text></span>
- </label>
+ <view class="page__ft">
+ <view>涓氬姟鎸囧锛氫笂娴峰競鐢熸�佺幆澧冨眬鎵ф硶鎬婚槦</view>
+ <view>鎶�鏈敮鎸侊細涓婃捣椋炵窘鐜繚绉戞妧鏈夐檺鍏徃</view>
+ </view>
</view>
\ No newline at end of file
diff --git a/pages/m_user/userlogin/userlogin.wxss b/pages/m_user/userlogin/userlogin.wxss
index 2fc116d..debe055 100644
--- a/pages/m_user/userlogin/userlogin.wxss
+++ b/pages/m_user/userlogin/userlogin.wxss
@@ -28,4 +28,19 @@
.weui-agree__text>text {
color: #3CD0B6;
+}
+
+.page {
+ justify-content: space-between;
+ background-color: transparent;
+}
+
+.page__bd{
+ flex: 1;
+ color: var(--fyui-text-color_1);
+}
+
+.page__ft{
+ font-size: 12px;
+ color: var(--fyui-text-color_3);
}
\ No newline at end of file
diff --git a/project.config.json b/project.config.json
index c45faf7..6975eb0 100644
--- a/project.config.json
+++ b/project.config.json
@@ -50,7 +50,7 @@
},
"compileType": "miniprogram",
"libVersion": "2.26.0",
- "appid": "wxffd1438dd373fcf6",
+ "appid": "wx5758efcebb0774de",
"projectname": "ep-law-abiding",
"editorSetting": {
"tabIndent": "insertSpaces",
diff --git a/res/icons/app_icon.png b/res/icons/app_icon.png
new file mode 100644
index 0000000..b0d2f1c
--- /dev/null
+++ b/res/icons/app_icon.png
Binary files differ
diff --git a/res/icons/icon3.png b/res/icons/icon3.png
index 95d9a12..0237064 100644
--- a/res/icons/icon3.png
+++ b/res/icons/icon3.png
Binary files differ
diff --git a/res/icons/icon6.png b/res/icons/icon6.png
new file mode 100644
index 0000000..8147018
--- /dev/null
+++ b/res/icons/icon6.png
Binary files differ
diff --git a/res/icons/personal.png b/res/icons/personal.png
new file mode 100644
index 0000000..ea7acd7
--- /dev/null
+++ b/res/icons/personal.png
Binary files differ
diff --git a/res/icons/scene_info.png b/res/icons/scene_info.png
new file mode 100644
index 0000000..0a958d7
--- /dev/null
+++ b/res/icons/scene_info.png
Binary files differ
diff --git a/service/authservice.js b/service/authservice.js
new file mode 100644
index 0000000..256e7bd
--- /dev/null
+++ b/service/authservice.js
@@ -0,0 +1,60 @@
+const $f = require('./baserequest')
+
+module.exports = {
+ //浼佷笟淇℃伅璁よ瘉
+ authCompany: function (wxUserId, company, fun) {
+ let cb = {
+ url: '/auth/company',
+ params: {
+ wxUserId: wxUserId,
+ },
+ data: company,
+ }
+ Object.assign(cb, fun)
+
+ $f.post(cb)
+ },
+
+ //鍦烘櫙淇℃伅璁よ瘉
+ authScene: function (wxUserId, sceneType, sceneInfo, fun) {
+ let cb = {
+ url: '/auth/scene',
+ params: {
+ wxUserId: wxUserId,
+ sceneType: sceneType
+ },
+ data: sceneInfo,
+ }
+ Object.assign(cb, fun)
+
+ $f.post(cb)
+ },
+
+ //涓汉淇℃伅璁よ瘉
+ authPersonal: function (wxUserId, personal, fun) {
+ let cb = {
+ url: '/auth/personal',
+ params: {
+ wxUserId: wxUserId,
+ },
+ data: personal,
+ }
+ Object.assign(cb, fun)
+
+ $f.post(cb)
+ },
+
+ //鑾峰彇鐢ㄦ埛璁よ瘉鐘舵��
+ getAuthStatus: function (wxUserId, userId, fun) {
+ let cb = {
+ url: `/auth/status`,
+ params: {
+ wxUserId: wxUserId,
+ userId: userId
+ }
+ }
+ Object.assign(cb, fun)
+
+ $f.get(cb)
+ },
+}
\ No newline at end of file
diff --git a/service/baserequest.js b/service/baserequest.js
index fe6e570..60611b2 100644
--- a/service/baserequest.js
+++ b/service/baserequest.js
@@ -11,12 +11,15 @@
const util = require("../utils/util.js")
const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
-// const baseUrl = "http://192.168.0.137:8080"
-const baseUrl = "https://fyami.com.cn:447"
-// const basePicUrl = baseUrl + "/images/"
-const basePicUrl = "https://fyami.com.cn:447/images/"
-const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/"
-const baseFileUrl = "https://fyami.com.cn:447/meeting/file/"
+const baseUrl = "http://192.168.0.137:8080"
+// const baseUrl = "https://fyami.com.cn:447"
+// const baseUrl = "https://fyami.com.cn"
+
+// const bu = "https://fyami.com.cn"
+const bu = "https://fyami.com.cn:447"
+const basePicUrl = `${bu}/images/`
+const baseIconUrl = `${bu}/images/weixin/eplaw/`
+const baseFileUrl = `${bu}/meeting/file/`
function request(fun) {
if (fun.params != undefined) {
diff --git a/service/ledgerservice.js b/service/ledgerservice.js
index 0d0663e..5030ebf 100644
--- a/service/ledgerservice.js
+++ b/service/ledgerservice.js
@@ -53,12 +53,14 @@
url: `/ledger/${userId}/detail2`,
params: {
sceneType: sceneType,
- time: time
},
}
if (ledgerSubTypeId) {
cb.params.ledgerSubTypeId = ledgerSubTypeId
}
+ if (time) {
+ cb.params.time = time
+ }
Object.assign(cb, fun)
let fun1 = util.deepCopy(cb)
diff --git a/service/userservice.js b/service/userservice.js
index 62784a6..1b3a8f3 100644
--- a/service/userservice.js
+++ b/service/userservice.js
@@ -34,13 +34,16 @@
$f.get(cb)
},
//鑾峰彇鐢ㄦ埛鍩虹淇℃伅
- getBaseInfo: function (userId, fun) {
+ getBaseInfo: function (userId, fun, wxUserId) {
let cb = {
url: `/userInfo/baseInfo`,
params: {
userId: userId
}
}
+ if (wxUserId) {
+ cb.params.wxUserId = wxUserId
+ }
Object.assign(cb, fun)
$f.get(cb)
--
Gitblit v1.9.3