weapps-plugin-jingtong-verify 1.4.6 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.json +41 -33
- package/package.json +20 -20
- package/sdk.js +289 -289
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.js +31 -31
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.wxml +9 -9
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.wxss +65 -65
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.js +41 -0
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.json +4 -0
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.wxml +20 -0
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.wxss +112 -0
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.js +37 -37
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.wxml +30 -30
- package/weapps-plugin-jingtong-verify/components/face-error-modal/face-error-modal.wxss +79 -79
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/face-modal/face-modal.wxss +57 -57
- package/weapps-plugin-jingtong-verify/components/gsd-lib/anim/anim.min.js +1 -1
- package/weapps-plugin-jingtong-verify/components/gsd-lib/crypto/crypto.js +37 -37
- package/weapps-plugin-jingtong-verify/components/gsd-lib/crypto/index.js +44 -44
- package/weapps-plugin-jingtong-verify/components/gsd-lib/dayjs/index.js +351 -351
- package/weapps-plugin-jingtong-verify/components/gsd-lib/event/index.js +117 -117
- package/weapps-plugin-jingtong-verify/components/gsd-lib/index.js +63 -63
- package/weapps-plugin-jingtong-verify/components/gsd-lib/map/index.js +10 -10
- package/weapps-plugin-jingtong-verify/components/gsd-lib/map/qmap.js +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-lib/storage/index.js +114 -114
- package/weapps-plugin-jingtong-verify/components/gsd-lib/utils/index.js +218 -218
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/formCheck.js +72 -72
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/formController.js +47 -47
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/icon.js +11 -11
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/list.js +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/navigator.js +33 -33
- package/weapps-plugin-jingtong-verify/components/gsd-ui/behaviors/primarySecondButton.js +18 -18
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.js +12 -12
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-agree/index.wxml +15 -15
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.js +47 -47
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-badge/index.wxml +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.js +44 -44
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-button-group/index.wxml +28 -28
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.js +30 -30
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.wxml +42 -42
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-cell/index.wxss +1 -1
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.js +418 -418
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-date-picker-en/index.wxml +29 -29
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.js +11 -11
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-dropdown/index.wxml +4 -4
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.js +182 -179
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.js +92 -92
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.wxml +12 -12
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.wxss +2 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.js +49 -49
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.wxml +14 -14
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.js +33 -33
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.wxml +2 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.js +108 -108
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.wxml +53 -53
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.js +241 -236
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.json +8 -8
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.wxml +49 -49
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.js +328 -328
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.wxml +26 -26
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.js +159 -159
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.wxml +10 -10
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.js +112 -112
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.wxml +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.js +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.json +7 -7
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.js +50 -50
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.wxml +27 -27
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/add.svg +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/arrow.svg +14 -14
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/delete.svg +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/preview.svg +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/user.svg +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-agree.wxss +147 -147
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-badge.wxss +41 -41
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-button-group.wxss +244 -244
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-cell.wxss +220 -220
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-dropdown.wxss +115 -115
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form-cell.wxss +101 -101
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form-item.wxss +174 -174
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form.wxss +101 -101
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-icon.wxss +268 -268
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-index-list.wxss +206 -206
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-input.wxss +214 -206
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-picker.wxss +139 -139
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-popover.wxss +129 -129
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-search.wxss +171 -171
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-switch.wxss +176 -176
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-tips.wxss +173 -173
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/icon/iconfont.wxss +160 -160
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/main.wxss +283 -283
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/helper.js +55 -55
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/validType.js +117 -117
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/validator.js +106 -106
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxml +8 -8
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxss +57 -57
- package/weapps-plugin-jingtong-verify/components/modal/modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/modal/modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/modal/modal.wxml +28 -28
- package/weapps-plugin-jingtong-verify/components/modal/modal.wxss +84 -84
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.js +82 -82
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxml +18 -18
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxss +72 -72
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.js +47 -39
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxml +11 -9
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxss +51 -51
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.js +73 -0
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.json +4 -0
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.wxml +19 -0
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.wxss +72 -0
- package/weapps-plugin-jingtong-verify/i18n/index.js +7 -7
- package/weapps-plugin-jingtong-verify/i18n/logout.js +10 -10
- package/weapps-plugin-jingtong-verify/i18n/rules.js +374 -262
- package/weapps-plugin-jingtong-verify/images/bank-card-verify.png +0 -0
- package/weapps-plugin-jingtong-verify/images/chek_right.png +0 -0
- package/weapps-plugin-jingtong-verify/images/chevron-down.png +0 -0
- package/weapps-plugin-jingtong-verify/images/chevron-up.png +0 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.js +488 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.json +7 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.wxml +73 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.wxss +205 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.js +1218 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.json +10 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.wxml +254 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.wxss +389 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-sms-setting/bank-card-login-forgot-sms-setting.js +66 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-sms-setting/bank-card-login-forgot-sms-setting.wxml +2 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.js +461 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.json +8 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.wxml +67 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.wxss +231 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.js +477 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.json +12 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.wxml +120 -0
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.wxss +217 -0
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.js +86 -86
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.json +6 -6
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.wxml +20 -20
- package/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.wxss +51 -51
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.js +167 -167
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.wxml +30 -30
- package/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.wxss +91 -91
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.js +79 -79
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.wxml +19 -19
- package/weapps-plugin-jingtong-verify/pages/face-error-reason/face-error-reason.wxss +44 -44
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.js +1687 -1548
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.json +17 -17
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxml +516 -504
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxss +185 -133
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.js +127 -127
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.wxml +36 -36
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.wxss +60 -60
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.js +147 -0
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.json +4 -0
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.wxml +48 -0
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.wxss +166 -0
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.js +106 -106
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.wxml +29 -29
- package/weapps-plugin-jingtong-verify/pages/login-manage/login-manage.wxss +68 -68
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.js +156 -0
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.json +4 -0
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.wxml +19 -0
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.wxss +69 -0
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.js +24 -24
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.json +3 -3
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.wxml +12 -12
- package/weapps-plugin-jingtong-verify/pages/logoff-success/logoff-success.wxss +33 -33
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.js +110 -110
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.json +6 -6
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.wxml +9 -9
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.wxss +1 -1
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.js +854 -854
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.json +11 -11
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.wxml +162 -162
- package/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify.wxss +64 -64
- package/weapps-plugin-jingtong-verify/pages/setting/setting.js +331 -328
- package/weapps-plugin-jingtong-verify/pages/setting/setting.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/setting/setting.wxml +91 -91
- package/weapps-plugin-jingtong-verify/pages/setting/setting.wxss +69 -69
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.js +306 -306
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.json +7 -7
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.wxml +142 -142
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.wxss +110 -110
- package/weapps-plugin-jingtong-verify/style/page.wxss +13 -13
- package/weapps-plugin-jingtong-verify/utils/QDTrackerNew/QDTracker.js +15 -15
- package/weapps-plugin-jingtong-verify/utils/QDTrackerNew/QDTrackerMain.js +59 -59
- package/weapps-plugin-jingtong-verify/utils/constantVal.js +75 -0
- package/weapps-plugin-jingtong-verify/utils/country.js +209 -209
- package/weapps-plugin-jingtong-verify/utils/index.js +306 -306
- package/weapps-plugin-jingtong-verify/utils/jsencrypt.min.js +1 -1
- package/weapps-plugin-jingtong-verify/utils/request.js +604 -1
- package/weapps-plugin-jingtong-verify/utils/rules.js +387 -301
- package/weapps-plugin-jingtong-verify/utils/tifadmin_config.js +61 -61
- package/weapps-plugin-jingtong-verify/utils/validate.js +894 -772
|
@@ -1,307 +1,307 @@
|
|
|
1
|
-
// weapps-plugin-jingtong-verify/pages/user-info/user-info.js
|
|
2
|
-
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
-
const utils = require("../../utils/index")
|
|
4
|
-
|
|
5
|
-
import { SDKTrack, setAccountInfo } from '../../utils/QDTrackerNew/QDTrackerMain'
|
|
6
|
-
|
|
7
|
-
Page({
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* 页面的初始数据
|
|
11
|
-
*/
|
|
12
|
-
data: {
|
|
13
|
-
showPage: true,
|
|
14
|
-
name: '',
|
|
15
|
-
star_name: '',
|
|
16
|
-
sex: '',
|
|
17
|
-
cid: '',
|
|
18
|
-
star_cid: '',
|
|
19
|
-
phone: '',
|
|
20
|
-
star_phone: '',
|
|
21
|
-
phoneModal: false,
|
|
22
|
-
showEye: false,
|
|
23
|
-
authExpired: false,
|
|
24
|
-
showTipModal: false,
|
|
25
|
-
birthday: '',
|
|
26
|
-
canSave: false,
|
|
27
|
-
showFullInfoModal: false,
|
|
28
|
-
sexIndex: -1,
|
|
29
|
-
sexRangeZH: [
|
|
30
|
-
{ name: '男', value: 1 },
|
|
31
|
-
{ name: '女', value: 2 }
|
|
32
|
-
],
|
|
33
|
-
fourTypeCert: false, // 港澳/台通行证、华侨护照和外国护照四类证件
|
|
34
|
-
showSBModal: false,
|
|
35
|
-
sbDesc: '',
|
|
36
|
-
showLeaveModal: false
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 生命周期函数--监听页面加载
|
|
41
|
-
*/
|
|
42
|
-
onLoad() {
|
|
43
|
-
wx.hideShareMenu()
|
|
44
|
-
|
|
45
|
-
wx.showLoading({
|
|
46
|
-
mask: true,
|
|
47
|
-
title: '加载中…'
|
|
48
|
-
})
|
|
49
|
-
jingtongVerifyRequest.getSession({
|
|
50
|
-
success: (res) => {
|
|
51
|
-
let { star_name, star_cid, phone, name, cid, face_time, realname_time, cid_type, openid, birth_date = '' } = res
|
|
52
|
-
let pho = /(\d{3})\d*(\d{4})/
|
|
53
|
-
let sex = '未知'
|
|
54
|
-
let authExpired = (!face_time && !realname_time) || !cid
|
|
55
|
-
// let Gender = res.sex
|
|
56
|
-
// let Age = ''
|
|
57
|
-
|
|
58
|
-
// 设置用户账号信息
|
|
59
|
-
setAccountInfo(openid)
|
|
60
|
-
|
|
61
|
-
if (star_cid && cid_type === '111') {
|
|
62
|
-
sex = utils.parseIDCard(cid).sexZh
|
|
63
|
-
// Gender = utils.parseIDCard(cid).sex
|
|
64
|
-
// Age = utils.parseIDCard(cid).age
|
|
65
|
-
} else {
|
|
66
|
-
let resSex = res.sex
|
|
67
|
-
if (resSex === '1') {
|
|
68
|
-
sex = '男'
|
|
69
|
-
} else if (resSex === '2') {
|
|
70
|
-
sex = '女'
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// 港澳/台通行证、华侨护照三类证件
|
|
74
|
-
const fourTypeCertList = ['516', '511', '414']
|
|
75
|
-
const fourTypeCert = fourTypeCertList.includes(cid_type) || false
|
|
76
|
-
|
|
77
|
-
// 获取弹窗时间戳
|
|
78
|
-
let nowTimestamp = Date.now()
|
|
79
|
-
const stamp = wx.getStorageSync('tif.fullInfoModalStamp') || 0
|
|
80
|
-
|
|
81
|
-
let birthday = ''
|
|
82
|
-
if (birth_date) {
|
|
83
|
-
birthday = birth_date.slice(0, 4) + '-' + birth_date.slice(4, 6) + '-' + birth_date.slice(6, 8);
|
|
84
|
-
}
|
|
85
|
-
this.setData({
|
|
86
|
-
cid_type,
|
|
87
|
-
sexIndex: sex === '未知' ? 0 : Number(res.sex) - 1,
|
|
88
|
-
birthday,
|
|
89
|
-
fourTypeCert,
|
|
90
|
-
showFullInfoModal: (fourTypeCert && (sex === '未知' || !birthday) && nowTimestamp > stamp) || false,
|
|
91
|
-
star_name,
|
|
92
|
-
name,
|
|
93
|
-
sex,
|
|
94
|
-
star_cid,
|
|
95
|
-
cid,
|
|
96
|
-
star_phone: phone ? phone.replace(pho, '$1****$2') : '',
|
|
97
|
-
phone,
|
|
98
|
-
authExpired
|
|
99
|
-
}, () => {
|
|
100
|
-
wx.hideLoading()
|
|
101
|
-
})
|
|
102
|
-
},
|
|
103
|
-
fail: () => {
|
|
104
|
-
wx.hideLoading()
|
|
105
|
-
}
|
|
106
|
-
})
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
// 显示换绑手机号码弹窗
|
|
110
|
-
showPhoneModal() {
|
|
111
|
-
if (!this.data.authExpired) {
|
|
112
|
-
// 上报事件
|
|
113
|
-
SDKTrack('function_btn_click', {
|
|
114
|
-
item_type: '9', // 业务分类
|
|
115
|
-
item_code: '110000000000511211993408000000', // 事项ID
|
|
116
|
-
item_access: '19', // 业务入口
|
|
117
|
-
})
|
|
118
|
-
this.setData({
|
|
119
|
-
phoneModal: true
|
|
120
|
-
})
|
|
121
|
-
} else {
|
|
122
|
-
wx.showToast({
|
|
123
|
-
title: '请先登录,再进行换绑手机号码操作',
|
|
124
|
-
icon: 'none',
|
|
125
|
-
duration: 3000
|
|
126
|
-
})
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
// 切换显隐
|
|
131
|
-
changeEye() {
|
|
132
|
-
this.setData({
|
|
133
|
-
showEye: !this.data.showEye
|
|
134
|
-
})
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
// 弹框确认
|
|
138
|
-
confirmPhoneModal() {
|
|
139
|
-
this.setData({
|
|
140
|
-
phoneModal: false
|
|
141
|
-
})
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
// 获取手机号码
|
|
145
|
-
async getPhoneNumberFun(e) {
|
|
146
|
-
const params = Object.assign(e.detail, {
|
|
147
|
-
source: '1'
|
|
148
|
-
})
|
|
149
|
-
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.loginPhone(params))
|
|
150
|
-
if (err) {
|
|
151
|
-
console.log(err, '换绑手机号码')
|
|
152
|
-
wx.showToast({
|
|
153
|
-
title: err.errmsg || '换绑失败,请稍后再试',
|
|
154
|
-
icon: 'none'
|
|
155
|
-
})
|
|
156
|
-
return
|
|
157
|
-
}
|
|
158
|
-
wx.showToast({
|
|
159
|
-
title: '换绑成功',
|
|
160
|
-
icon: 'none',
|
|
161
|
-
duration: 3000,
|
|
162
|
-
mask: true
|
|
163
|
-
})
|
|
164
|
-
|
|
165
|
-
// 登录成功回调 => 业务侧操作事项
|
|
166
|
-
wx.$_ServiceConfiguration && wx.$_ServiceConfiguration.methods && wx.$_ServiceConfiguration.methods._loginSuccessCallBack && wx.$_ServiceConfiguration.methods._loginSuccessCallBack(session)
|
|
167
|
-
|
|
168
|
-
let phone = session.phone
|
|
169
|
-
let pho = /(\d{3})\d*(\d{4})/
|
|
170
|
-
|
|
171
|
-
this.setData({
|
|
172
|
-
phone: wx.getStorageSync('tif.realPhone') || '',
|
|
173
|
-
star_phone: phone ? phone.replace(pho, '$1****$2') : ''
|
|
174
|
-
})
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
// 显示弹窗
|
|
178
|
-
showTip() {
|
|
179
|
-
this.setData({
|
|
180
|
-
showTipModal: true
|
|
181
|
-
})
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
// 关闭弹窗
|
|
185
|
-
handleCloseModal() {
|
|
186
|
-
this.setData({
|
|
187
|
-
showTipModal: false,
|
|
188
|
-
showSBModal: false,
|
|
189
|
-
showLeaveModal: false
|
|
190
|
-
})
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
// 关闭弹窗+记录10个自然日
|
|
194
|
-
handleFullInfoModalOk() {
|
|
195
|
-
this.setData({
|
|
196
|
-
showFullInfoModal: false
|
|
197
|
-
})
|
|
198
|
-
// 计算10个自然日后的时间戳
|
|
199
|
-
let nowTimestamp = Date.now()
|
|
200
|
-
let futureDate = new Date(nowTimestamp)
|
|
201
|
-
futureDate.setDate(futureDate.getDate() + 10)
|
|
202
|
-
let futureTimestamp = futureDate.getTime()
|
|
203
|
-
wx.setStorageSync('tif.fullInfoModalStamp', futureTimestamp)
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
// 性别
|
|
207
|
-
bindSexChange(e) {
|
|
208
|
-
const sexIndex = e.detail.value
|
|
209
|
-
this.setData({
|
|
210
|
-
sex: this.data.sexRangeZH[sexIndex].name,
|
|
211
|
-
sexIndex,
|
|
212
|
-
canSave: true
|
|
213
|
-
})
|
|
214
|
-
},
|
|
215
|
-
|
|
216
|
-
// 出生日期
|
|
217
|
-
bindBirthChange(e) {
|
|
218
|
-
this.setData({
|
|
219
|
-
birthday: e.detail.value,
|
|
220
|
-
canSave: true
|
|
221
|
-
})
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
// 保存信息
|
|
225
|
-
async toSave() {
|
|
226
|
-
const sex = this.data.sex
|
|
227
|
-
const birthday = this.data.birthday
|
|
228
|
-
if (sex === '未知') {
|
|
229
|
-
this.setData({
|
|
230
|
-
sbDesc: '您的性别信息尚未完善, ',
|
|
231
|
-
showSBModal: true
|
|
232
|
-
})
|
|
233
|
-
return
|
|
234
|
-
} else if (!birthday) {
|
|
235
|
-
this.setData({
|
|
236
|
-
sbDesc: '您的出生日期尚未完善, ',
|
|
237
|
-
showSBModal: true
|
|
238
|
-
})
|
|
239
|
-
return
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const [err, data] = await utils.awaitTo(jingtongVerifyRequest.updateSB({
|
|
243
|
-
sex: this.data.sexRangeZH[this.data.sexIndex].value || '',
|
|
244
|
-
birthday
|
|
245
|
-
}))
|
|
246
|
-
if (err) {
|
|
247
|
-
console.log(err, '保存信息')
|
|
248
|
-
wx.showToast({
|
|
249
|
-
title: err.errmsg || '保存失败,请稍后再试',
|
|
250
|
-
icon: 'none'
|
|
251
|
-
})
|
|
252
|
-
return
|
|
253
|
-
}
|
|
254
|
-
console.log('更新信息', data)
|
|
255
|
-
wx.showToast({
|
|
256
|
-
title: '保存成功',
|
|
257
|
-
icon: 'none',
|
|
258
|
-
duration: 2000,
|
|
259
|
-
mask: true
|
|
260
|
-
})
|
|
261
|
-
|
|
262
|
-
this.setData({
|
|
263
|
-
canSave: false
|
|
264
|
-
})
|
|
265
|
-
},
|
|
266
|
-
|
|
267
|
-
onBeforeLeave() {
|
|
268
|
-
console.log('监听到返回上一页', this.data.canSave)
|
|
269
|
-
// 返回上一页的逻辑处理
|
|
270
|
-
if (this.data.canSave) {
|
|
271
|
-
this.setData({
|
|
272
|
-
showLeaveModal: true
|
|
273
|
-
})
|
|
274
|
-
} else {
|
|
275
|
-
console.log('返回上一页')
|
|
276
|
-
this.setData({
|
|
277
|
-
showPage: false
|
|
278
|
-
}, () => {
|
|
279
|
-
setTimeout(() => {
|
|
280
|
-
wx.navigateBack()
|
|
281
|
-
}, 10)
|
|
282
|
-
})
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
toBack() {
|
|
287
|
-
this.setData({
|
|
288
|
-
showLeaveModal: false
|
|
289
|
-
}, () => {
|
|
290
|
-
setTimeout(() => {
|
|
291
|
-
wx.navigateBack()
|
|
292
|
-
}, 10)
|
|
293
|
-
})
|
|
294
|
-
},
|
|
295
|
-
|
|
296
|
-
stopBack() {
|
|
297
|
-
this.setData({
|
|
298
|
-
showLeaveModal: false,
|
|
299
|
-
showPage: true
|
|
300
|
-
})
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
preventSwipe() {
|
|
304
|
-
/* 空函数阻止默认滑动 */
|
|
305
|
-
console.log('空函数阻止默认滑动')
|
|
306
|
-
}
|
|
1
|
+
// weapps-plugin-jingtong-verify/pages/user-info/user-info.js
|
|
2
|
+
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
+
const utils = require("../../utils/index")
|
|
4
|
+
|
|
5
|
+
import { SDKTrack, setAccountInfo } from '../../utils/QDTrackerNew/QDTrackerMain'
|
|
6
|
+
|
|
7
|
+
Page({
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 页面的初始数据
|
|
11
|
+
*/
|
|
12
|
+
data: {
|
|
13
|
+
showPage: true,
|
|
14
|
+
name: '',
|
|
15
|
+
star_name: '',
|
|
16
|
+
sex: '',
|
|
17
|
+
cid: '',
|
|
18
|
+
star_cid: '',
|
|
19
|
+
phone: '',
|
|
20
|
+
star_phone: '',
|
|
21
|
+
phoneModal: false,
|
|
22
|
+
showEye: false,
|
|
23
|
+
authExpired: false,
|
|
24
|
+
showTipModal: false,
|
|
25
|
+
birthday: '',
|
|
26
|
+
canSave: false,
|
|
27
|
+
showFullInfoModal: false,
|
|
28
|
+
sexIndex: -1,
|
|
29
|
+
sexRangeZH: [
|
|
30
|
+
{ name: '男', value: 1 },
|
|
31
|
+
{ name: '女', value: 2 }
|
|
32
|
+
],
|
|
33
|
+
fourTypeCert: false, // 港澳/台通行证、华侨护照和外国护照四类证件
|
|
34
|
+
showSBModal: false,
|
|
35
|
+
sbDesc: '',
|
|
36
|
+
showLeaveModal: false
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 生命周期函数--监听页面加载
|
|
41
|
+
*/
|
|
42
|
+
onLoad() {
|
|
43
|
+
wx.hideShareMenu()
|
|
44
|
+
|
|
45
|
+
wx.showLoading({
|
|
46
|
+
mask: true,
|
|
47
|
+
title: '加载中…'
|
|
48
|
+
})
|
|
49
|
+
jingtongVerifyRequest.getSession({
|
|
50
|
+
success: (res) => {
|
|
51
|
+
let { star_name, star_cid, phone, name, cid, face_time, realname_time, cid_type, openid, birth_date = '' } = res
|
|
52
|
+
let pho = /(\d{3})\d*(\d{4})/
|
|
53
|
+
let sex = '未知'
|
|
54
|
+
let authExpired = (!face_time && !realname_time) || !cid
|
|
55
|
+
// let Gender = res.sex
|
|
56
|
+
// let Age = ''
|
|
57
|
+
|
|
58
|
+
// 设置用户账号信息
|
|
59
|
+
setAccountInfo(openid)
|
|
60
|
+
|
|
61
|
+
if (star_cid && cid_type === '111') {
|
|
62
|
+
sex = utils.parseIDCard(cid).sexZh
|
|
63
|
+
// Gender = utils.parseIDCard(cid).sex
|
|
64
|
+
// Age = utils.parseIDCard(cid).age
|
|
65
|
+
} else {
|
|
66
|
+
let resSex = res.sex
|
|
67
|
+
if (resSex === '1') {
|
|
68
|
+
sex = '男'
|
|
69
|
+
} else if (resSex === '2') {
|
|
70
|
+
sex = '女'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// 港澳/台通行证、华侨护照三类证件
|
|
74
|
+
const fourTypeCertList = ['516', '511', '414']
|
|
75
|
+
const fourTypeCert = fourTypeCertList.includes(cid_type) || false
|
|
76
|
+
|
|
77
|
+
// 获取弹窗时间戳
|
|
78
|
+
let nowTimestamp = Date.now()
|
|
79
|
+
const stamp = wx.getStorageSync('tif.fullInfoModalStamp') || 0
|
|
80
|
+
|
|
81
|
+
let birthday = ''
|
|
82
|
+
if (birth_date) {
|
|
83
|
+
birthday = birth_date.slice(0, 4) + '-' + birth_date.slice(4, 6) + '-' + birth_date.slice(6, 8);
|
|
84
|
+
}
|
|
85
|
+
this.setData({
|
|
86
|
+
cid_type,
|
|
87
|
+
sexIndex: sex === '未知' ? 0 : Number(res.sex) - 1,
|
|
88
|
+
birthday,
|
|
89
|
+
fourTypeCert,
|
|
90
|
+
showFullInfoModal: (fourTypeCert && (sex === '未知' || !birthday) && nowTimestamp > stamp) || false,
|
|
91
|
+
star_name,
|
|
92
|
+
name,
|
|
93
|
+
sex,
|
|
94
|
+
star_cid,
|
|
95
|
+
cid,
|
|
96
|
+
star_phone: phone ? phone.replace(pho, '$1****$2') : '',
|
|
97
|
+
phone,
|
|
98
|
+
authExpired
|
|
99
|
+
}, () => {
|
|
100
|
+
wx.hideLoading()
|
|
101
|
+
})
|
|
102
|
+
},
|
|
103
|
+
fail: () => {
|
|
104
|
+
wx.hideLoading()
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
// 显示换绑手机号码弹窗
|
|
110
|
+
showPhoneModal() {
|
|
111
|
+
if (!this.data.authExpired) {
|
|
112
|
+
// 上报事件
|
|
113
|
+
SDKTrack('function_btn_click', {
|
|
114
|
+
item_type: '9', // 业务分类
|
|
115
|
+
item_code: '110000000000511211993408000000', // 事项ID
|
|
116
|
+
item_access: '19', // 业务入口
|
|
117
|
+
})
|
|
118
|
+
this.setData({
|
|
119
|
+
phoneModal: true
|
|
120
|
+
})
|
|
121
|
+
} else {
|
|
122
|
+
wx.showToast({
|
|
123
|
+
title: '请先登录,再进行换绑手机号码操作',
|
|
124
|
+
icon: 'none',
|
|
125
|
+
duration: 3000
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
// 切换显隐
|
|
131
|
+
changeEye() {
|
|
132
|
+
this.setData({
|
|
133
|
+
showEye: !this.data.showEye
|
|
134
|
+
})
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
// 弹框确认
|
|
138
|
+
confirmPhoneModal() {
|
|
139
|
+
this.setData({
|
|
140
|
+
phoneModal: false
|
|
141
|
+
})
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
// 获取手机号码
|
|
145
|
+
async getPhoneNumberFun(e) {
|
|
146
|
+
const params = Object.assign(e.detail, {
|
|
147
|
+
source: '1'
|
|
148
|
+
})
|
|
149
|
+
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.loginPhone(params))
|
|
150
|
+
if (err) {
|
|
151
|
+
console.log(err, '换绑手机号码')
|
|
152
|
+
wx.showToast({
|
|
153
|
+
title: err.errmsg || '换绑失败,请稍后再试',
|
|
154
|
+
icon: 'none'
|
|
155
|
+
})
|
|
156
|
+
return
|
|
157
|
+
}
|
|
158
|
+
wx.showToast({
|
|
159
|
+
title: '换绑成功',
|
|
160
|
+
icon: 'none',
|
|
161
|
+
duration: 3000,
|
|
162
|
+
mask: true
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
// 登录成功回调 => 业务侧操作事项
|
|
166
|
+
wx.$_ServiceConfiguration && wx.$_ServiceConfiguration.methods && wx.$_ServiceConfiguration.methods._loginSuccessCallBack && wx.$_ServiceConfiguration.methods._loginSuccessCallBack(session)
|
|
167
|
+
|
|
168
|
+
let phone = session.phone
|
|
169
|
+
let pho = /(\d{3})\d*(\d{4})/
|
|
170
|
+
|
|
171
|
+
this.setData({
|
|
172
|
+
phone: wx.getStorageSync('tif.realPhone') || '',
|
|
173
|
+
star_phone: phone ? phone.replace(pho, '$1****$2') : ''
|
|
174
|
+
})
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
// 显示弹窗
|
|
178
|
+
showTip() {
|
|
179
|
+
this.setData({
|
|
180
|
+
showTipModal: true
|
|
181
|
+
})
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
// 关闭弹窗
|
|
185
|
+
handleCloseModal() {
|
|
186
|
+
this.setData({
|
|
187
|
+
showTipModal: false,
|
|
188
|
+
showSBModal: false,
|
|
189
|
+
showLeaveModal: false
|
|
190
|
+
})
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
// 关闭弹窗+记录10个自然日
|
|
194
|
+
handleFullInfoModalOk() {
|
|
195
|
+
this.setData({
|
|
196
|
+
showFullInfoModal: false
|
|
197
|
+
})
|
|
198
|
+
// 计算10个自然日后的时间戳
|
|
199
|
+
let nowTimestamp = Date.now()
|
|
200
|
+
let futureDate = new Date(nowTimestamp)
|
|
201
|
+
futureDate.setDate(futureDate.getDate() + 10)
|
|
202
|
+
let futureTimestamp = futureDate.getTime()
|
|
203
|
+
wx.setStorageSync('tif.fullInfoModalStamp', futureTimestamp)
|
|
204
|
+
},
|
|
205
|
+
|
|
206
|
+
// 性别
|
|
207
|
+
bindSexChange(e) {
|
|
208
|
+
const sexIndex = e.detail.value
|
|
209
|
+
this.setData({
|
|
210
|
+
sex: this.data.sexRangeZH[sexIndex].name,
|
|
211
|
+
sexIndex,
|
|
212
|
+
canSave: true
|
|
213
|
+
})
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
// 出生日期
|
|
217
|
+
bindBirthChange(e) {
|
|
218
|
+
this.setData({
|
|
219
|
+
birthday: e.detail.value,
|
|
220
|
+
canSave: true
|
|
221
|
+
})
|
|
222
|
+
},
|
|
223
|
+
|
|
224
|
+
// 保存信息
|
|
225
|
+
async toSave() {
|
|
226
|
+
const sex = this.data.sex
|
|
227
|
+
const birthday = this.data.birthday
|
|
228
|
+
if (sex === '未知') {
|
|
229
|
+
this.setData({
|
|
230
|
+
sbDesc: '您的性别信息尚未完善, ',
|
|
231
|
+
showSBModal: true
|
|
232
|
+
})
|
|
233
|
+
return
|
|
234
|
+
} else if (!birthday) {
|
|
235
|
+
this.setData({
|
|
236
|
+
sbDesc: '您的出生日期尚未完善, ',
|
|
237
|
+
showSBModal: true
|
|
238
|
+
})
|
|
239
|
+
return
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const [err, data] = await utils.awaitTo(jingtongVerifyRequest.updateSB({
|
|
243
|
+
sex: this.data.sexRangeZH[this.data.sexIndex].value || '',
|
|
244
|
+
birthday
|
|
245
|
+
}))
|
|
246
|
+
if (err) {
|
|
247
|
+
console.log(err, '保存信息')
|
|
248
|
+
wx.showToast({
|
|
249
|
+
title: err.errmsg || '保存失败,请稍后再试',
|
|
250
|
+
icon: 'none'
|
|
251
|
+
})
|
|
252
|
+
return
|
|
253
|
+
}
|
|
254
|
+
console.log('更新信息', data)
|
|
255
|
+
wx.showToast({
|
|
256
|
+
title: '保存成功',
|
|
257
|
+
icon: 'none',
|
|
258
|
+
duration: 2000,
|
|
259
|
+
mask: true
|
|
260
|
+
})
|
|
261
|
+
|
|
262
|
+
this.setData({
|
|
263
|
+
canSave: false
|
|
264
|
+
})
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
onBeforeLeave() {
|
|
268
|
+
console.log('监听到返回上一页', this.data.canSave)
|
|
269
|
+
// 返回上一页的逻辑处理
|
|
270
|
+
if (this.data.canSave) {
|
|
271
|
+
this.setData({
|
|
272
|
+
showLeaveModal: true
|
|
273
|
+
})
|
|
274
|
+
} else {
|
|
275
|
+
console.log('返回上一页')
|
|
276
|
+
this.setData({
|
|
277
|
+
showPage: false
|
|
278
|
+
}, () => {
|
|
279
|
+
setTimeout(() => {
|
|
280
|
+
wx.navigateBack()
|
|
281
|
+
}, 10)
|
|
282
|
+
})
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
toBack() {
|
|
287
|
+
this.setData({
|
|
288
|
+
showLeaveModal: false
|
|
289
|
+
}, () => {
|
|
290
|
+
setTimeout(() => {
|
|
291
|
+
wx.navigateBack()
|
|
292
|
+
}, 10)
|
|
293
|
+
})
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
stopBack() {
|
|
297
|
+
this.setData({
|
|
298
|
+
showLeaveModal: false,
|
|
299
|
+
showPage: true
|
|
300
|
+
})
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
preventSwipe() {
|
|
304
|
+
/* 空函数阻止默认滑动 */
|
|
305
|
+
console.log('空函数阻止默认滑动')
|
|
306
|
+
}
|
|
307
307
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"usingComponents": {
|
|
3
|
-
"my-modal": "../../components/my-modal/my-modal",
|
|
4
|
-
"tip-modal": "../../components/tip-modal/tip-modal"
|
|
5
|
-
},
|
|
6
|
-
"navigationBarTitleText": "个人信息维护",
|
|
7
|
-
"disableSwipeBack": true
|
|
1
|
+
{
|
|
2
|
+
"usingComponents": {
|
|
3
|
+
"my-modal": "../../components/my-modal/my-modal",
|
|
4
|
+
"tip-modal": "../../components/tip-modal/tip-modal"
|
|
5
|
+
},
|
|
6
|
+
"navigationBarTitleText": "个人信息维护",
|
|
7
|
+
"disableSwipeBack": true
|
|
8
8
|
}
|