weapps-plugin-jingtong-verify 1.6.0 → 1.6.2-beta
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/README.md +1 -1
- package/app.json +33 -41
- package/package.json +21 -21
- package/sdk.js +309 -320
- 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/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 +179 -182
- 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 +236 -241
- 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 +206 -214
- 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 +39 -47
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxml +9 -11
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxss +51 -51
- 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 +262 -403
- 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 +1558 -1812
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.json +17 -17
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxml +504 -522
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxss +133 -185
- 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-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/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 +120 -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 +864 -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 +328 -331
- 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/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 +1 -670
- package/weapps-plugin-jingtong-verify/utils/rules.js +301 -405
- package/weapps-plugin-jingtong-verify/utils/tifadmin_config.js +61 -61
- package/weapps-plugin-jingtong-verify/utils/validate.js +772 -910
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.js +0 -41
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.json +0 -4
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.wxml +0 -20
- package/weapps-plugin-jingtong-verify/components/custom-steps/custom-steps.wxss +0 -112
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.js +0 -73
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.json +0 -4
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.wxml +0 -19
- package/weapps-plugin-jingtong-verify/components/to-other-modal/to-other-modal.wxss +0 -72
- 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 +0 -506
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.json +0 -8
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.wxml +0 -79
- package/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login.wxss +0 -212
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.js +0 -1392
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.json +0 -10
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.wxml +0 -247
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting.wxss +0 -397
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-sms-setting/bank-card-login-forgot-sms-setting.js +0 -66
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-sms-setting/bank-card-login-forgot-sms-setting.wxml +0 -2
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.js +0 -463
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.json +0 -8
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.wxml +0 -69
- package/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting.wxss +0 -232
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.js +0 -984
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.json +0 -12
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.wxml +0 -157
- package/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.wxss +0 -258
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.js +0 -147
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.json +0 -4
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.wxml +0 -48
- package/weapps-plugin-jingtong-verify/pages/login-help/login-help.wxss +0 -166
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.js +0 -189
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.json +0 -4
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.wxml +0 -19
- package/weapps-plugin-jingtong-verify/pages/login-manage-setting/login-manage-setting.wxss +0 -69
- package/weapps-plugin-jingtong-verify/utils/constantVal.js +0 -75
- package/weapps-plugin-jingtong-verify/utils/md5.js +0 -184
|
@@ -1,1812 +1,1558 @@
|
|
|
1
|
-
// weapps-plugin-jingtong-verify/pages/face-verify/index.js
|
|
2
|
-
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
-
const utils = require("../../utils/index")
|
|
4
|
-
const { flow } = require("@wecity/weda-plugin-utils");
|
|
5
|
-
const rulesConfig = require("../../utils/rules")
|
|
6
|
-
import { SDKTrack, setAccountInfo } from '../../utils/QDTrackerNew/QDTrackerMain'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
//
|
|
47
|
-
{ name: '
|
|
48
|
-
|
|
49
|
-
{ name: '
|
|
50
|
-
{ name: '
|
|
51
|
-
|
|
52
|
-
{ name: '
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
{ name: '
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{ name: 'Keep me logged in for
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{ name: '
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
//
|
|
134
|
-
|
|
135
|
-
//
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
//
|
|
152
|
-
|
|
153
|
-
//
|
|
154
|
-
|
|
155
|
-
//
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
'
|
|
160
|
-
'
|
|
161
|
-
'
|
|
162
|
-
'
|
|
163
|
-
'
|
|
164
|
-
'
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
//
|
|
169
|
-
|
|
170
|
-
//
|
|
171
|
-
|
|
172
|
-
//
|
|
173
|
-
|
|
174
|
-
//
|
|
175
|
-
|
|
176
|
-
//
|
|
177
|
-
|
|
178
|
-
//
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
//
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
this.setData({
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
//
|
|
252
|
-
//
|
|
253
|
-
//
|
|
254
|
-
//
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
})
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
//
|
|
454
|
-
//
|
|
455
|
-
//
|
|
456
|
-
//
|
|
457
|
-
//
|
|
458
|
-
//
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
//
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
//
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
this.
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
if (
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
} else {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
})
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
})
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
this.setData({
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
if (valid.data) {
|
|
1560
|
-
first_name_flag = true
|
|
1561
|
-
} else {
|
|
1562
|
-
this.setData({
|
|
1563
|
-
first_name_state: {
|
|
1564
|
-
valid: false,
|
|
1565
|
-
msg
|
|
1566
|
-
}
|
|
1567
|
-
})
|
|
1568
|
-
first_name_flag = false
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
if (sur_name_flag && first_name_flag) {
|
|
1572
|
-
this.setData({
|
|
1573
|
-
sur_name_state: {
|
|
1574
|
-
valid: true,
|
|
1575
|
-
msg: ''
|
|
1576
|
-
},
|
|
1577
|
-
first_name_state: {
|
|
1578
|
-
valid: false,
|
|
1579
|
-
msg: ''
|
|
1580
|
-
}
|
|
1581
|
-
})
|
|
1582
|
-
}
|
|
1583
|
-
const valid = sur_name_flag && first_name_flag
|
|
1584
|
-
return {
|
|
1585
|
-
valid,
|
|
1586
|
-
msg: valid ? '' : msg
|
|
1587
|
-
}
|
|
1588
|
-
},
|
|
1589
|
-
async toBankCardLogin() {
|
|
1590
|
-
// 判断是否是PC端登录
|
|
1591
|
-
await this.getDevice()
|
|
1592
|
-
wx.showLoading({
|
|
1593
|
-
title: '验证中…',
|
|
1594
|
-
mask: true
|
|
1595
|
-
})
|
|
1596
|
-
// 验证是否在锁定期内,在的话,直接弹窗提示,并返回
|
|
1597
|
-
let bankCardFailTime = constantVal.getStorageWithExpire(constantVal.bank_card_verify_fail_time)
|
|
1598
|
-
if(bankCardFailTime){
|
|
1599
|
-
// 当前时间
|
|
1600
|
-
const now = Date.now()
|
|
1601
|
-
|
|
1602
|
-
// 判断是否在30分钟内(1小时 = 3600 * 1000 毫秒)
|
|
1603
|
-
const isWithinOneHour = (now - bankCardFailTime) < (30 * 60 * 1000)
|
|
1604
|
-
if(isWithinOneHour){
|
|
1605
|
-
console.log('当前仍在10分钟限制内')
|
|
1606
|
-
this.setData({
|
|
1607
|
-
showOtherWayTipModal: true
|
|
1608
|
-
})
|
|
1609
|
-
wx.showToast({
|
|
1610
|
-
title: '还存在银行卡验证失败锁定期内,请稍后再试',
|
|
1611
|
-
})
|
|
1612
|
-
return
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
// 身份二要素校验
|
|
1616
|
-
const { name, id_card_number } = this.data.formData
|
|
1617
|
-
const verifyIdCardParams = {
|
|
1618
|
-
"id_card_number": id_card_number,
|
|
1619
|
-
"name": name,
|
|
1620
|
-
"verify_type": "101",
|
|
1621
|
-
"support_type": "0x40"
|
|
1622
|
-
}
|
|
1623
|
-
jingtongVerifyRequest.verifyIdcard(verifyIdCardParams).then(res => {
|
|
1624
|
-
console.log('获取身份证二要素核验结果')
|
|
1625
|
-
console.log(res)
|
|
1626
|
-
if(res.errcode === 0){
|
|
1627
|
-
// 可进行
|
|
1628
|
-
} else {
|
|
1629
|
-
wx.showToast({
|
|
1630
|
-
title: res.errmsg,
|
|
1631
|
-
icon: 'none',
|
|
1632
|
-
duration: 2000
|
|
1633
|
-
})
|
|
1634
|
-
this.data.submitMode = ''
|
|
1635
|
-
this.data.isSubmitting = false
|
|
1636
|
-
return
|
|
1637
|
-
}
|
|
1638
|
-
wx.hideLoading()
|
|
1639
|
-
}).catch(error => {
|
|
1640
|
-
this.data.submitMode = ''
|
|
1641
|
-
this.data.isSubmitting = false
|
|
1642
|
-
return
|
|
1643
|
-
})
|
|
1644
|
-
// 验证手机号
|
|
1645
|
-
const infoCheckParam = {
|
|
1646
|
-
"id_card_number": id_card_number,
|
|
1647
|
-
"phone_number": ''
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
let isPhoneNumber = false
|
|
1651
|
-
jingtongVerifyRequest.getInfoCheck(infoCheckParam).then(res =>{
|
|
1652
|
-
const { errmsg, errcode } = res
|
|
1653
|
-
console.log(res)
|
|
1654
|
-
if(errcode === 0){
|
|
1655
|
-
if(res.data.phone_suffix){
|
|
1656
|
-
isPhoneNumber = false
|
|
1657
|
-
// 1:无密码和手机号,2:无密码有手机号,3:无手机号有密码
|
|
1658
|
-
this.setData({
|
|
1659
|
-
checkType:2
|
|
1660
|
-
})
|
|
1661
|
-
} else {
|
|
1662
|
-
isPhoneNumber = true
|
|
1663
|
-
// 1:无密码和手机号,2:无密码有手机号,3:无手机号有密码
|
|
1664
|
-
this.setData({
|
|
1665
|
-
checkType:3
|
|
1666
|
-
})
|
|
1667
|
-
}
|
|
1668
|
-
} else{
|
|
1669
|
-
isPhoneNumber = true
|
|
1670
|
-
}
|
|
1671
|
-
}).catch(error => {
|
|
1672
|
-
this.data.submitMode = ''
|
|
1673
|
-
this.data.isSubmitting = false
|
|
1674
|
-
return
|
|
1675
|
-
})
|
|
1676
|
-
jingtongVerifyRequest.checkPhonePwd(this.data.formData.id_card_number).then(res => {
|
|
1677
|
-
console.log(res)
|
|
1678
|
-
wx.hideLoading()
|
|
1679
|
-
const { errmsg, errcode } = res
|
|
1680
|
-
console.log(isPhoneNumber)
|
|
1681
|
-
console.log(!res.data.is_new)
|
|
1682
|
-
if (errcode === 0) {
|
|
1683
|
-
// isPhoneNumber 为true,即系没有手机号,res.data.is_new为true即系无密码
|
|
1684
|
-
if(isPhoneNumber && res.data.is_new){
|
|
1685
|
-
// 1:无密码和手机号,2:无密码有手机号,3:无手机号有密码
|
|
1686
|
-
this.setData({
|
|
1687
|
-
checkType: 1
|
|
1688
|
-
})
|
|
1689
|
-
wx.navigateTo({
|
|
1690
|
-
url: '/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify?id_card_number='+ this.data.formData.id_card_number
|
|
1691
|
-
+ '&cid_type=' + this.data.formData.cid_type
|
|
1692
|
-
+ '&name=' + this.data.formData.name
|
|
1693
|
-
+ '&strCid=' + this.data.formData.strCid
|
|
1694
|
-
+ '&verify_expire_time=' + this.data.formData.verify_expire_time
|
|
1695
|
-
+ '&checkType=' + this.data.checkType
|
|
1696
|
-
})
|
|
1697
|
-
} else if(isPhoneNumber && !res.data.is_new){
|
|
1698
|
-
// isPhoneNumber 为true,即系没有手机号,res.data.is_new为true即系无密码
|
|
1699
|
-
// 1:无密码和手机号,2:无密码有手机号,3:无手机号有密码
|
|
1700
|
-
this.setData({
|
|
1701
|
-
checkType: 3
|
|
1702
|
-
})
|
|
1703
|
-
wx.navigateTo({
|
|
1704
|
-
url: '/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify?id_card_number='+ this.data.formData.id_card_number
|
|
1705
|
-
+ '&cid_type=' + this.data.formData.cid_type
|
|
1706
|
-
+ '&name=' + this.data.formData.name
|
|
1707
|
-
+ '&strCid=' + this.data.formData.strCid
|
|
1708
|
-
+ '&verify_expire_time=' + this.data.formData.verify_expire_time
|
|
1709
|
-
+ '&checkType=' + this.data.checkType
|
|
1710
|
-
})
|
|
1711
|
-
} else if(!isPhoneNumber && res.data.is_new){
|
|
1712
|
-
// isPhoneNumber 为true,即系没有手机号,res.data.is_new为true即系无密码
|
|
1713
|
-
// 1:无密码和手机号,2:无密码有手机号,3:无手机号有密码
|
|
1714
|
-
this.setData({
|
|
1715
|
-
checkType: 2
|
|
1716
|
-
})
|
|
1717
|
-
wx.navigateTo({
|
|
1718
|
-
url: '/weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify?id_card_number='+ this.data.formData.id_card_number
|
|
1719
|
-
+ '&cid_type=' + this.data.formData.cid_type
|
|
1720
|
-
+ '&name=' + this.data.formData.name
|
|
1721
|
-
+ '&strCid=' + this.data.formData.strCid
|
|
1722
|
-
+ '&verify_expire_time=' + this.data.formData.verify_expire_time
|
|
1723
|
-
+ '&checkType=' + this.data.checkType
|
|
1724
|
-
})
|
|
1725
|
-
} else {
|
|
1726
|
-
wx.navigateTo({
|
|
1727
|
-
url: '/weapps-plugin-jingtong-verify/pages/bank-card-login/bank-card-login?cardNumber='
|
|
1728
|
-
+ this.data.formData.id_card_number
|
|
1729
|
-
+ '&cid_type=' + this.data.formData.cid_type
|
|
1730
|
-
+ '&name=' + this.data.formData.name
|
|
1731
|
-
+ '&strCid=' + this.data.formData.strCid
|
|
1732
|
-
+ '&verify_expire_time=' + this.data.formData.verify_expire_time
|
|
1733
|
-
})
|
|
1734
|
-
}
|
|
1735
|
-
wx.hideLoading()
|
|
1736
|
-
// 成功跳转后重置防重复点击标记
|
|
1737
|
-
this.data.isSubmitting = false
|
|
1738
|
-
} else {
|
|
1739
|
-
wx.showToast({
|
|
1740
|
-
title: errmsg,
|
|
1741
|
-
icon: 'none',
|
|
1742
|
-
duration: 2000,
|
|
1743
|
-
})
|
|
1744
|
-
// 出错时重置防重复点击标记
|
|
1745
|
-
this.data.isSubmitting = false
|
|
1746
|
-
}
|
|
1747
|
-
}).catch(error => {
|
|
1748
|
-
console.log('异常')
|
|
1749
|
-
console.log(error)
|
|
1750
|
-
const { errcode, errmsg } = error
|
|
1751
|
-
wx.showToast({
|
|
1752
|
-
title: errmsg,
|
|
1753
|
-
icon: 'none',
|
|
1754
|
-
duration: 2000,
|
|
1755
|
-
})
|
|
1756
|
-
// 出错时重置防重复点击标记
|
|
1757
|
-
this.data.isSubmitting = false
|
|
1758
|
-
})
|
|
1759
|
-
this.data.submitMode = ''
|
|
1760
|
-
this.data.isSubmitting = false
|
|
1761
|
-
},
|
|
1762
|
-
// 防重复点击的点击处理方法
|
|
1763
|
-
async handletoOther() {
|
|
1764
|
-
console.log('点击其他方式')
|
|
1765
|
-
|
|
1766
|
-
// 检查是否正在处理中
|
|
1767
|
-
if (this.data.isSubmitting) {
|
|
1768
|
-
console.log('正在处理中,请勿重复点击')
|
|
1769
|
-
wx.showToast({
|
|
1770
|
-
title: '正在处理中,请稍候...',
|
|
1771
|
-
icon: 'none',
|
|
1772
|
-
duration: 1500
|
|
1773
|
-
})
|
|
1774
|
-
return
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
// 立即设置处理状态,防止重复点击
|
|
1778
|
-
this.data.isSubmitting = true
|
|
1779
|
-
|
|
1780
|
-
try {
|
|
1781
|
-
console.log('跳转其他页面')
|
|
1782
|
-
// console.log(this.data.formData)
|
|
1783
|
-
// console.log(this.data.formData.name)
|
|
1784
|
-
// console.log(this.data.formData.id_card_number)
|
|
1785
|
-
// console.log(this.data.formData.cid_type)
|
|
1786
|
-
|
|
1787
|
-
// 方案B
|
|
1788
|
-
this.data.submitMode = 'other' // 设置来源标记
|
|
1789
|
-
const form = this.selectComponent('#form')
|
|
1790
|
-
if (form && typeof form.handleSubmit === 'function') {
|
|
1791
|
-
// 触发表单的内置校验流程,结果会回调到 handleFormSubmit
|
|
1792
|
-
form.handleSubmit()
|
|
1793
|
-
// 注意:这里不重置 isSubmitting,等待 handleFormSubmit 中的处理完成
|
|
1794
|
-
} else {
|
|
1795
|
-
wx.showToast({ title: '表单未就绪,请稍后再试', icon: 'none' })
|
|
1796
|
-
// 表单未就绪时立即重置状态
|
|
1797
|
-
this.data.isSubmitting = false
|
|
1798
|
-
}
|
|
1799
|
-
} catch (error) {
|
|
1800
|
-
console.error('handletoOther 执行出错:', error)
|
|
1801
|
-
// 出错时重置状态
|
|
1802
|
-
this.data.isSubmitting = false
|
|
1803
|
-
}
|
|
1804
|
-
},
|
|
1805
|
-
handletoLoginHelp () {
|
|
1806
|
-
console.log('点击登录帮助')
|
|
1807
|
-
console.log('跳转其他页面')
|
|
1808
|
-
wx.navigateTo({
|
|
1809
|
-
url: '/weapps-plugin-jingtong-verify/pages/login-help/login-help',
|
|
1810
|
-
})
|
|
1811
|
-
}
|
|
1812
|
-
})
|
|
1
|
+
// weapps-plugin-jingtong-verify/pages/face-verify/index.js
|
|
2
|
+
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
+
const utils = require("../../utils/index")
|
|
4
|
+
const { flow } = require("@wecity/weda-plugin-utils");
|
|
5
|
+
const rulesConfig = require("../../utils/rules")
|
|
6
|
+
import { SDKTrack, setAccountInfo } from '../../utils/QDTrackerNew/QDTrackerMain'
|
|
7
|
+
let cidType = '111'
|
|
8
|
+
let Nation = 'CHN'
|
|
9
|
+
|
|
10
|
+
Page({
|
|
11
|
+
/**
|
|
12
|
+
* 页面的初始数据
|
|
13
|
+
*/
|
|
14
|
+
data: {
|
|
15
|
+
language: 'zh_CN', // 语言环境:默认中文
|
|
16
|
+
formData: {
|
|
17
|
+
cid_type: '111', // 证件类型
|
|
18
|
+
strName: '', // 身份证姓名(脱敏)
|
|
19
|
+
name: '',
|
|
20
|
+
strCid: '', // 身份证号码(脱敏)
|
|
21
|
+
id_card_number: '', // 证件号码
|
|
22
|
+
strBankCount: '', // 银行卡卡号(脱敏)
|
|
23
|
+
bank_account: '',
|
|
24
|
+
nation: 'CHN', // 国籍
|
|
25
|
+
nation_name: '中国',
|
|
26
|
+
sur_name: '', // 姓
|
|
27
|
+
first_name: '', // 名
|
|
28
|
+
sur_name_en: '', // 姓(国外护照)
|
|
29
|
+
first_name_en: '', // 名(国外护照)
|
|
30
|
+
sex: '', // 性别
|
|
31
|
+
birthday: '', // 出生日期
|
|
32
|
+
cid_expire_date: '', // 护照有效期
|
|
33
|
+
validity_period: '', // 证件生效日期
|
|
34
|
+
passport_number: '', // 通行证号码
|
|
35
|
+
phone: '',
|
|
36
|
+
verify_expire_time: '', // 登录有效期
|
|
37
|
+
agree: false,
|
|
38
|
+
isbind: 1,
|
|
39
|
+
sbSwitch: true
|
|
40
|
+
},
|
|
41
|
+
needUnite: '', // 是否需要串联起来
|
|
42
|
+
agreeInfo: '我同意北京市大数据中心使用我所提交的信息注册京通小程序,以及登录北京市统一身份认证平台,以便使用京通相关服务。',
|
|
43
|
+
cidTypeRange: [
|
|
44
|
+
// 微信人脸识别
|
|
45
|
+
{ name: '中华人民共和国居民身份证', value: '111' },
|
|
46
|
+
// 移民局接口
|
|
47
|
+
{ name: '港澳居民来往内地通行证', value: '516' },
|
|
48
|
+
{ name: '台湾居民来往大陆通行证', value: '511' },
|
|
49
|
+
{ name: '外国人永久居留身份证', value: '553' },
|
|
50
|
+
{ name: '华侨护照(国内签发)', value: '414' },
|
|
51
|
+
// 银行卡接口
|
|
52
|
+
{ name: '港澳居民居住证', value: '17' },
|
|
53
|
+
{ name: '台湾居民居住证', value: '18' },
|
|
54
|
+
// 外国护照
|
|
55
|
+
{ name: 'International passport', value: '700' }
|
|
56
|
+
],
|
|
57
|
+
sexRange: [
|
|
58
|
+
{ name: 'Male', value: 1 },
|
|
59
|
+
{ name: 'Female', value: 2 }
|
|
60
|
+
],
|
|
61
|
+
sexRangeZH: [
|
|
62
|
+
{ name: '男', value: 1 },
|
|
63
|
+
{ name: '女', value: 2 }
|
|
64
|
+
],
|
|
65
|
+
loginTimeRangeEn: [
|
|
66
|
+
{ name: 'Keep me logged in for 1 day', value: 24 },
|
|
67
|
+
{ name: 'Keep me logged in for 7 days', value: 168 },
|
|
68
|
+
{ name: 'Keep me logged in for 30 days', value: 720 }
|
|
69
|
+
],
|
|
70
|
+
loginTimeRange: [
|
|
71
|
+
{ name: '1天免登录', value: 24 },
|
|
72
|
+
{ name: '7天免登录', value: 168 },
|
|
73
|
+
{ name: '30天免登录', value: 720 }
|
|
74
|
+
],
|
|
75
|
+
validateType: {
|
|
76
|
+
id_card_number(value) {
|
|
77
|
+
return utils.validate.checkCid(value, cidType, Nation).data
|
|
78
|
+
},
|
|
79
|
+
name(value) {
|
|
80
|
+
return utils.validate.checkName(value, cidType).data
|
|
81
|
+
},
|
|
82
|
+
sur_name(value) {
|
|
83
|
+
return utils.validate.checkName(value, cidType).data
|
|
84
|
+
},
|
|
85
|
+
first_name(value) {
|
|
86
|
+
return utils.validate.checkName(value, cidType).data
|
|
87
|
+
},
|
|
88
|
+
passport_number(value) {
|
|
89
|
+
return utils.validate.checkHmtPassport(value, cidType, Nation).data
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
rulesMap: {
|
|
93
|
+
'111': {
|
|
94
|
+
currentAuthType: 'wxFace',
|
|
95
|
+
rules: rulesConfig.chinaRules('zh_CN')
|
|
96
|
+
},
|
|
97
|
+
'516': {
|
|
98
|
+
currentAuthType: 'faceReceptionAuth',
|
|
99
|
+
rules: rulesConfig.HMORules('zh_CN')
|
|
100
|
+
},
|
|
101
|
+
'511': {
|
|
102
|
+
currentAuthType: 'faceReceptionAuth',
|
|
103
|
+
rules: rulesConfig.HMORules('zh_CN')
|
|
104
|
+
},
|
|
105
|
+
'553': {
|
|
106
|
+
currentAuthType: 'faceReceptionAuth',
|
|
107
|
+
rules: rulesConfig.residenceRules('zh_CN')
|
|
108
|
+
},
|
|
109
|
+
'414': {
|
|
110
|
+
currentAuthType: 'faceReceptionAuth',
|
|
111
|
+
rules: rulesConfig.HMORules('zh_CN')
|
|
112
|
+
},
|
|
113
|
+
'17': {
|
|
114
|
+
currentAuthType: 'faceReceptionAuth',
|
|
115
|
+
// rules: rulesConfig.cardRules('zh_CN'),
|
|
116
|
+
rules: rulesConfig.residenceAuthRules('zh_CN'),
|
|
117
|
+
tip: '请填写本人在办理银联银行卡时登记的姓名、港澳居民居住证证件号、手机号、银行卡号。'
|
|
118
|
+
},
|
|
119
|
+
'18': {
|
|
120
|
+
currentAuthType: 'faceReceptionAuth',
|
|
121
|
+
// rules: rulesConfig.cardRules('zh_CN'),
|
|
122
|
+
rules: rulesConfig.residenceAuthRules('zh_CN'),
|
|
123
|
+
tip: '请填写本人在办理银联银行卡时登记的姓名、台湾居民居住证证件号、手机号、银行卡号。'
|
|
124
|
+
},
|
|
125
|
+
'700': {
|
|
126
|
+
currentAuthType: 'ForeignPassortAuth',
|
|
127
|
+
rules: rulesConfig.ForeignPassortRules('en')
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
rules: rulesConfig.chinaRules('zh_CN'),
|
|
131
|
+
// 核验类别
|
|
132
|
+
currentAuthType: 'wxFace',
|
|
133
|
+
// 打开文档的防抖操作
|
|
134
|
+
canOpenPdf: true,
|
|
135
|
+
// 外国人护照核验状态 '1'(通过) '4'(审核中) ''(无审核单) 其它值(审核失败)
|
|
136
|
+
passportAuthStatus: '',
|
|
137
|
+
passportAuthPersonCode: '',
|
|
138
|
+
// 核验单数据
|
|
139
|
+
passportOldData: {},
|
|
140
|
+
// 弹窗
|
|
141
|
+
showModal: false,
|
|
142
|
+
modalStatus: 'info',
|
|
143
|
+
// 定义日期边界值
|
|
144
|
+
birthdayMaxDate: [new Date().getFullYear(), (new Date().getMonth() + 1), new Date().getDate()],
|
|
145
|
+
cidExpireMinDate: [new Date().getFullYear(), (new Date().getMonth() + 1), new Date().getDate()],
|
|
146
|
+
// 老/小6次、成人3次 人脸报错提示弹窗
|
|
147
|
+
showFaceModal: false,
|
|
148
|
+
isKidsOrOld: false,
|
|
149
|
+
// 老/小18次、成人6次 人脸报错提示弹窗
|
|
150
|
+
showLockFaceModal: false,
|
|
151
|
+
// 银行卡认证弹窗
|
|
152
|
+
showCardModal: false,
|
|
153
|
+
// 姓名和证件号码弹窗
|
|
154
|
+
showTipModal: false,
|
|
155
|
+
// cidType转化为certType
|
|
156
|
+
certTypeMap: {
|
|
157
|
+
'111': 1,
|
|
158
|
+
'516': 78,
|
|
159
|
+
'511': 4,
|
|
160
|
+
'17': 5,
|
|
161
|
+
'18': 6,
|
|
162
|
+
'414': 2,
|
|
163
|
+
'553': 9,
|
|
164
|
+
'700': 3
|
|
165
|
+
},
|
|
166
|
+
// 记录是否已经登录成功
|
|
167
|
+
hadSuccessLogin: false,
|
|
168
|
+
// 该操作会触发小程序的销毁回调
|
|
169
|
+
exitedState: true,
|
|
170
|
+
// 扫脸失败温馨提示弹窗
|
|
171
|
+
faceErrorModal: false,
|
|
172
|
+
// 扫脸失败原因
|
|
173
|
+
faceErrorType: '2',
|
|
174
|
+
// 标记港澳居民来往内地通行证存在回显的session信息
|
|
175
|
+
// exitHmSession: false,
|
|
176
|
+
// HmSession: {}
|
|
177
|
+
showForeignTip: false,
|
|
178
|
+
// (国外)surname自定义校验状态,傻逼数广傻逼组件逼的
|
|
179
|
+
sur_name_state: {
|
|
180
|
+
valid: true,
|
|
181
|
+
msg: ''
|
|
182
|
+
},
|
|
183
|
+
// (国外)givenName自定义校验状态,傻逼数广傻逼组件逼的
|
|
184
|
+
first_name_state: {
|
|
185
|
+
valid: true,
|
|
186
|
+
msg: ''
|
|
187
|
+
},
|
|
188
|
+
// 是否显示自定义校验提示
|
|
189
|
+
showCustomTips: false,
|
|
190
|
+
// 自定义校验提示文本
|
|
191
|
+
customTipsMsg: ''
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* 生命周期函数--监听页面加载
|
|
196
|
+
*/
|
|
197
|
+
onLoad(options) {
|
|
198
|
+
console.log('onLoad', options)
|
|
199
|
+
this.setData({
|
|
200
|
+
needUnite: options.needUnite || 'true'
|
|
201
|
+
})
|
|
202
|
+
|
|
203
|
+
// 初始化操作,回填证件类型为身份证的身份信息
|
|
204
|
+
this.initUserInfo()
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
// 初始化操作,回填证件类型为身份证的身份信息
|
|
208
|
+
initUserInfo() {
|
|
209
|
+
// 默认身份证号码
|
|
210
|
+
cidType = '111'
|
|
211
|
+
|
|
212
|
+
wx.showLoading({
|
|
213
|
+
title: '加载中…',
|
|
214
|
+
})
|
|
215
|
+
// 清空本地Temp数据
|
|
216
|
+
wx.setStorageSync('tif.formDataTemp', '')
|
|
217
|
+
|
|
218
|
+
jingtongVerifyRequest.getSession({
|
|
219
|
+
success: res => {
|
|
220
|
+
let { cid_type, cid, name, star_name, star_cid, verify_expire_time } = res
|
|
221
|
+
|
|
222
|
+
// 设置用户账号信息
|
|
223
|
+
setAccountInfo(res.openid)
|
|
224
|
+
|
|
225
|
+
const hideForeignTip = wx.getStorageSync('tif.hideForeignTip') || 0
|
|
226
|
+
console.log('hideForeignTip', hideForeignTip)
|
|
227
|
+
if (!cid && hideForeignTip !== '1') {
|
|
228
|
+
this.setData({
|
|
229
|
+
showForeignTip: true
|
|
230
|
+
})
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (cid_type === '111' && cid && name) {
|
|
234
|
+
// 回填身份证类型
|
|
235
|
+
this.setData({
|
|
236
|
+
'formData.strName': star_name,
|
|
237
|
+
'formData.name': name,
|
|
238
|
+
'formData.strCid': star_cid,
|
|
239
|
+
'formData.id_card_number': cid,
|
|
240
|
+
'formData.cid_type': cid_type,
|
|
241
|
+
'formData.verify_expire_time': verify_expire_time || ''
|
|
242
|
+
})
|
|
243
|
+
}
|
|
244
|
+
// if (cid_type === '516') {
|
|
245
|
+
// this.setData({
|
|
246
|
+
// exitHmSession: true,
|
|
247
|
+
// HmSession: res
|
|
248
|
+
// })
|
|
249
|
+
// console.log('HmSession', this.data.HmSession)
|
|
250
|
+
// } else {
|
|
251
|
+
// this.setData({
|
|
252
|
+
// exitHmSession: false
|
|
253
|
+
// })
|
|
254
|
+
// }
|
|
255
|
+
wx.hideLoading()
|
|
256
|
+
},
|
|
257
|
+
fail: fail => {
|
|
258
|
+
console.log('getSession-fail', fail)
|
|
259
|
+
wx.hideLoading()
|
|
260
|
+
}
|
|
261
|
+
})
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
// 生命周期函数--监听页面显示
|
|
265
|
+
onShow: function () {
|
|
266
|
+
wx.hideShareMenu()
|
|
267
|
+
|
|
268
|
+
// 获取国籍
|
|
269
|
+
let pages = getCurrentPages()
|
|
270
|
+
let currentPage = pages[pages.length - 1]
|
|
271
|
+
let hadChoseNation = currentPage.data.hadChoseNation || false
|
|
272
|
+
|
|
273
|
+
if (hadChoseNation) {
|
|
274
|
+
let cid_type = currentPage.data.formData.cid_type
|
|
275
|
+
// 回传数据
|
|
276
|
+
this.reFullFormDataTemp(cid_type)
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
// 三证照:港澳通行证、台湾通行证、华侨护照
|
|
281
|
+
matchOptionsRule () {
|
|
282
|
+
let { cid_type, nation, sbSwitch } = this.data.formData
|
|
283
|
+
Nation = nation
|
|
284
|
+
|
|
285
|
+
if (cid_type === '516' || cid_type === '511' || cid_type === '414') {
|
|
286
|
+
if (nation !== 'CHN' && cid_type === '516') {
|
|
287
|
+
// 港澳通行证-外籍
|
|
288
|
+
this.setData({
|
|
289
|
+
rules: rulesConfig.HMPassRulesForeign('zh_CN')
|
|
290
|
+
})
|
|
291
|
+
} else if (sbSwitch) {
|
|
292
|
+
// 姓名、出生日期必填
|
|
293
|
+
this.setData({
|
|
294
|
+
rules: rulesConfig.HMORulesMore('zh_CN')
|
|
295
|
+
})
|
|
296
|
+
} else {
|
|
297
|
+
// 姓名、出生日期非必填
|
|
298
|
+
this.setData({
|
|
299
|
+
rules: rulesConfig.HMORules('zh_CN')
|
|
300
|
+
})
|
|
301
|
+
}
|
|
302
|
+
console.log('三证照正则', this.data.rules)
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
// 年龄≤18岁或年龄≥60岁的用户
|
|
307
|
+
isCarePeople(age) {
|
|
308
|
+
return age <= 18 || age >= 60
|
|
309
|
+
},
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* 获取/设置人脸失败次数
|
|
313
|
+
* @param {*} count
|
|
314
|
+
* count:true 设置次数+1
|
|
315
|
+
* count:false 获取次数
|
|
316
|
+
*/
|
|
317
|
+
fetchFaceFailCount(count, errCode) {
|
|
318
|
+
const { id_card_number: cid } = this.data.formData
|
|
319
|
+
const age = utils.parseIDCard(cid).age
|
|
320
|
+
const isKidsOrOld = this.isCarePeople(age) || false
|
|
321
|
+
console.log('获取/设置人脸失败', count)
|
|
322
|
+
console.log('年龄', age)
|
|
323
|
+
console.log('是否是老人/小孩', isKidsOrOld)
|
|
324
|
+
|
|
325
|
+
this.setData({
|
|
326
|
+
isKidsOrOld
|
|
327
|
+
})
|
|
328
|
+
|
|
329
|
+
return new Promise((resolve, reject) => {
|
|
330
|
+
jingtongVerifyRequest.operateFaceFailCount({
|
|
331
|
+
count,
|
|
332
|
+
cid,
|
|
333
|
+
age
|
|
334
|
+
}).then(res => {
|
|
335
|
+
console.log('获取人脸失败次数res', res)
|
|
336
|
+
const times = Number(res.times) || 0
|
|
337
|
+
|
|
338
|
+
// 老人/小孩:累计刷脸失败6次后,弹长窗提示
|
|
339
|
+
if (count && isKidsOrOld && times === 6) {
|
|
340
|
+
console.log('==============老人/小孩 -- 累计刷脸失败6次:弹长窗===============')
|
|
341
|
+
this.setData({
|
|
342
|
+
showFaceModal: true
|
|
343
|
+
})
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// 成人:累计刷脸失败3次后,弹长窗提示
|
|
347
|
+
if (count && !isKidsOrOld && times === 3) {
|
|
348
|
+
console.log('==============成人 -- 累计刷脸失败3次:弹长窗===============')
|
|
349
|
+
this.setData({
|
|
350
|
+
showFaceModal: true
|
|
351
|
+
})
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// 老/小18次、成人6次 锁定人脸
|
|
355
|
+
if (isKidsOrOld && times >= 18) {
|
|
356
|
+
console.log('==============老人/小孩 -- 累计刷脸失败18次:弹短窗===============')
|
|
357
|
+
wx.hideLoading()
|
|
358
|
+
this.setData({
|
|
359
|
+
showLockFaceModal: true
|
|
360
|
+
})
|
|
361
|
+
// 人脸识别异常温馨提示弹窗
|
|
362
|
+
count && this.handleFaceError(errCode)
|
|
363
|
+
return
|
|
364
|
+
} else if (!isKidsOrOld && times >= 6) {
|
|
365
|
+
console.log('==============成人 -- 累计刷脸失败6次:弹短窗===============')
|
|
366
|
+
wx.hideLoading()
|
|
367
|
+
this.setData({
|
|
368
|
+
showLockFaceModal: true
|
|
369
|
+
})
|
|
370
|
+
// 人脸识别异常温馨提示弹窗
|
|
371
|
+
count && this.handleFaceError(errCode)
|
|
372
|
+
return
|
|
373
|
+
}
|
|
374
|
+
resolve()
|
|
375
|
+
}).catch(err => {
|
|
376
|
+
console.log(err, '获取人脸失败次数err')
|
|
377
|
+
wx.showToast({
|
|
378
|
+
title: '初始化有误,请稍后再试',
|
|
379
|
+
icon: 'none'
|
|
380
|
+
})
|
|
381
|
+
reject()
|
|
382
|
+
})
|
|
383
|
+
})
|
|
384
|
+
},
|
|
385
|
+
|
|
386
|
+
// 判断是否是PC端登录
|
|
387
|
+
getDevice() {
|
|
388
|
+
return new Promise((resolve, reject) => {
|
|
389
|
+
const systemInfo = wx.getDeviceInfo();
|
|
390
|
+
console.log('systemInfo', systemInfo)
|
|
391
|
+
if (['windows', 'mac'].includes(systemInfo.platform)) {
|
|
392
|
+
console.log('当前为电脑端微信');
|
|
393
|
+
wx.showToast({
|
|
394
|
+
title: '请您使用移动端京通小程序',
|
|
395
|
+
icon: 'none',
|
|
396
|
+
duration: 3000
|
|
397
|
+
})
|
|
398
|
+
return
|
|
399
|
+
} else {
|
|
400
|
+
console.log('当前为手机端');
|
|
401
|
+
resolve()
|
|
402
|
+
}
|
|
403
|
+
})
|
|
404
|
+
},
|
|
405
|
+
|
|
406
|
+
// 根据证件类型匹配校验正则和校验类型
|
|
407
|
+
toMatchRules() {
|
|
408
|
+
let { cid_type, nation, nation_name } = this.data.formData
|
|
409
|
+
let { rules, currentAuthType } = this.data.rulesMap[cid_type]
|
|
410
|
+
console.log('核验源', currentAuthType)
|
|
411
|
+
Nation = nation
|
|
412
|
+
// 默认【中国】
|
|
413
|
+
if (cid_type === '516' || cid_type === '511' || cid_type === '414') {
|
|
414
|
+
nation = 'CHN'
|
|
415
|
+
nation_name = 'CHN-中国'
|
|
416
|
+
}
|
|
417
|
+
this.setData({
|
|
418
|
+
rules,
|
|
419
|
+
currentAuthType,
|
|
420
|
+
'formData.nation': nation,
|
|
421
|
+
'formData.nation_name': nation_name,
|
|
422
|
+
}, () => {
|
|
423
|
+
wx.hideLoading()
|
|
424
|
+
})
|
|
425
|
+
console.log('匹配到的正则', rules, currentAuthType)
|
|
426
|
+
},
|
|
427
|
+
|
|
428
|
+
// 选择完国籍或认证失败后回传 -- 回传本地临时存储用户表单信息
|
|
429
|
+
reFullFormDataTemp(cid_type) {
|
|
430
|
+
const formDataTemp = wx.getStorageSync('tif.formDataTemp') || {}
|
|
431
|
+
let formDataOld = this.data.formData
|
|
432
|
+
|
|
433
|
+
if (formDataTemp && formDataTemp[cid_type]) {
|
|
434
|
+
console.log('存在可回填的temp数据', formDataTemp[cid_type])
|
|
435
|
+
let formData = Object.assign(formDataOld, formDataTemp[cid_type])
|
|
436
|
+
Nation = formData.nation
|
|
437
|
+
// 国外护照,回填名字
|
|
438
|
+
if (cid_type === '700') {
|
|
439
|
+
formData.sur_name_en = formData.sur_name
|
|
440
|
+
formData.first_name_en = formData.first_name
|
|
441
|
+
}
|
|
442
|
+
this.setData({
|
|
443
|
+
formData
|
|
444
|
+
})
|
|
445
|
+
}
|
|
446
|
+
// else if (cid_type === '516' && this.data.exitHmSession) {
|
|
447
|
+
// console.log('存在可回显的HM数据', this.data.HmSession)
|
|
448
|
+
// const { star_name, name, star_cid, cid, verify_expire_time, nation } = this.data.HmSession
|
|
449
|
+
// this.setData({
|
|
450
|
+
// 'formData.strName': star_name,
|
|
451
|
+
// 'formData.name': name,
|
|
452
|
+
// 'formData.strCid': star_cid,
|
|
453
|
+
// 'formData.id_card_number': cid,
|
|
454
|
+
// 'formData.verify_expire_time': verify_expire_time || '',
|
|
455
|
+
// 'formData.nation': nation
|
|
456
|
+
// })
|
|
457
|
+
// }
|
|
458
|
+
// 处理三证照的正则问题
|
|
459
|
+
this.matchOptionsRule()
|
|
460
|
+
},
|
|
461
|
+
|
|
462
|
+
// 同意协议和隐私政策
|
|
463
|
+
viewPrivacy(e) {
|
|
464
|
+
// 临时存储表单数据
|
|
465
|
+
this.saveFormDataTemp()
|
|
466
|
+
// 错误触发销毁回调函数处理
|
|
467
|
+
this.handleExitedState()
|
|
468
|
+
|
|
469
|
+
let canOpenPdf = this.data.canOpenPdf
|
|
470
|
+
if (canOpenPdf) {
|
|
471
|
+
this.setData({
|
|
472
|
+
canOpenPdf: false
|
|
473
|
+
})
|
|
474
|
+
let { name, file } = e.currentTarget.dataset
|
|
475
|
+
console.log('文件地址', `https://js.jt.beijing.gov.cn/jt/tiffile/${file}.pdf`)
|
|
476
|
+
utils.openDoc({
|
|
477
|
+
url: `https://js.jt.beijing.gov.cn/jt/tiffile/${file}.pdf`,
|
|
478
|
+
fileType: 'pdf',
|
|
479
|
+
name,
|
|
480
|
+
successFn: () => {
|
|
481
|
+
console.log('文档打开成功回调')
|
|
482
|
+
setTimeout(() => {
|
|
483
|
+
this.setData({
|
|
484
|
+
canOpenPdf: true
|
|
485
|
+
})
|
|
486
|
+
}, 500)
|
|
487
|
+
}
|
|
488
|
+
})
|
|
489
|
+
} else {
|
|
490
|
+
setTimeout(() => {
|
|
491
|
+
this.setData({
|
|
492
|
+
canOpenPdf: true
|
|
493
|
+
})
|
|
494
|
+
}, 3500)
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
|
|
498
|
+
// 选择事件
|
|
499
|
+
handleChange(e) {
|
|
500
|
+
let value = e.detail.value
|
|
501
|
+
let formId = e.target.id
|
|
502
|
+
|
|
503
|
+
// 删除前后空格
|
|
504
|
+
if (typeof value === 'string' && formId !== 'cid_type') {
|
|
505
|
+
value = value.trim()
|
|
506
|
+
console.log('==删除前后空格==', value, '==删除前后空格==')
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
let starId = e.target.dataset.star
|
|
510
|
+
// 切换“证件类型”
|
|
511
|
+
let oldCidType = this.data.formData.cid_type
|
|
512
|
+
if (formId === 'cid_type' && oldCidType !== value) {
|
|
513
|
+
cidType = value
|
|
514
|
+
wx.showLoading({
|
|
515
|
+
title: '加载中…',
|
|
516
|
+
})
|
|
517
|
+
|
|
518
|
+
// 若是港澳台,则证件类别默认为居住证核验
|
|
519
|
+
if (value == 17 || value == 18) {
|
|
520
|
+
this.setData({
|
|
521
|
+
currentAuthType: 'faceReceptionAuth',
|
|
522
|
+
rules: rulesConfig.residenceAuthRules('zh_CN')
|
|
523
|
+
})
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// 语言环境
|
|
527
|
+
this.setData({
|
|
528
|
+
language: value === '700' ? 'en' : 'zh_CN'
|
|
529
|
+
})
|
|
530
|
+
|
|
531
|
+
// 临时存储用户填写的表单信息、是否需要回显
|
|
532
|
+
this.saveFormDataTemp(true, value, oldCidType)
|
|
533
|
+
} else {
|
|
534
|
+
// 临时存储表单数据
|
|
535
|
+
this.saveFormDataTemp()
|
|
536
|
+
|
|
537
|
+
this.setData({
|
|
538
|
+
[`formData.${formId}`]: value
|
|
539
|
+
})
|
|
540
|
+
if (starId) {
|
|
541
|
+
this.setData({
|
|
542
|
+
[`formData.${starId}`]: ''
|
|
543
|
+
})
|
|
544
|
+
}
|
|
545
|
+
if (['sur_name_en', 'first_name_en'].includes(formId)) {
|
|
546
|
+
this.validateFullname()
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
|
|
551
|
+
// 临时存储用户填写的表单信息
|
|
552
|
+
saveFormDataTemp(needFull = false, newCidType = '', oldCidType = '') {
|
|
553
|
+
console.log('临时存储用户填写的表单信息', needFull, newCidType, oldCidType)
|
|
554
|
+
let {
|
|
555
|
+
formData
|
|
556
|
+
} = this.data
|
|
557
|
+
|
|
558
|
+
let formDataTemp = wx.getStorageSync('tif.formDataTemp') || {}
|
|
559
|
+
formDataTemp[formData.cid_type] = formData
|
|
560
|
+
wx.setStorageSync('tif.formDataTemp', formDataTemp)
|
|
561
|
+
if (needFull) {
|
|
562
|
+
// 是否需要回传
|
|
563
|
+
Nation = ''
|
|
564
|
+
this.setData({
|
|
565
|
+
formData: {
|
|
566
|
+
cid_type: newCidType,
|
|
567
|
+
name: '',
|
|
568
|
+
id_card_number: '',
|
|
569
|
+
bank_account: '',
|
|
570
|
+
nation: '',
|
|
571
|
+
nation_name: '',
|
|
572
|
+
sur_name: '',
|
|
573
|
+
first_name: '',
|
|
574
|
+
sur_name_en: '',
|
|
575
|
+
first_name_en: '',
|
|
576
|
+
sex: '',
|
|
577
|
+
birthday: '',
|
|
578
|
+
cid_expire_date: '',
|
|
579
|
+
validity_period: '',
|
|
580
|
+
passport_number: '',
|
|
581
|
+
phone: '',
|
|
582
|
+
verify_expire_time: '',
|
|
583
|
+
sbSwitch: true,
|
|
584
|
+
agree: false,
|
|
585
|
+
isbind: 1
|
|
586
|
+
}
|
|
587
|
+
})
|
|
588
|
+
if (newCidType === '700') {
|
|
589
|
+
// 获取外国护照核验结果
|
|
590
|
+
this.fetchPassortAuthResult()
|
|
591
|
+
} else {
|
|
592
|
+
// 回传 Temp => Success => 空
|
|
593
|
+
this.restartInitChange(newCidType)
|
|
594
|
+
}
|
|
595
|
+
wx.hideLoading()
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
|
|
599
|
+
// 回传 Temp => Success => 空
|
|
600
|
+
restartInitChange(cid_type) {
|
|
601
|
+
console.log('根据证件类型匹配校验正则,回填本地Temp数据')
|
|
602
|
+
wx.showLoading({
|
|
603
|
+
title: '加载中…',
|
|
604
|
+
})
|
|
605
|
+
// 根据证件类型匹配校验正则
|
|
606
|
+
this.toMatchRules()
|
|
607
|
+
// 数据回传
|
|
608
|
+
this.reFullFormDataTemp(cid_type)
|
|
609
|
+
},
|
|
610
|
+
|
|
611
|
+
// 获取外国人护照核验结果、是否需要返回状态
|
|
612
|
+
fetchPassortAuthResult(needStatus = false) {
|
|
613
|
+
// 根据证件类型匹配校验正则
|
|
614
|
+
!needStatus && this.toMatchRules()
|
|
615
|
+
let formData = this.data.formData
|
|
616
|
+
|
|
617
|
+
return new Promise((resolve) => {
|
|
618
|
+
jingtongVerifyRequest.getPassportInfo({
|
|
619
|
+
success: res => {
|
|
620
|
+
console.log('外国人护照核验接口获取成功', res)
|
|
621
|
+
|
|
622
|
+
this.setData({
|
|
623
|
+
passportAuthStatus: res.status,
|
|
624
|
+
passportAuthPersonCode: res.person_code
|
|
625
|
+
})
|
|
626
|
+
|
|
627
|
+
if (needStatus) {
|
|
628
|
+
// 需要返回状态
|
|
629
|
+
resolve(res.status)
|
|
630
|
+
} else {
|
|
631
|
+
let {
|
|
632
|
+
id_card_number,
|
|
633
|
+
nation,
|
|
634
|
+
sur_name,
|
|
635
|
+
first_name,
|
|
636
|
+
sex,
|
|
637
|
+
birthday,
|
|
638
|
+
cid_expire_date,
|
|
639
|
+
phone,
|
|
640
|
+
verify_expire_time,
|
|
641
|
+
nation_name
|
|
642
|
+
} = res
|
|
643
|
+
let passportOldData = {
|
|
644
|
+
id_card_number,
|
|
645
|
+
nation,
|
|
646
|
+
nation_name,
|
|
647
|
+
sur_name,
|
|
648
|
+
sur_name_en: sur_name,
|
|
649
|
+
first_name,
|
|
650
|
+
first_name_en: first_name,
|
|
651
|
+
sex: sex ? sex : '',
|
|
652
|
+
birthday,
|
|
653
|
+
cid_expire_date,
|
|
654
|
+
phone,
|
|
655
|
+
verify_expire_time: verify_expire_time && Number(verify_expire_time) || ''
|
|
656
|
+
}
|
|
657
|
+
formData = Object.assign(formData, res, passportOldData)
|
|
658
|
+
Nation = nation
|
|
659
|
+
this.setData({
|
|
660
|
+
formData,
|
|
661
|
+
passportOldData
|
|
662
|
+
})
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
fail: err => {
|
|
666
|
+
console.log('外国人护照核验接口获取失败', err)
|
|
667
|
+
let { errmsg } = JSON.parse(err)
|
|
668
|
+
wx.showToast({
|
|
669
|
+
title: errmsg || '获取核验信息接口失败',
|
|
670
|
+
icon: 'none',
|
|
671
|
+
duration: 3000
|
|
672
|
+
})
|
|
673
|
+
}
|
|
674
|
+
})
|
|
675
|
+
})
|
|
676
|
+
},
|
|
677
|
+
|
|
678
|
+
// 选择国籍
|
|
679
|
+
handleNationTap() {
|
|
680
|
+
const cid_type = this.data.formData.cid_type
|
|
681
|
+
if (cid_type === '414') {
|
|
682
|
+
// 华侨护照
|
|
683
|
+
return
|
|
684
|
+
}
|
|
685
|
+
// 临时存储表单数据
|
|
686
|
+
this.saveFormDataTemp()
|
|
687
|
+
|
|
688
|
+
flow.navigateTo({
|
|
689
|
+
url: `../nation-list/nation-list?cid_type=${cid_type}`,
|
|
690
|
+
})
|
|
691
|
+
},
|
|
692
|
+
|
|
693
|
+
// 显示自定义校验错误提示
|
|
694
|
+
showCuntomErrTip(msg) {
|
|
695
|
+
this.setData({
|
|
696
|
+
showCustomTips: true,
|
|
697
|
+
customTipsMsg: msg
|
|
698
|
+
}, () => {
|
|
699
|
+
// 3秒后关闭
|
|
700
|
+
setTimeout(() => {
|
|
701
|
+
this.setData({
|
|
702
|
+
showCustomTips: false,
|
|
703
|
+
customTipsMsg: ''
|
|
704
|
+
});
|
|
705
|
+
}, 3500);
|
|
706
|
+
})
|
|
707
|
+
},
|
|
708
|
+
|
|
709
|
+
async handleFormSubmit(e) {
|
|
710
|
+
const formValid = e.detail.validStatus
|
|
711
|
+
const customValid = this.data.language !== 'en' ? { valid: true, msg: '' } : this.validateFullname()
|
|
712
|
+
if (!formValid || !customValid.valid) {
|
|
713
|
+
// 自定义校验字段有问题,获取表单错误列表
|
|
714
|
+
const formErrList = e.detail.value
|
|
715
|
+
// 如果表单校验有问题,自定义校验没问题,则显示表单校验错误提示
|
|
716
|
+
if (!formValid && customValid.valid) {
|
|
717
|
+
this.showCuntomErrTip(formErrList[0].message)
|
|
718
|
+
return
|
|
719
|
+
}
|
|
720
|
+
// 如果表单校验没有问题,自定义校验有问题,则显示自定义校验错误提示
|
|
721
|
+
if (formValid && !customValid.valid) {
|
|
722
|
+
this.showCuntomErrTip(customValid.msg)
|
|
723
|
+
return
|
|
724
|
+
}
|
|
725
|
+
// 如果两者都有问题,则判断显示谁
|
|
726
|
+
let lastMsg = ''
|
|
727
|
+
if (formErrList.some(i => ["id_card_number", "nation"].includes(i.name))) {
|
|
728
|
+
lastMsg = formErrList[0].message
|
|
729
|
+
} else {
|
|
730
|
+
lastMsg = customValid.msg
|
|
731
|
+
}
|
|
732
|
+
this.showCuntomErrTip(lastMsg)
|
|
733
|
+
return
|
|
734
|
+
}
|
|
735
|
+
wx.showLoading({
|
|
736
|
+
title: '加载中…',
|
|
737
|
+
mask: true
|
|
738
|
+
})
|
|
739
|
+
// 处理参数
|
|
740
|
+
console.log('删除“姓名、证件号码、护照号码、手机号码”的前后空格')
|
|
741
|
+
let { name, id_card_number, sur_name, first_name, passport_number, phone, cid_type } = this.data.formData
|
|
742
|
+
this.setData({
|
|
743
|
+
['formData.name']: name.trim(),
|
|
744
|
+
['formData.passport_number']: passport_number.trim(),
|
|
745
|
+
['formData.phone']: phone.trim()
|
|
746
|
+
})
|
|
747
|
+
if (cid_type === '700') {
|
|
748
|
+
// 外国护照,sur_name和first_name需要特殊处理
|
|
749
|
+
let { sur_name_en, first_name_en } = this.data.formData
|
|
750
|
+
if (sur_name_en == null || sur_name_en === '') {
|
|
751
|
+
sur_name_en = ' '
|
|
752
|
+
} else {
|
|
753
|
+
sur_name = sur_name_en.trim()
|
|
754
|
+
}
|
|
755
|
+
if (first_name_en == null || first_name_en === '') {
|
|
756
|
+
first_name_en = ' '
|
|
757
|
+
} else {
|
|
758
|
+
first_name_en = first_name_en.trim()
|
|
759
|
+
}
|
|
760
|
+
this.setData({
|
|
761
|
+
['formData.sur_name']: sur_name_en,
|
|
762
|
+
['formData.first_name']: first_name_en,
|
|
763
|
+
// 删除“外国人护照号码”中间空格
|
|
764
|
+
['formData.id_card_number']: id_card_number.replace(/\s+/g, '').trim()
|
|
765
|
+
})
|
|
766
|
+
} else {
|
|
767
|
+
this.setData({
|
|
768
|
+
['formData.sur_name']: sur_name.trim(),
|
|
769
|
+
['formData.first_name']: first_name.trim(),
|
|
770
|
+
['formData.id_card_number']: id_card_number.trim()
|
|
771
|
+
})
|
|
772
|
+
}
|
|
773
|
+
console.log('入参', this.data.formData)
|
|
774
|
+
|
|
775
|
+
let currentAuthType = this.data.currentAuthType
|
|
776
|
+
console.log('当前认证类型', currentAuthType)
|
|
777
|
+
|
|
778
|
+
if (currentAuthType === 'wxFace') {
|
|
779
|
+
console.log('微信人脸识别认证')
|
|
780
|
+
|
|
781
|
+
// 判断是否是PC端登录
|
|
782
|
+
await this.getDevice()
|
|
783
|
+
|
|
784
|
+
// 判断人脸失败次数
|
|
785
|
+
await this.fetchFaceFailCount(false)
|
|
786
|
+
|
|
787
|
+
// 错误触发销毁回调函数处理
|
|
788
|
+
this.handleExitedState()
|
|
789
|
+
|
|
790
|
+
// 开启人脸识别认证
|
|
791
|
+
this.toFaceVerify()
|
|
792
|
+
} else if (currentAuthType === 'faceReceptionAuth') {
|
|
793
|
+
console.log('出入境微信人脸识别接口认证')
|
|
794
|
+
// 错误触发销毁回调函数处理
|
|
795
|
+
this.handleExitedState()
|
|
796
|
+
|
|
797
|
+
// 判断是否是PC端登录
|
|
798
|
+
await this.getDevice()
|
|
799
|
+
|
|
800
|
+
// 出入境微信人脸识别接口
|
|
801
|
+
this.toFaceReceptionAuth()
|
|
802
|
+
} else if(currentAuthType === 'cardAuth') {
|
|
803
|
+
console.log('银行卡接口认证')
|
|
804
|
+
// 银行卡身份核验接口
|
|
805
|
+
this.bankCardAuth()
|
|
806
|
+
} else if(currentAuthType === 'ForeignPassortAuth') {
|
|
807
|
+
console.log('外国人护照核验')
|
|
808
|
+
// 外国人护照核验
|
|
809
|
+
this.handlePassortAuth()
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
|
|
813
|
+
// 开启人脸识别认证
|
|
814
|
+
async toFaceVerify() {
|
|
815
|
+
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.faceVerifyWithIdCard(this.data.formData))
|
|
816
|
+
|
|
817
|
+
const cidType = this.data.formData.cid_type
|
|
818
|
+
|
|
819
|
+
if (err) {
|
|
820
|
+
// 埋点上报事件:刷脸认证
|
|
821
|
+
this.faceTracker(2, cidType)
|
|
822
|
+
|
|
823
|
+
// 埋点上报事件:自然人登录
|
|
824
|
+
this.loginTracker(3, cidType)
|
|
825
|
+
|
|
826
|
+
console.log('微信人脸识别失败', err)
|
|
827
|
+
let { errmsg, errMsg, errCode } = JSON.parse(err)
|
|
828
|
+
if (errCode) {
|
|
829
|
+
let errCodeArr = [10002, 10003, 10004, 10005, 10012, 10057, 90002, 90003, 90004, 90005, 90006, 90100, 90023, 90024, 90025]
|
|
830
|
+
if (errCodeArr.indexOf(errCode) >= 0) {
|
|
831
|
+
console.log('在指定的错误码范围内,人脸失败次数+1')
|
|
832
|
+
// 设置人脸失败次数
|
|
833
|
+
await this.fetchFaceFailCount(true, errCode)
|
|
834
|
+
}
|
|
835
|
+
// 人脸识别异常温馨提示弹窗
|
|
836
|
+
this.handleFaceError(errCode)
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
if (errCode && errCode === 90100) {
|
|
840
|
+
wx.showToast({
|
|
841
|
+
title: '您已取消人脸识别',
|
|
842
|
+
icon: 'none',
|
|
843
|
+
duration: 3000
|
|
844
|
+
})
|
|
845
|
+
} else if (errCode && errCode === 10004) {
|
|
846
|
+
wx.showToast({
|
|
847
|
+
title: '人脸与身份信息不匹配',
|
|
848
|
+
icon: 'none',
|
|
849
|
+
duration: 3000
|
|
850
|
+
})
|
|
851
|
+
} else if (errCode && errCode === 10003) {
|
|
852
|
+
wx.showToast({
|
|
853
|
+
title: '姓名或证件号码有误',
|
|
854
|
+
icon: 'none',
|
|
855
|
+
duration: 3000
|
|
856
|
+
})
|
|
857
|
+
} else {
|
|
858
|
+
wx.showToast({
|
|
859
|
+
title: errmsg || errMsg || '认证失败,请稍后再试',
|
|
860
|
+
icon: 'none',
|
|
861
|
+
duration: 3000
|
|
862
|
+
})
|
|
863
|
+
}
|
|
864
|
+
} else {
|
|
865
|
+
// 埋点上报事件:刷脸认证
|
|
866
|
+
this.faceTracker(1, cidType)
|
|
867
|
+
|
|
868
|
+
console.log('认证成功返回页面数据:', session)
|
|
869
|
+
// 保存刷脸成功时间戳
|
|
870
|
+
let timeStamp = new Date().getTime()
|
|
871
|
+
wx.setStorageSync('tif.faceTimeStamp', timeStamp)
|
|
872
|
+
|
|
873
|
+
this.authSuccess(session)
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
|
|
877
|
+
// 人脸识别异常温馨提示弹窗
|
|
878
|
+
handleFaceError(code) {
|
|
879
|
+
let errCode1 = [10009, 10026, 10032, 10072, 10076, 10084, 10086, 10089, 10092, 10049, 10107, 10095]
|
|
880
|
+
let errCode2 = [10002, 10004, 10005, 10010, 10012, 10027, 10028, 10057]
|
|
881
|
+
if (errCode1.indexOf(code) >= 0) {
|
|
882
|
+
// 1: 未办理过身份证/新办理身份证的
|
|
883
|
+
this.setData({
|
|
884
|
+
faceErrorModal: true,
|
|
885
|
+
faceErrorType: '1'
|
|
886
|
+
})
|
|
887
|
+
} else if (errCode2.indexOf(code) >= 0) {
|
|
888
|
+
const age = utils.parseIDCard(this.data.formData.id_card_number).age
|
|
889
|
+
console.log('年龄', age)
|
|
890
|
+
if (age >= 60) {
|
|
891
|
+
// 3: 刷脸没刷过,60岁以上的
|
|
892
|
+
this.setData({
|
|
893
|
+
faceErrorModal: true,
|
|
894
|
+
faceErrorType: '3'
|
|
895
|
+
})
|
|
896
|
+
} else {
|
|
897
|
+
// 2: 刷脸没刷过,60岁以下的
|
|
898
|
+
this.setData({
|
|
899
|
+
faceErrorModal: true,
|
|
900
|
+
faceErrorType: '2'
|
|
901
|
+
})
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
|
|
906
|
+
// 出入境微信人脸识别接口
|
|
907
|
+
async toFaceReceptionAuth() {
|
|
908
|
+
// 临时存储表单数据
|
|
909
|
+
this.saveFormDataTemp()
|
|
910
|
+
|
|
911
|
+
// 数据加密
|
|
912
|
+
const [err, res] = await utils.awaitTo(jingtongVerifyRequest.caEncrypt(this.data.formData))
|
|
913
|
+
if (err) {
|
|
914
|
+
console.log('CA加密失败', err)
|
|
915
|
+
let { errmsg } = JSON.parse(err)
|
|
916
|
+
wx.showToast({
|
|
917
|
+
title: errmsg || 'CA加密失败,请重试',
|
|
918
|
+
icon: 'none',
|
|
919
|
+
duration: 3500
|
|
920
|
+
})
|
|
921
|
+
} else {
|
|
922
|
+
wx.hideLoading()
|
|
923
|
+
console.log('CA加密成功:', res)
|
|
924
|
+
this.toFaceReceptionVerify(res.user_id_key)
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
|
|
928
|
+
// 开启出入境微信人脸识别认证
|
|
929
|
+
async toFaceReceptionVerify(userIdKey) {
|
|
930
|
+
const params = Object.assign(this.data.formData, {
|
|
931
|
+
userIdKey
|
|
932
|
+
})
|
|
933
|
+
const { cid_type } = this.data.formData
|
|
934
|
+
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.faceVerifyWithUserIdKey(params))
|
|
935
|
+
if (err) {
|
|
936
|
+
console.log('出入境-微信人脸识别失败', err)
|
|
937
|
+
|
|
938
|
+
// 埋点上报事件:刷脸认证
|
|
939
|
+
this.faceTracker(2, cid_type)
|
|
940
|
+
|
|
941
|
+
// 埋点上报事件:自然人登录
|
|
942
|
+
this.loginTracker(3, cid_type)
|
|
943
|
+
|
|
944
|
+
try {
|
|
945
|
+
let { errmsg = '', errMsg = '', errCode = '' } = JSON.parse(err) || ''
|
|
946
|
+
if (errCode && errCode === 90100) {
|
|
947
|
+
wx.showToast({
|
|
948
|
+
title: '您已取消人脸识别',
|
|
949
|
+
icon: 'none',
|
|
950
|
+
duration: 3000
|
|
951
|
+
})
|
|
952
|
+
} else if (errCode && errCode === 10004) {
|
|
953
|
+
wx.showToast({
|
|
954
|
+
title: '人脸与身份信息不匹配',
|
|
955
|
+
icon: 'none',
|
|
956
|
+
duration: 3000
|
|
957
|
+
})
|
|
958
|
+
} else if (errCode && errCode === 10003) {
|
|
959
|
+
wx.showToast({
|
|
960
|
+
title: '姓名或证件号码有误',
|
|
961
|
+
icon: 'none',
|
|
962
|
+
duration: 3000
|
|
963
|
+
})
|
|
964
|
+
} else if (errCode && errCode === 10111 && (cid_type === '17' || cid_type === '18')) {
|
|
965
|
+
// 若是“港澳台居住证”且错误码是10111,则触发银行卡核验
|
|
966
|
+
this.setData({
|
|
967
|
+
showCardModal: true
|
|
968
|
+
})
|
|
969
|
+
} else {
|
|
970
|
+
wx.showToast({
|
|
971
|
+
title: errmsg || errMsg || '认证失败,请稍后再试',
|
|
972
|
+
icon: 'none',
|
|
973
|
+
duration: 3000
|
|
974
|
+
})
|
|
975
|
+
}
|
|
976
|
+
} catch {
|
|
977
|
+
wx.showToast({
|
|
978
|
+
title: '人脸识别不支持电脑端,请使用真机',
|
|
979
|
+
icon: 'none',
|
|
980
|
+
duration: 3000
|
|
981
|
+
})
|
|
982
|
+
}
|
|
983
|
+
} else {
|
|
984
|
+
// 埋点上报事件:刷脸认证
|
|
985
|
+
this.faceTracker(1, cid_type)
|
|
986
|
+
|
|
987
|
+
console.log('认证成功返回页面数据:', session)
|
|
988
|
+
this.authSuccess(session)
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
|
|
992
|
+
// 港澳台居住证核验接口
|
|
993
|
+
async HmtResidenceAuth() {
|
|
994
|
+
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.residenceAuth(this.data.formData))
|
|
995
|
+
if (err) {
|
|
996
|
+
console.log('港澳台居住证核验接口认证失败', err)
|
|
997
|
+
let { errmsg, errcode } = JSON.parse(err)
|
|
998
|
+
if (errcode == 4048) {
|
|
999
|
+
this.setData({
|
|
1000
|
+
showCardModal: true
|
|
1001
|
+
})
|
|
1002
|
+
} else {
|
|
1003
|
+
wx.showToast({
|
|
1004
|
+
title: errmsg || '认证失败',
|
|
1005
|
+
icon: 'none',
|
|
1006
|
+
duration: 3000
|
|
1007
|
+
})
|
|
1008
|
+
}
|
|
1009
|
+
} else {
|
|
1010
|
+
console.log('认证成功返回页面数据:', session)
|
|
1011
|
+
this.authSuccess(session)
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
|
|
1015
|
+
// 银行卡身份核验接口
|
|
1016
|
+
async bankCardAuth() {
|
|
1017
|
+
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.bankCardAuth(this.data.formData))
|
|
1018
|
+
if (err) {
|
|
1019
|
+
// 埋点上报事件:自然人登录
|
|
1020
|
+
this.loginTracker(2, this.data.formData.cid_type)
|
|
1021
|
+
|
|
1022
|
+
console.log('银行卡身份核验接口认证失败', err)
|
|
1023
|
+
let { errmsg } = JSON.parse(err)
|
|
1024
|
+
wx.showToast({
|
|
1025
|
+
title: errmsg || '认证失败',
|
|
1026
|
+
icon: 'none',
|
|
1027
|
+
duration: 3000
|
|
1028
|
+
})
|
|
1029
|
+
} else {
|
|
1030
|
+
console.log('认证成功返回页面数据:', session)
|
|
1031
|
+
this.authSuccess(session)
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
|
|
1035
|
+
// 外国人护照核验处理逻辑
|
|
1036
|
+
handlePassortAuth() {
|
|
1037
|
+
let authStatus = this.data.passportAuthStatus
|
|
1038
|
+
let newData = this.data.formData
|
|
1039
|
+
let oldData = this.data.passportOldData
|
|
1040
|
+
|
|
1041
|
+
console.log('当前核验单状态', authStatus)
|
|
1042
|
+
|
|
1043
|
+
if (!authStatus) {
|
|
1044
|
+
console.log('无审核单', authStatus)
|
|
1045
|
+
// 外国人护照核验,提交核验单
|
|
1046
|
+
this.passportAuth()
|
|
1047
|
+
} else {
|
|
1048
|
+
// 查上一单的状态
|
|
1049
|
+
this.fetchPassortAuthResult(true).then(status => {
|
|
1050
|
+
console.log('====查上一单的状态====', status)
|
|
1051
|
+
if (status === '1') {
|
|
1052
|
+
// 核验通过,弹窗提示
|
|
1053
|
+
console.log('外国人护照核验通过')
|
|
1054
|
+
this.passportAuthSuccess()
|
|
1055
|
+
} else {
|
|
1056
|
+
// 比对表单数据是否有修改
|
|
1057
|
+
console.log('新旧表单数据比对', newData, oldData)
|
|
1058
|
+
if (utils.objIsEqual(newData, oldData)) {
|
|
1059
|
+
console.log('表单数据没有修改')
|
|
1060
|
+
if (status === '4') {
|
|
1061
|
+
// 核验中
|
|
1062
|
+
this.fetchPassortAuthResult(true).then(status => {
|
|
1063
|
+
console.log('再次获取外国人护照核验状态', status)
|
|
1064
|
+
if (status === '1') {
|
|
1065
|
+
console.log('外国人护照核验通过')
|
|
1066
|
+
this.passportAuthSuccess()
|
|
1067
|
+
} else if (status === '4') {
|
|
1068
|
+
console.log('外国人护照核验中,弹窗提示')
|
|
1069
|
+
this.handleShowModal(status)
|
|
1070
|
+
} else {
|
|
1071
|
+
// 核验不通过,弹窗提示
|
|
1072
|
+
this.passportAuthFail(status)
|
|
1073
|
+
}
|
|
1074
|
+
})
|
|
1075
|
+
} else {
|
|
1076
|
+
// 核验不通过,弹窗提示
|
|
1077
|
+
this.passportAuthFail(status)
|
|
1078
|
+
}
|
|
1079
|
+
} else {
|
|
1080
|
+
console.log('表单数据存在修改')
|
|
1081
|
+
// 外国人护照核验,提交核验单
|
|
1082
|
+
this.passportAuth()
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
})
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
|
|
1089
|
+
// 外国人护照核验不通过逻辑
|
|
1090
|
+
passportAuthFail(status) {
|
|
1091
|
+
console.log('===外国人护照核验不通过,弹窗提示===')
|
|
1092
|
+
// 判断当前person_code是否已失效
|
|
1093
|
+
const personCode = this.data.passportAuthPersonCode
|
|
1094
|
+
const localPersonCode = wx.getStorageSync('tif.fail.person_code') || ''
|
|
1095
|
+
if (personCode === localPersonCode) {
|
|
1096
|
+
// 提交核验单
|
|
1097
|
+
this.passportAuth()
|
|
1098
|
+
} else {
|
|
1099
|
+
// 埋点上报事件:自然人登录
|
|
1100
|
+
this.loginTracker(2, this.data.formData.cid_type)
|
|
1101
|
+
|
|
1102
|
+
this.handleShowModal(status)
|
|
1103
|
+
// 记录这个person_code是失效的
|
|
1104
|
+
wx.setStorageSync('tif.fail.person_code', this.data.passportAuthPersonCode)
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
1107
|
+
|
|
1108
|
+
// 外国人护照核验接口
|
|
1109
|
+
async passportAuth() {
|
|
1110
|
+
console.log('===========提交核验单============')
|
|
1111
|
+
let formData = this.data.formData
|
|
1112
|
+
|
|
1113
|
+
const isLegalDate = utils.greaterCurrentTime(formData.cid_expire_date)
|
|
1114
|
+
console.log('isLegalDate', isLegalDate)
|
|
1115
|
+
if (!isLegalDate) {
|
|
1116
|
+
console.log('护照有效期日期不合法')
|
|
1117
|
+
wx.showToast({
|
|
1118
|
+
title: 'Please select the passport expiration date',
|
|
1119
|
+
icon: 'none',
|
|
1120
|
+
duration: 3000
|
|
1121
|
+
})
|
|
1122
|
+
this.setData({
|
|
1123
|
+
'formData.cid_expire_date': ''
|
|
1124
|
+
})
|
|
1125
|
+
return
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
const [err, res] = await utils.awaitTo(jingtongVerifyRequest.passportAuth(formData))
|
|
1129
|
+
if (err) {
|
|
1130
|
+
console.log('外国人护照核验接口认证失败', err)
|
|
1131
|
+
let { errmsg } = JSON.parse(err)
|
|
1132
|
+
wx.showToast({
|
|
1133
|
+
title: errmsg || '认证失败',
|
|
1134
|
+
icon: 'none',
|
|
1135
|
+
duration: 3000
|
|
1136
|
+
})
|
|
1137
|
+
return
|
|
1138
|
+
}
|
|
1139
|
+
console.log('弹窗提示等待10分钟', res)
|
|
1140
|
+
this.setData({
|
|
1141
|
+
passportAuthStatus: '4',
|
|
1142
|
+
passportOldData: JSON.parse(JSON.stringify(formData)),
|
|
1143
|
+
passportAuthPersonCode: ''
|
|
1144
|
+
})
|
|
1145
|
+
wx.setStorageSync('tif.fail.person_code', '')
|
|
1146
|
+
this.handleShowModal('4')
|
|
1147
|
+
},
|
|
1148
|
+
|
|
1149
|
+
// 外国人护照核验通过
|
|
1150
|
+
passportAuthSuccess() {
|
|
1151
|
+
// 调用删除接口/静默登录并返回session信息
|
|
1152
|
+
jingtongVerifyRequest.deletePassportAuth({
|
|
1153
|
+
success: session => {
|
|
1154
|
+
console.log('返回session信息', session)
|
|
1155
|
+
|
|
1156
|
+
// 删除缓存信息
|
|
1157
|
+
console.log('删除缓存信息')
|
|
1158
|
+
let formDataTemp = wx.getStorageSync('tif.formDataTemp')
|
|
1159
|
+
formDataTemp['700'] = {}
|
|
1160
|
+
wx.setStorageSync('tif.formDataTemp', formDataTemp)
|
|
1161
|
+
this.setData({
|
|
1162
|
+
passportOldData: {}
|
|
1163
|
+
})
|
|
1164
|
+
|
|
1165
|
+
this.authSuccess(session, true)
|
|
1166
|
+
},
|
|
1167
|
+
fail: err => {
|
|
1168
|
+
// 埋点上报事件:自然人登录
|
|
1169
|
+
this.loginTracker(2, this.data.formData.cid_type)
|
|
1170
|
+
|
|
1171
|
+
let { errmsg } = JSON.parse(err)
|
|
1172
|
+
wx.showToast({
|
|
1173
|
+
title: errmsg || 'auth fail',
|
|
1174
|
+
icon: 'none',
|
|
1175
|
+
duration: 3000
|
|
1176
|
+
})
|
|
1177
|
+
}
|
|
1178
|
+
})
|
|
1179
|
+
},
|
|
1180
|
+
|
|
1181
|
+
// 认证成功后续操作
|
|
1182
|
+
authSuccess(session, isEn = false) {
|
|
1183
|
+
console.log('====判断是否真的登录成功=====')
|
|
1184
|
+
if (!session) {
|
|
1185
|
+
wx.showToast({
|
|
1186
|
+
title: '登录态失效,请重试',
|
|
1187
|
+
icon: 'none',
|
|
1188
|
+
duration: 2000
|
|
1189
|
+
})
|
|
1190
|
+
return
|
|
1191
|
+
}
|
|
1192
|
+
const { face_time, realname_time, cid, has_phone, certType } = session
|
|
1193
|
+
if ((!face_time && !realname_time) || !cid) {
|
|
1194
|
+
wx.showToast({
|
|
1195
|
+
title: `登录态失效请重试: ${this.data.formData.cid_type}`,
|
|
1196
|
+
icon: 'none',
|
|
1197
|
+
duration: 2000
|
|
1198
|
+
})
|
|
1199
|
+
return
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
wx.showToast({
|
|
1203
|
+
title: isEn ? 'Verification successful, redirecting...': '验证成功, 跳转中…',
|
|
1204
|
+
icon: 'none',
|
|
1205
|
+
duration: 5000,
|
|
1206
|
+
mask: true
|
|
1207
|
+
})
|
|
1208
|
+
|
|
1209
|
+
const cidType = session.cid_type
|
|
1210
|
+
|
|
1211
|
+
// 本地存储表单核验成功数据
|
|
1212
|
+
wx.setStorageSync('tif.formDataSuccess', this.data.formData)
|
|
1213
|
+
|
|
1214
|
+
// 将弹窗标识设置为不需要弹窗
|
|
1215
|
+
jingtongVerifyRequest.setUserReadStatus(false).then(() => {
|
|
1216
|
+
console.log('设置弹窗标识成功')
|
|
1217
|
+
}).catch(err => {
|
|
1218
|
+
console.log('设置弹窗标识失败', err)
|
|
1219
|
+
})
|
|
1220
|
+
|
|
1221
|
+
setTimeout(() => {
|
|
1222
|
+
if (this.data.needUnite === "true") {
|
|
1223
|
+
// this.setData({
|
|
1224
|
+
// needUnite: ''
|
|
1225
|
+
// })
|
|
1226
|
+
|
|
1227
|
+
console.log('进入业务总入口, 判断是否有手机号码', has_phone)
|
|
1228
|
+
|
|
1229
|
+
// 登录成功回调 => 业务侧操作事项
|
|
1230
|
+
wx.$_ServiceConfiguration && wx.$_ServiceConfiguration.methods && wx.$_ServiceConfiguration.methods._loginSuccessCallBack && wx.$_ServiceConfiguration.methods._loginSuccessCallBack(session)
|
|
1231
|
+
|
|
1232
|
+
if (has_phone) {
|
|
1233
|
+
const realPhone = wx.getStorageSync('tif.realPhone') || ''
|
|
1234
|
+
const caPhone = wx.getStorageSync('tif.caPhone') || ''
|
|
1235
|
+
const confirmTime = wx.getStorageSync('tif.tel_confirm_time') || ''
|
|
1236
|
+
|
|
1237
|
+
console.log('realPhone', realPhone)
|
|
1238
|
+
console.log('caPhone', caPhone)
|
|
1239
|
+
console.log('confirmTime', confirmTime)
|
|
1240
|
+
|
|
1241
|
+
if (realPhone !== caPhone && confirmTime && (!utils.completeDate(new Date(Number(confirmTime + '000')), 6))) {
|
|
1242
|
+
// 埋点上报事件:自然人登录
|
|
1243
|
+
this.loginTracker(1, cidType)
|
|
1244
|
+
|
|
1245
|
+
this.setData({
|
|
1246
|
+
hadSuccessLogin: true
|
|
1247
|
+
})
|
|
1248
|
+
|
|
1249
|
+
// 【phone与caPhone不同】且【tel_confirm_time大于6个月】
|
|
1250
|
+
// 数据库手机号码有效期大于6个月
|
|
1251
|
+
// flow.redirectTo({
|
|
1252
|
+
// url: '../confirm-phone/confirm-phone'
|
|
1253
|
+
// })
|
|
1254
|
+
// 新增逻辑:如果caPhone存在,则跳转原来的逻辑,即换绑手机号,否则跳转绑定手机号
|
|
1255
|
+
if (caPhone == null || caPhone === '') {
|
|
1256
|
+
flow.redirectTo({
|
|
1257
|
+
url: '../bind-phone/bind-phone?source=14'
|
|
1258
|
+
})
|
|
1259
|
+
} else {
|
|
1260
|
+
flow.redirectTo({
|
|
1261
|
+
url: '../confirm-phone/confirm-phone'
|
|
1262
|
+
})
|
|
1263
|
+
}
|
|
1264
|
+
} else {
|
|
1265
|
+
jingtongVerifyRequest.personToken({
|
|
1266
|
+
source: '11'
|
|
1267
|
+
}).then(async data => {
|
|
1268
|
+
// 设置用户账号信息
|
|
1269
|
+
setAccountInfo(session.openid)
|
|
1270
|
+
|
|
1271
|
+
// 埋点上报事件:自然人登录
|
|
1272
|
+
this.loginTracker(1, cidType)
|
|
1273
|
+
|
|
1274
|
+
this.setData({
|
|
1275
|
+
hadSuccessLogin: true
|
|
1276
|
+
})
|
|
1277
|
+
|
|
1278
|
+
// 埋点 - 个人用户实体全属性上报
|
|
1279
|
+
let last_login_time = utils.getCurrentTime()
|
|
1280
|
+
wx.setStorageSync('tif.lastLoginTime', last_login_time)
|
|
1281
|
+
const userEntityReportData = Object.assign(session, {
|
|
1282
|
+
user_status: '1',
|
|
1283
|
+
last_login_time,
|
|
1284
|
+
user_date_of_birth: session.cid_type === '111' ? utils.getBirthByIDCard(session.cid) : ''
|
|
1285
|
+
})
|
|
1286
|
+
await utils.awaitTo(jingtongVerifyRequest.userEntityReport(userEntityReportData))
|
|
1287
|
+
|
|
1288
|
+
setTimeout(() => {
|
|
1289
|
+
flow.resolve({
|
|
1290
|
+
token: data
|
|
1291
|
+
})
|
|
1292
|
+
}, 1200)
|
|
1293
|
+
})
|
|
1294
|
+
}
|
|
1295
|
+
} else {
|
|
1296
|
+
// 埋点上报事件:自然人登录
|
|
1297
|
+
this.loginTracker(1, cidType)
|
|
1298
|
+
|
|
1299
|
+
this.setData({
|
|
1300
|
+
hadSuccessLogin: true
|
|
1301
|
+
})
|
|
1302
|
+
|
|
1303
|
+
flow.redirectTo({
|
|
1304
|
+
url: '../bind-phone/bind-phone?source=3'
|
|
1305
|
+
})
|
|
1306
|
+
}
|
|
1307
|
+
} else {
|
|
1308
|
+
console.log('返回主包')
|
|
1309
|
+
flow.resolve()
|
|
1310
|
+
}
|
|
1311
|
+
}, 800)
|
|
1312
|
+
},
|
|
1313
|
+
|
|
1314
|
+
// 埋点上报事件:刷脸认证
|
|
1315
|
+
faceTracker(recognition_status = 1, cidType) {
|
|
1316
|
+
SDKTrack('face_recognition_login', {
|
|
1317
|
+
recognition_status, // 1: 人脸识别成功 2:人脸识别失败
|
|
1318
|
+
login_certificate: this.data.certTypeMap[cidType] || 1, // 证件类型
|
|
1319
|
+
invoke_location: '' // 调起位置
|
|
1320
|
+
})
|
|
1321
|
+
},
|
|
1322
|
+
|
|
1323
|
+
// 埋点上报事件:自然人登录
|
|
1324
|
+
loginTracker(login_status = 1, cidType) {
|
|
1325
|
+
SDKTrack('nature_person_login', {
|
|
1326
|
+
// 1 登录成功;2 登录失败-身份信息核验失败;3 登录失败-人脸核验失败
|
|
1327
|
+
// 4 登录失败-电子营业执照核验失败;5 登录失败-账号密码输入错误
|
|
1328
|
+
// 6 取消登录(包含点击温馨提示的“取消”,点击请法人登录的×,在登录页面点击左上角返回按钮退出登录)
|
|
1329
|
+
// 7 退出小程序终止登录;old_1 历史数据:除登录成功之外的所有情况
|
|
1330
|
+
login_status,
|
|
1331
|
+
login_certificate: this.data.certTypeMap[cidType] || 1, // 证件类型
|
|
1332
|
+
invoke_location: '', // 调起位置
|
|
1333
|
+
login_validity_period: this.data.formData.verify_expire_time / 24 || '' // 免登录时间
|
|
1334
|
+
})
|
|
1335
|
+
},
|
|
1336
|
+
|
|
1337
|
+
// 显示弹窗
|
|
1338
|
+
handleShowModal(status) {
|
|
1339
|
+
let modalStatus = ''
|
|
1340
|
+
if (status === '3') {
|
|
1341
|
+
// 未找到信息
|
|
1342
|
+
modalStatus = 'warning'
|
|
1343
|
+
} else if (status === '4') {
|
|
1344
|
+
// 核验中
|
|
1345
|
+
modalStatus = 'info'
|
|
1346
|
+
} else {
|
|
1347
|
+
// 信息有误
|
|
1348
|
+
modalStatus = 'error'
|
|
1349
|
+
}
|
|
1350
|
+
this.setData({
|
|
1351
|
+
modalStatus,
|
|
1352
|
+
showModal: true
|
|
1353
|
+
},() => {
|
|
1354
|
+
wx.hideLoading()
|
|
1355
|
+
})
|
|
1356
|
+
},
|
|
1357
|
+
|
|
1358
|
+
// modal确认事件
|
|
1359
|
+
handleModalOk() {
|
|
1360
|
+
// this.fetchPassortAuthResult()
|
|
1361
|
+
this.setData({
|
|
1362
|
+
showModal: false,
|
|
1363
|
+
showFaceModal: false,
|
|
1364
|
+
showLockFaceModal: false,
|
|
1365
|
+
showCardModal: false,
|
|
1366
|
+
showTipModal: false
|
|
1367
|
+
})
|
|
1368
|
+
},
|
|
1369
|
+
|
|
1370
|
+
// 调起银行卡认证
|
|
1371
|
+
toCardAuth() {
|
|
1372
|
+
console.log('====调起银行卡认证====')
|
|
1373
|
+
this.setData({
|
|
1374
|
+
currentAuthType: 'cardAuth',
|
|
1375
|
+
rules: rulesConfig.cardRules('zh_CN'),
|
|
1376
|
+
showCardModal: false
|
|
1377
|
+
})
|
|
1378
|
+
},
|
|
1379
|
+
|
|
1380
|
+
// 触发问号弹出
|
|
1381
|
+
showQuestionTip() {
|
|
1382
|
+
this.setData({
|
|
1383
|
+
showTipModal: true
|
|
1384
|
+
})
|
|
1385
|
+
},
|
|
1386
|
+
|
|
1387
|
+
onUnload: function() {
|
|
1388
|
+
// 页面卸载时的逻辑处理
|
|
1389
|
+
console.log('======页面即将卸载======', this.data.hadSuccessLogin);
|
|
1390
|
+
if (!this.data.hadSuccessLogin) {
|
|
1391
|
+
// 埋点上报事件:自然人登录
|
|
1392
|
+
this.loginTracker(6, this.data.formData.cid_type)
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
|
|
1396
|
+
// 有些操作程序会触发销毁回调函数,该操作不是真正的小程序销毁操作
|
|
1397
|
+
handleExitedState() {
|
|
1398
|
+
this.setData({
|
|
1399
|
+
exitedState: false
|
|
1400
|
+
})
|
|
1401
|
+
setTimeout(() => {
|
|
1402
|
+
this.setData({
|
|
1403
|
+
exitedState: true
|
|
1404
|
+
})
|
|
1405
|
+
}, 2000)
|
|
1406
|
+
},
|
|
1407
|
+
|
|
1408
|
+
onSaveExitState: function() {
|
|
1409
|
+
// 小程序可能被销毁之前的逻辑处理
|
|
1410
|
+
if (!this.data.hadSuccessLogin && this.data.exitedState) {
|
|
1411
|
+
console.log('======小程序可能被销毁======')
|
|
1412
|
+
// 埋点上报事件:自然人登录
|
|
1413
|
+
this.loginTracker(7, this.data.formData.cid_type)
|
|
1414
|
+
}
|
|
1415
|
+
},
|
|
1416
|
+
|
|
1417
|
+
// 关闭 - 扫脸失败温馨提示弹窗
|
|
1418
|
+
cancelFaceErrorModal() {
|
|
1419
|
+
this.setData({
|
|
1420
|
+
faceErrorModal: false
|
|
1421
|
+
})
|
|
1422
|
+
},
|
|
1423
|
+
|
|
1424
|
+
// 扫脸失败温馨提示弹窗-跳转到失败原因
|
|
1425
|
+
okFaceErrorModal() {
|
|
1426
|
+
this.setData({
|
|
1427
|
+
faceErrorModal: false
|
|
1428
|
+
})
|
|
1429
|
+
flow.navigateTo({
|
|
1430
|
+
url: `../face-error-reason/face-error-reason?type=${this.data.faceErrorType}`,
|
|
1431
|
+
})
|
|
1432
|
+
},
|
|
1433
|
+
|
|
1434
|
+
openEye(e) {
|
|
1435
|
+
console.log(e)
|
|
1436
|
+
const isOpen = e.detail.isOpen
|
|
1437
|
+
const key = e.currentTarget.id
|
|
1438
|
+
const strKey = e.currentTarget.dataset.star
|
|
1439
|
+
console.log('isOpen', isOpen)
|
|
1440
|
+
console.log('key', key)
|
|
1441
|
+
console.log('strKey', strKey)
|
|
1442
|
+
if (isOpen) {
|
|
1443
|
+
console.log('显示脱敏')
|
|
1444
|
+
const { name, id_card_number } = this.data.formData
|
|
1445
|
+
const value = key === 'name' ? utils.hideName(name) : utils.hideIdCard(id_card_number, '111')
|
|
1446
|
+
console.log('value', value)
|
|
1447
|
+
this.setData({
|
|
1448
|
+
[`formData.${strKey}`]: value
|
|
1449
|
+
})
|
|
1450
|
+
} else {
|
|
1451
|
+
console.log('删除脱敏,显示明文')
|
|
1452
|
+
this.setData({
|
|
1453
|
+
[`formData.${strKey}`]: ''
|
|
1454
|
+
})
|
|
1455
|
+
}
|
|
1456
|
+
},
|
|
1457
|
+
|
|
1458
|
+
handleChangeSwtich(e) {
|
|
1459
|
+
this.setData({
|
|
1460
|
+
['formData.sbSwitch']: e.detail.value
|
|
1461
|
+
})
|
|
1462
|
+
// 处理三证照的正则问题
|
|
1463
|
+
this.matchOptionsRule()
|
|
1464
|
+
},
|
|
1465
|
+
|
|
1466
|
+
// 隐藏提示
|
|
1467
|
+
closeForeignTip() {
|
|
1468
|
+
wx.setStorageSync('tif.hideForeignTip', '1')
|
|
1469
|
+
this.setData({
|
|
1470
|
+
showForeignTip: false
|
|
1471
|
+
})
|
|
1472
|
+
},
|
|
1473
|
+
|
|
1474
|
+
// 验证sur_name和first_name
|
|
1475
|
+
validateFullname() {
|
|
1476
|
+
const {
|
|
1477
|
+
sur_name_en: sur_name,
|
|
1478
|
+
first_name_en: first_name
|
|
1479
|
+
} = this.data.formData
|
|
1480
|
+
// 两个都没填
|
|
1481
|
+
if ((sur_name == null || sur_name === '') && (first_name == null || first_name === '')) {
|
|
1482
|
+
const msgEmpty = 'Please fill in surname or given name.';
|
|
1483
|
+
this.setData({
|
|
1484
|
+
sur_name_state: {
|
|
1485
|
+
valid: false,
|
|
1486
|
+
msg: msgEmpty
|
|
1487
|
+
},
|
|
1488
|
+
first_name_state: {
|
|
1489
|
+
valid: false,
|
|
1490
|
+
msg: msgEmpty
|
|
1491
|
+
}
|
|
1492
|
+
})
|
|
1493
|
+
return {
|
|
1494
|
+
valid: false,
|
|
1495
|
+
msg: msgEmpty
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
this.setData({
|
|
1499
|
+
sur_name_state: {
|
|
1500
|
+
valid: true,
|
|
1501
|
+
msg: ''
|
|
1502
|
+
},
|
|
1503
|
+
first_name_state: {
|
|
1504
|
+
valid: false,
|
|
1505
|
+
msg: ''
|
|
1506
|
+
}
|
|
1507
|
+
})
|
|
1508
|
+
// 其中一个填了,或者两个都填了
|
|
1509
|
+
let sur_name_flag = true
|
|
1510
|
+
let msg = 'Please enter capital letters'
|
|
1511
|
+
if (sur_name != null && sur_name !== '') {
|
|
1512
|
+
const valid = utils.validate.checkName(sur_name, cidType)
|
|
1513
|
+
if (valid.data) {
|
|
1514
|
+
sur_name_flag = true
|
|
1515
|
+
} else {
|
|
1516
|
+
this.setData({
|
|
1517
|
+
sur_name_state: {
|
|
1518
|
+
valid: false,
|
|
1519
|
+
msg
|
|
1520
|
+
}
|
|
1521
|
+
})
|
|
1522
|
+
sur_name_flag = false
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
let first_name_flag = true
|
|
1526
|
+
if (first_name != null && first_name !== '') {
|
|
1527
|
+
const valid = utils.validate.checkName(first_name, cidType)
|
|
1528
|
+
if (valid.data) {
|
|
1529
|
+
first_name_flag = true
|
|
1530
|
+
} else {
|
|
1531
|
+
this.setData({
|
|
1532
|
+
first_name_state: {
|
|
1533
|
+
valid: false,
|
|
1534
|
+
msg
|
|
1535
|
+
}
|
|
1536
|
+
})
|
|
1537
|
+
first_name_flag = false
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
if (sur_name_flag && first_name_flag) {
|
|
1541
|
+
this.setData({
|
|
1542
|
+
sur_name_state: {
|
|
1543
|
+
valid: true,
|
|
1544
|
+
msg: ''
|
|
1545
|
+
},
|
|
1546
|
+
first_name_state: {
|
|
1547
|
+
valid: false,
|
|
1548
|
+
msg: ''
|
|
1549
|
+
}
|
|
1550
|
+
})
|
|
1551
|
+
}
|
|
1552
|
+
const valid = sur_name_flag && first_name_flag
|
|
1553
|
+
return {
|
|
1554
|
+
valid,
|
|
1555
|
+
msg: valid ? '' : msg
|
|
1556
|
+
}
|
|
1557
|
+
},
|
|
1558
|
+
})
|