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,984 +0,0 @@
|
|
|
1
|
-
// weapps-plugin-jingtong-verify/pages/bank-card-verify/bank-card-verify.js
|
|
2
|
-
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
-
const constantVal = require("../../utils/constantVal")
|
|
4
|
-
const rulesConfig = require("../../utils/rules")
|
|
5
|
-
const MD5 = require("../../utils/md5")
|
|
6
|
-
const utils = require("../../utils/index")
|
|
7
|
-
const { flow } = require("@wecity/weda-plugin-utils");
|
|
8
|
-
let cidType = '111'
|
|
9
|
-
let Nation = 'CHN'
|
|
10
|
-
Page({
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 页面的初始数据
|
|
14
|
-
*/
|
|
15
|
-
data: {
|
|
16
|
-
language: 'zh_CN', // 语言环境:默认中文
|
|
17
|
-
formData: {
|
|
18
|
-
cardholder_name: '', // 持卡人行名
|
|
19
|
-
cid_type: '111', // 证件类型
|
|
20
|
-
strCid: '', // 身份证号码(脱敏)
|
|
21
|
-
id_card_number: '', // 证件号码
|
|
22
|
-
strBankCount: '', // 银行卡卡号(脱敏)
|
|
23
|
-
bank_card_account: '', // 银行卡卡号
|
|
24
|
-
bank_phone:'', // 绑定手机号
|
|
25
|
-
verify_expire_time: '', // 登录有效时间
|
|
26
|
-
nation: 'CHN',
|
|
27
|
-
is_bind: '1',
|
|
28
|
-
verification_code: '', // 验证码
|
|
29
|
-
},
|
|
30
|
-
rules: rulesConfig.bankCardRules('zh_CN'),
|
|
31
|
-
validateType: {
|
|
32
|
-
id_card_number(value) {
|
|
33
|
-
return utils.validate.checkCid(value, cidType, Nation).data
|
|
34
|
-
},
|
|
35
|
-
cardholder_name(value) {
|
|
36
|
-
return utils.validate.checkName(value, cidType).data
|
|
37
|
-
},
|
|
38
|
-
bank_card_account(value) {
|
|
39
|
-
return utils.validate.checkBankCard(value).data
|
|
40
|
-
},
|
|
41
|
-
bank_phone(value) {
|
|
42
|
-
return utils.validate.checkPhone(value).data
|
|
43
|
-
},
|
|
44
|
-
// 新增验证码验证
|
|
45
|
-
verification_code(value) {
|
|
46
|
-
// 如果 source_type 为 2,跳过验证
|
|
47
|
-
// if (this.data.source_type === '2') {
|
|
48
|
-
// return true
|
|
49
|
-
// }
|
|
50
|
-
// 验证码不能为空
|
|
51
|
-
if (!value || value.trim() === '') {
|
|
52
|
-
return false
|
|
53
|
-
}
|
|
54
|
-
// 验证码格式:4-8位数字或字母数字组合
|
|
55
|
-
// const codeReg = /^[a-zA-Z0-9]{4,8}$/
|
|
56
|
-
// return codeReg.test(value.trim())
|
|
57
|
-
return utils.validate.checkVerificationCode(value).data
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
idCardType: {
|
|
61
|
-
'111': '1',// 大陆
|
|
62
|
-
'414': '2',// 护照
|
|
63
|
-
'516': '3',// 港澳台通行证
|
|
64
|
-
'511': '4',// 台胞证
|
|
65
|
-
'5': '5' // 其他未指定类型
|
|
66
|
-
},
|
|
67
|
-
cidTypeRange: [
|
|
68
|
-
// 微信人脸识别
|
|
69
|
-
{ name: '中华人民共和国居民身份证', value: '111' },
|
|
70
|
-
// { name: '华侨护照(国内签发)', value: '414' },
|
|
71
|
-
// { name: '港澳居民来往内地通行证', value: '516' },
|
|
72
|
-
// { name: '台湾居民来往大陆通行证', value: '511' },
|
|
73
|
-
// { name: '其他未指定类型', value: '5' },
|
|
74
|
-
// // 移民局接口
|
|
75
|
-
// { name: '港澳居民来往内地通行证', value: '516' },
|
|
76
|
-
// { name: '台湾居民来往大陆通行证', value: '511' },
|
|
77
|
-
// { name: '外国人永久居留身份证', value: '553' },
|
|
78
|
-
// { name: '华侨护照(国内签发)', value: '414' },
|
|
79
|
-
// // 银行卡接口
|
|
80
|
-
// { name: '港澳居民居住证', value: '17' },
|
|
81
|
-
// { name: '台湾居民居住证', value: '18' },
|
|
82
|
-
// // 外国护照
|
|
83
|
-
// { name: 'International passport', value: '700' }
|
|
84
|
-
],
|
|
85
|
-
// 银行卡认证弹窗
|
|
86
|
-
showToOtherModal: false,
|
|
87
|
-
// 是否显示自定义校验提示
|
|
88
|
-
showCustomTips: false,
|
|
89
|
-
// 自定义校验提示文本
|
|
90
|
-
customTipsMsg: '',
|
|
91
|
-
source_type: '1', // 来源,1是没有设置密码,直接进入;2是重新设置密码的时候,人脸识别限制了,进来的
|
|
92
|
-
showTipModal: false,
|
|
93
|
-
// 获取验证参数
|
|
94
|
-
verificationText: '发送验证码',
|
|
95
|
-
countdown: 0,
|
|
96
|
-
isCountingDown: false,
|
|
97
|
-
isSendSms: true, // 是否发送验证码
|
|
98
|
-
maxRetryCount: 3, // 最大重试次数
|
|
99
|
-
retryCount: 0, // 当前重试次数
|
|
100
|
-
bankInfoSuccess: false, // 首次设置密码进入,银行卡信息核验是否成功,默认失败
|
|
101
|
-
formDataVerificationCode: '', // 接口返回的验证码
|
|
102
|
-
formDataCodeMobile: '', // 根据证件号码获取的手机号尾号
|
|
103
|
-
isFormDataCodeMobile: false, // 默认填写的手机号与实际手机号不匹配
|
|
104
|
-
checkType: '', //// 1:无密码和手机号,2:无密码有手机号,3:无手机号有密码
|
|
105
|
-
// 收不到验证码提示框
|
|
106
|
-
showNotGetVerificationCodeTipModal: false,
|
|
107
|
-
submitMode: '',
|
|
108
|
-
// 防重复点击标记 - 基于接口返回状态
|
|
109
|
-
isSubmitting: false,
|
|
110
|
-
_tempVerificationCode: '', // 临时存储验证码
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* 生命周期函数--监听页面加载
|
|
115
|
-
*/
|
|
116
|
-
onLoad(options) {
|
|
117
|
-
let { formData, checkType } = this.data
|
|
118
|
-
formData.cardholder_name = options.name
|
|
119
|
-
formData.id_card_number = options.id_card_number
|
|
120
|
-
formData.strCid = options.strCid
|
|
121
|
-
formData.verify_expire_time = options.verify_expire_time
|
|
122
|
-
checkType = options.checkType
|
|
123
|
-
this.setData({
|
|
124
|
-
formData: formData,
|
|
125
|
-
checkType: checkType
|
|
126
|
-
})
|
|
127
|
-
console.log('判断后面跳转类型')
|
|
128
|
-
console.log(this.data.checkType)
|
|
129
|
-
if(options.source_type) {
|
|
130
|
-
console.log('接收到类型')
|
|
131
|
-
console.log(options.source_type)
|
|
132
|
-
this.setData({
|
|
133
|
-
source_type: options.source_type
|
|
134
|
-
})
|
|
135
|
-
}
|
|
136
|
-
// 修复 validateType.verification_code 中的 this 指向
|
|
137
|
-
const that = this
|
|
138
|
-
this.setData({
|
|
139
|
-
'validateType.verification_code': function(value, formData) {
|
|
140
|
-
// 通过闭包访问 Page 实例的 source_type
|
|
141
|
-
// if (that.data.source_type === '2') {
|
|
142
|
-
// return true
|
|
143
|
-
// }
|
|
144
|
-
if (!value || value.trim() === '') {
|
|
145
|
-
return false
|
|
146
|
-
}
|
|
147
|
-
return utils.validate.checkVerificationCode(value).data
|
|
148
|
-
}
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
// 如果 source_type === '2',从 rules 中移除 verification_code
|
|
152
|
-
if (this.data.source_type === '2') {
|
|
153
|
-
// const tempRules = { ...this.data.rules }
|
|
154
|
-
// delete tempRules.verification_code
|
|
155
|
-
// this.setData({
|
|
156
|
-
// rules: tempRules
|
|
157
|
-
// })
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
// 在 bank-card-verify.js 中添加
|
|
161
|
-
preventInput: function(e) {
|
|
162
|
-
// 阻止输入,保持原值不变
|
|
163
|
-
console.log('输入被阻止');
|
|
164
|
-
return false;
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
preventChange: function(e) {
|
|
168
|
-
// 阻止值改变
|
|
169
|
-
console.log('值改变被阻止');
|
|
170
|
-
return false;
|
|
171
|
-
},
|
|
172
|
-
/**
|
|
173
|
-
* 生命周期函数--监听页面初次渲染完成
|
|
174
|
-
*/
|
|
175
|
-
onReady() {
|
|
176
|
-
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* 生命周期函数--监听页面显示
|
|
181
|
-
*/
|
|
182
|
-
onShow() {
|
|
183
|
-
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* 生命周期函数--监听页面隐藏
|
|
188
|
-
*/
|
|
189
|
-
onHide() {
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* 生命周期函数--监听页面卸载
|
|
195
|
-
*/
|
|
196
|
-
onUnload() {
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
// 输入框去空
|
|
200
|
-
handleChange(e) {
|
|
201
|
-
let value = e.detail.value
|
|
202
|
-
let formId = (e && e.currentTarget && e.currentTarget.id) || (e && e.target && e.target.id) || ''
|
|
203
|
-
|
|
204
|
-
// 删除前后空格
|
|
205
|
-
if (typeof value === 'string' && formId !== 'cid_type') {
|
|
206
|
-
value = value.trim()
|
|
207
|
-
}
|
|
208
|
-
if (formId) {
|
|
209
|
-
this.setData({ [`formData.${formId}`]: value })
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
// 确认提交表单
|
|
213
|
-
async handleFormSubmit(e) {
|
|
214
|
-
const isOther = this.data.submitMode === 'other'
|
|
215
|
-
const formValid = e.detail.validStatus
|
|
216
|
-
if (isOther) {
|
|
217
|
-
const customValid = this.data.language !== 'en' ? { valid: true, msg: '' } : this.validateFullname()
|
|
218
|
-
if (!formValid || !customValid.valid) {
|
|
219
|
-
// 自定义校验字段有问题,获取表单错误列表
|
|
220
|
-
const formErrList = e.detail.value
|
|
221
|
-
// 如果表单校验有问题,自定义校验没问题,则显示表单校验错误提示
|
|
222
|
-
if (!formValid && customValid.valid) {
|
|
223
|
-
this.showCuntomErrTip(formErrList[0].message)
|
|
224
|
-
// 恢复 verification_code
|
|
225
|
-
const tempCode = this.data._tempVerificationCode || ''
|
|
226
|
-
this.setData({
|
|
227
|
-
formData: { ...this.data.formData, verification_code: tempCode },
|
|
228
|
-
isSubmitting: false
|
|
229
|
-
})
|
|
230
|
-
return
|
|
231
|
-
}
|
|
232
|
-
// 如果表单校验没有问题,自定义校验有问题,则显示自定义校验错误提示
|
|
233
|
-
if (formValid && !customValid.valid) {
|
|
234
|
-
this.showCuntomErrTip(customValid.msg)
|
|
235
|
-
// 恢复 verification_code
|
|
236
|
-
const tempCode = this.data._tempVerificationCode || ''
|
|
237
|
-
this.setData({
|
|
238
|
-
formData: { ...this.data.formData, verification_code: tempCode },
|
|
239
|
-
isSubmitting: false
|
|
240
|
-
})
|
|
241
|
-
return
|
|
242
|
-
}
|
|
243
|
-
// 如果两者都有问题,则判断显示谁
|
|
244
|
-
let lastMsg = ''
|
|
245
|
-
if (formErrList.some(i => ["id_card_number", "nation"].includes(i.name))) {
|
|
246
|
-
lastMsg = formErrList[0].message
|
|
247
|
-
} else {
|
|
248
|
-
lastMsg = customValid.msg
|
|
249
|
-
}
|
|
250
|
-
// 恢复 verification_code
|
|
251
|
-
const tempCode = this.data._tempVerificationCode || ''
|
|
252
|
-
this.setData({
|
|
253
|
-
formData: { ...this.data.formData, verification_code: tempCode },
|
|
254
|
-
submitMode: '',
|
|
255
|
-
isSubmitting: false
|
|
256
|
-
})
|
|
257
|
-
this.showCuntomErrTip(lastMsg)
|
|
258
|
-
wx.hideLoading()
|
|
259
|
-
return
|
|
260
|
-
}
|
|
261
|
-
// 校验通过,恢复 verification_code 并发送验证码
|
|
262
|
-
const tempCode = this.data._tempVerificationCode || ''
|
|
263
|
-
this.setData({
|
|
264
|
-
formData: { ...this.data.formData, verification_code: tempCode },
|
|
265
|
-
submitMode: '',
|
|
266
|
-
isSubmitting: false
|
|
267
|
-
})
|
|
268
|
-
this.sendVerificationCode()
|
|
269
|
-
return
|
|
270
|
-
}
|
|
271
|
-
// if(this.data.source_type === 2){
|
|
272
|
-
// // 临时保存并移除 verification_code
|
|
273
|
-
// const tempCode = this.data.formData.verification_code
|
|
274
|
-
// const tempFormData = { ...this.data.formData }
|
|
275
|
-
// delete tempFormData.verification_code
|
|
276
|
-
// // 同时从 rules 中移除 verification_code 的校验规则
|
|
277
|
-
// const tempRules = { ...this.data.rules }
|
|
278
|
-
// delete tempRules.verification_code
|
|
279
|
-
// this.setData({
|
|
280
|
-
// formData: tempFormData,
|
|
281
|
-
// rules: tempRules, // 使用不包含 verification_code 的 rules
|
|
282
|
-
// _tempVerificationCode: tempCode // 临时保存验证码
|
|
283
|
-
// })
|
|
284
|
-
// }
|
|
285
|
-
const customValid = this.data.language !== 'en' ? { valid: true, msg: '' } : this.validateFullname()
|
|
286
|
-
if (!formValid || !customValid.valid) {
|
|
287
|
-
// 自定义校验字段有问题,获取表单错误列表
|
|
288
|
-
const formErrList = e.detail.value
|
|
289
|
-
// 如果表单校验有问题,自定义校验没问题,则显示表单校验错误提示
|
|
290
|
-
if (!formValid && customValid.valid) {
|
|
291
|
-
this.showCuntomErrTip(formErrList[0].message)
|
|
292
|
-
return
|
|
293
|
-
}
|
|
294
|
-
// 如果表单校验没有问题,自定义校验有问题,则显示自定义校验错误提示
|
|
295
|
-
if (formValid && !customValid.valid) {
|
|
296
|
-
this.showCuntomErrTip(customValid.msg)
|
|
297
|
-
return
|
|
298
|
-
}
|
|
299
|
-
// 如果两者都有问题,则判断显示谁
|
|
300
|
-
let lastMsg = ''
|
|
301
|
-
if (formErrList.some(i => ["id_card_number", "nation"].includes(i.name))) {
|
|
302
|
-
lastMsg = formErrList[0].message
|
|
303
|
-
} else {
|
|
304
|
-
lastMsg = customValid.msg
|
|
305
|
-
}
|
|
306
|
-
this.showCuntomErrTip(lastMsg)
|
|
307
|
-
return
|
|
308
|
-
}
|
|
309
|
-
const { source_type, formData, idCardType } = this.data
|
|
310
|
-
// 前置判断-判断核验错误次数在5分钟内错误超过3次
|
|
311
|
-
let bankCardFailCount = constantVal.getStorageWithExpire(constantVal.bank_card_verify_fail_count)
|
|
312
|
-
let bankCardFailTime = constantVal.getStorageWithExpire(constantVal.bank_card_verify_fail_time)
|
|
313
|
-
if(bankCardFailTime){
|
|
314
|
-
if(bankCardFailCount >= 3){
|
|
315
|
-
console.log(bankCardFailCount)
|
|
316
|
-
// 当前时间
|
|
317
|
-
const now = Date.now()
|
|
318
|
-
|
|
319
|
-
// 判断是否在30分钟内(1小时 = 3600 * 1000 毫秒)
|
|
320
|
-
const isWithinOneHour = (now - bankCardFailTime) < (30 * 60 * 1000)
|
|
321
|
-
console.log('当前仍在30分钟限制内')
|
|
322
|
-
if(isWithinOneHour){
|
|
323
|
-
this.setData({
|
|
324
|
-
showToOtherModal: true
|
|
325
|
-
})
|
|
326
|
-
return
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
console.log('md加密验证码')
|
|
331
|
-
console.log(MD5(formData.verification_code).toString())
|
|
332
|
-
// 点击确定出现该提示
|
|
333
|
-
wx.showLoading({
|
|
334
|
-
title: '验证中...',
|
|
335
|
-
mask: true // 防止用户点击
|
|
336
|
-
})
|
|
337
|
-
const { formDataVerificationCode } = this.data
|
|
338
|
-
// const ms5Code = MD5(formData.verification_code).toString()
|
|
339
|
-
// if ( formDataVerificationCode !== ms5Code) {
|
|
340
|
-
// wx.hideLoading()
|
|
341
|
-
// wx.showToast({
|
|
342
|
-
// title: '验证码不一致,请重新输入',
|
|
343
|
-
// icon: 'none',
|
|
344
|
-
// duration: 2000
|
|
345
|
-
// })
|
|
346
|
-
// return
|
|
347
|
-
// }
|
|
348
|
-
// 接口验证短信验证码
|
|
349
|
-
let isVerifySmsCode = false
|
|
350
|
-
console.log('验证码参数')
|
|
351
|
-
console.log(formData)
|
|
352
|
-
const verSmsCodeParam = {
|
|
353
|
-
"mobile": formData.bank_phone,
|
|
354
|
-
"mobileCode": formData.verification_code
|
|
355
|
-
}
|
|
356
|
-
jingtongVerifyRequest.verifySmsCode(verSmsCodeParam).then(res => {
|
|
357
|
-
const { errcode, errmsg } = res
|
|
358
|
-
console.log('返回状态码')
|
|
359
|
-
console.log(errcode)
|
|
360
|
-
if(errcode !== 0){
|
|
361
|
-
console.log('进入了')
|
|
362
|
-
wx.showToast({
|
|
363
|
-
title: errmsg,
|
|
364
|
-
icon: 'none',
|
|
365
|
-
duration: 2000
|
|
366
|
-
})
|
|
367
|
-
isVerifySmsCode = true
|
|
368
|
-
} else{
|
|
369
|
-
if(!res.data.success) {
|
|
370
|
-
wx.showToast({
|
|
371
|
-
title: '验证码校验失败,请重新输入。',
|
|
372
|
-
icon: 'none',
|
|
373
|
-
duration: 2000
|
|
374
|
-
})
|
|
375
|
-
isVerifySmsCode = true
|
|
376
|
-
return
|
|
377
|
-
} else {
|
|
378
|
-
this.toOpera()
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
console.log('没有返回')
|
|
382
|
-
})
|
|
383
|
-
// if(source_type !== '2'){
|
|
384
|
-
// console.log('验证码参数')
|
|
385
|
-
// console.log(formData)
|
|
386
|
-
// const verSmsCodeParam = {
|
|
387
|
-
// "mobile": formData.bank_phone,
|
|
388
|
-
// "mobileCode": formData.verification_code
|
|
389
|
-
// }
|
|
390
|
-
// jingtongVerifyRequest.verifySmsCode(verSmsCodeParam).then(res => {
|
|
391
|
-
// const { errcode, errmsg } = res
|
|
392
|
-
// console.log('返回状态码')
|
|
393
|
-
// console.log(errcode)
|
|
394
|
-
// if(errcode !== 0){
|
|
395
|
-
// console.log('进入了')
|
|
396
|
-
// wx.showToast({
|
|
397
|
-
// title: errmsg,
|
|
398
|
-
// icon: 'none',
|
|
399
|
-
// duration: 2000
|
|
400
|
-
// })
|
|
401
|
-
// isVerifySmsCode = true
|
|
402
|
-
// } else{
|
|
403
|
-
// if(!res.data.success) {
|
|
404
|
-
// wx.showToast({
|
|
405
|
-
// title: '验证码校验失败,请重新输入。',
|
|
406
|
-
// icon: 'none',
|
|
407
|
-
// duration: 2000
|
|
408
|
-
// })
|
|
409
|
-
// isVerifySmsCode = true
|
|
410
|
-
// return
|
|
411
|
-
// } else {
|
|
412
|
-
// this.toOpera()
|
|
413
|
-
// }
|
|
414
|
-
// }
|
|
415
|
-
// console.log('没有返回')
|
|
416
|
-
// })
|
|
417
|
-
// } else {
|
|
418
|
-
// setTimeout(() => {
|
|
419
|
-
// this.toOpera()
|
|
420
|
-
// }, 1200)
|
|
421
|
-
// }
|
|
422
|
-
},
|
|
423
|
-
toOpera() {
|
|
424
|
-
const { formData, idCardType, source_type } = this.data
|
|
425
|
-
const param = {
|
|
426
|
-
'id_card_number': formData.id_card_number,
|
|
427
|
-
'type': 2,
|
|
428
|
-
'isCount': true
|
|
429
|
-
}
|
|
430
|
-
// 接口返回验证成功出现这个提示
|
|
431
|
-
// 接口验证有没有超出限制次数
|
|
432
|
-
jingtongVerifyRequest.getVerifyLimit(param).then(res => {
|
|
433
|
-
console.log(res)
|
|
434
|
-
if (res.errcode === 0){
|
|
435
|
-
const { data } = res
|
|
436
|
-
if(data.times >= 3){
|
|
437
|
-
wx.hideLoading()
|
|
438
|
-
this.setData({
|
|
439
|
-
showToOtherModal: true
|
|
440
|
-
})
|
|
441
|
-
} else {
|
|
442
|
-
console.log(idCardType)
|
|
443
|
-
console.log(idCardType[formData.cid_type])
|
|
444
|
-
console.log('来源类型')
|
|
445
|
-
console.log(source_type)
|
|
446
|
-
wx.hideLoading()
|
|
447
|
-
if(source_type === '2'){
|
|
448
|
-
this.forgotVerify()
|
|
449
|
-
} else {
|
|
450
|
-
this.setPwdVerify()
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
} else {
|
|
454
|
-
wx.hideLoading()
|
|
455
|
-
wx.showToast({
|
|
456
|
-
title: res.timeLimit,
|
|
457
|
-
icon: 'none',
|
|
458
|
-
duration: 1500
|
|
459
|
-
})
|
|
460
|
-
}
|
|
461
|
-
})
|
|
462
|
-
},
|
|
463
|
-
// 设置密码进入
|
|
464
|
-
setPwdVerify(){
|
|
465
|
-
console.log('设置密码进入')
|
|
466
|
-
// 前置判断-判断核验错误次数在5分钟内错误超过3次
|
|
467
|
-
let bankCardFailCount = constantVal.getStorageWithExpire(constantVal.bank_card_verify_fail_count)
|
|
468
|
-
let bankCardFailTime = constantVal.getStorageWithExpire(constantVal.bank_card_verify_fail_time)
|
|
469
|
-
const { source_type, formData, idCardType } = this.data
|
|
470
|
-
const VerifyBankParam = {
|
|
471
|
-
'id_card_number': formData.id_card_number,
|
|
472
|
-
"cert_name": formData.cardholder_name,
|
|
473
|
-
"verify_type": '110',
|
|
474
|
-
"support_type": '110',
|
|
475
|
-
"id_type": idCardType[formData.cid_type],
|
|
476
|
-
"account_no": formData.bank_card_account,
|
|
477
|
-
"mobile": formData.bank_phone,
|
|
478
|
-
"isbind": 1,
|
|
479
|
-
"nation": formData.nation,
|
|
480
|
-
"login_verify_expire_time": formData.verify_expire_time,
|
|
481
|
-
"login_verify_type": "1",
|
|
482
|
-
"cid_type": "111"
|
|
483
|
-
}
|
|
484
|
-
jingtongVerifyRequest.verifyBank(VerifyBankParam).then(res => {
|
|
485
|
-
console.log(res)
|
|
486
|
-
wx.hideLoading()
|
|
487
|
-
if(res.errcode === 0){
|
|
488
|
-
// 保存银行卡核验成功时间戳
|
|
489
|
-
let timeStamp = new Date().getTime()
|
|
490
|
-
wx.setStorageSync('tif.bankCardTimeStamp', timeStamp)
|
|
491
|
-
// 清空核验银行卡错误缓存
|
|
492
|
-
constantVal.removeStorage(constantVal.bank_card_verify_fail_count)
|
|
493
|
-
constantVal.removeStorage(constantVal.bank_card_verify_fail_time)
|
|
494
|
-
// 验证成功,这里跳转页面
|
|
495
|
-
jingtongVerifyRequest.getSession({
|
|
496
|
-
success: res => {
|
|
497
|
-
// 保存银行卡核验成功时间戳
|
|
498
|
-
let timeStamp = new Date().getTime()
|
|
499
|
-
wx.setStorageSync('tif.bankCardTimeStamp', timeStamp)
|
|
500
|
-
wx.setStorageSync('tif.formDataSuccess', res)
|
|
501
|
-
}
|
|
502
|
-
})
|
|
503
|
-
|
|
504
|
-
if(this.data.checkType === 3){
|
|
505
|
-
flow.redirectTo({
|
|
506
|
-
url: '../bind-phone/bind-phone?source=3'
|
|
507
|
-
})
|
|
508
|
-
} else {
|
|
509
|
-
wx.showToast({
|
|
510
|
-
title: '验证成功,跳转中…',
|
|
511
|
-
icon: 'none',
|
|
512
|
-
duration: 1500
|
|
513
|
-
})
|
|
514
|
-
const { cardholder_name, id_card_number, strCid, cid_type, verify_expire_time } = formData
|
|
515
|
-
wx.navigateTo({
|
|
516
|
-
url: '/weapps-plugin-jingtong-verify/pages/bank-card-login-pwd-setting/bank-card-login-pwd-setting?name=' + cardholder_name + '&idCardNumber=' + id_card_number + '&strCid=' + utils.hideIdCard(id_card_number, '111') + '&cid_type=' + cid_type + '&verify_expire_time=' + verify_expire_time,
|
|
517
|
-
})
|
|
518
|
-
}
|
|
519
|
-
} else {
|
|
520
|
-
const { errmsg } = res
|
|
521
|
-
if(bankCardFailCount >= 3){
|
|
522
|
-
bankCardFailCount = 0
|
|
523
|
-
}
|
|
524
|
-
bankCardFailCount = bankCardFailCount + 1
|
|
525
|
-
constantVal.setStorageWithExpire(constantVal.bank_card_verify_fail_count, bankCardFailCount, 5 * 60)
|
|
526
|
-
if(bankCardFailCount >= 3){
|
|
527
|
-
// 设置30分钟后过期
|
|
528
|
-
constantVal.setStorageWithExpire(constantVal.bank_card_verify_fail_time, Date.now(), 30 * 60)
|
|
529
|
-
}
|
|
530
|
-
if(errmsg){
|
|
531
|
-
wx.showToast({
|
|
532
|
-
title: '验证失败,' + errmsg,
|
|
533
|
-
icon: 'none',
|
|
534
|
-
duration: 1500
|
|
535
|
-
})
|
|
536
|
-
} else {
|
|
537
|
-
wx.showToast({
|
|
538
|
-
title: '验证失败,请检查后重试…',
|
|
539
|
-
icon: 'none',
|
|
540
|
-
duration: 1500
|
|
541
|
-
})
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
})
|
|
545
|
-
},
|
|
546
|
-
// 忘记密码进入
|
|
547
|
-
forgotVerify(){
|
|
548
|
-
console.log('进入忘记密码')
|
|
549
|
-
// 前置判断-判断核验错误次数在5分钟内错误超过3次
|
|
550
|
-
let bankCardFailCount = constantVal.getStorageWithExpire(constantVal.bank_card_verify_fail_count)
|
|
551
|
-
let bankCardFailTime = constantVal.getStorageWithExpire(constantVal.bank_card_verify_fail_time)
|
|
552
|
-
const { source_type, formData, idCardType } = this.data
|
|
553
|
-
const VerifyBankParam = {
|
|
554
|
-
'id_card_number': formData.id_card_number,
|
|
555
|
-
"cert_name": formData.cardholder_name,
|
|
556
|
-
"verify_type": '110',
|
|
557
|
-
"support_type": '110',
|
|
558
|
-
"id_type": idCardType[formData.cid_type],
|
|
559
|
-
"account_no": formData.bank_card_account,
|
|
560
|
-
"mobile": formData.bank_phone,
|
|
561
|
-
"isbind": 1,
|
|
562
|
-
"cid_type": "111"
|
|
563
|
-
}
|
|
564
|
-
jingtongVerifyRequest.setNewPwdToBankCardVerifyWithIdCard(VerifyBankParam).then(res => {
|
|
565
|
-
|
|
566
|
-
console.log('银行卡校验')
|
|
567
|
-
console.log(res)
|
|
568
|
-
// wx.hideLoading()
|
|
569
|
-
if(res.errcode === 0){
|
|
570
|
-
// 保存银行卡核验成功时间戳
|
|
571
|
-
let timeStamp = new Date().getTime()
|
|
572
|
-
wx.setStorageSync('tif.bankCardTimeStamp', timeStamp)
|
|
573
|
-
// 清空核验银行卡错误缓存
|
|
574
|
-
constantVal.removeStorage(constantVal.bank_card_verify_fail_count)
|
|
575
|
-
constantVal.removeStorage(constantVal.bank_card_verify_fail_time)
|
|
576
|
-
|
|
577
|
-
wx.showToast({
|
|
578
|
-
title: '验证成功,跳转中…',
|
|
579
|
-
icon: 'none',
|
|
580
|
-
duration: 1500
|
|
581
|
-
})
|
|
582
|
-
const { cardholder_name, id_card_number, strCid, cid_type, verify_expire_time } = formData
|
|
583
|
-
wx.navigateTo({
|
|
584
|
-
url: '/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting?name=' + cardholder_name + '&idCardNumber=' + id_card_number + '&strCid=' + utils.hideIdCard(id_card_number, '111') + '&cid_type=' + cid_type + '&verify_expire_time=' + verify_expire_time + '&source_type=' + source_type,
|
|
585
|
-
})
|
|
586
|
-
} else {
|
|
587
|
-
const { errmsg } = res
|
|
588
|
-
if(bankCardFailCount >= 3){
|
|
589
|
-
bankCardFailCount = 0
|
|
590
|
-
}
|
|
591
|
-
bankCardFailCount = bankCardFailCount + 1
|
|
592
|
-
constantVal.setStorageWithExpire(constantVal.bank_card_verify_fail_count, bankCardFailCount, 5 * 60)
|
|
593
|
-
if(bankCardFailCount >= 3){
|
|
594
|
-
// 设置30分钟后过期
|
|
595
|
-
constantVal.setStorageWithExpire(constantVal.bank_card_verify_fail_time, Date.now(), 30 * 60)
|
|
596
|
-
}
|
|
597
|
-
if(errmsg){
|
|
598
|
-
wx.showToast({
|
|
599
|
-
title: '验证失败,' + errmsg,
|
|
600
|
-
icon: 'none',
|
|
601
|
-
duration: 1500
|
|
602
|
-
})
|
|
603
|
-
} else {
|
|
604
|
-
wx.showToast({
|
|
605
|
-
title: '验证失败,请检查后重试…',
|
|
606
|
-
icon: 'none',
|
|
607
|
-
duration: 1500
|
|
608
|
-
})
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
})
|
|
612
|
-
},
|
|
613
|
-
// 调起人脸识别认证
|
|
614
|
-
handleToFace() {
|
|
615
|
-
console.log('====调起人脸识别认证====')
|
|
616
|
-
const { source_type } = this.data
|
|
617
|
-
if(source_type === 2){
|
|
618
|
-
|
|
619
|
-
console.log(this.data.formData)
|
|
620
|
-
const { cardholder_name, id_card_number, strCid, cid_type, verify_expire_time } = this.data.formData
|
|
621
|
-
|
|
622
|
-
// 跳转去人脸认证
|
|
623
|
-
this.setData({
|
|
624
|
-
showToOtherModal: false
|
|
625
|
-
}, () => {
|
|
626
|
-
setTimeout(() => {
|
|
627
|
-
wx.navigateTo({
|
|
628
|
-
url: '/weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-face-setting/bank-card-login-forgot-face-setting?name=' + cardholder_name + '&idCardNumber=' + id_card_number + '&strCid=' + utils.hideIdCard(id_card_number, '111') + '&cid_type=' + cid_type + '&verify_expire_time=' + verify_expire_time + '&source_type=' + source_type + '&isSuccess=2',
|
|
629
|
-
})
|
|
630
|
-
}, 100)
|
|
631
|
-
})
|
|
632
|
-
} else {
|
|
633
|
-
// 跳转去人脸认证
|
|
634
|
-
this.setData({
|
|
635
|
-
showToOtherModal: false
|
|
636
|
-
}, () => {
|
|
637
|
-
setTimeout(() => {
|
|
638
|
-
wx.navigateBack()
|
|
639
|
-
}, 100)
|
|
640
|
-
})
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
// 关闭提示框
|
|
644
|
-
handleToCancel () {
|
|
645
|
-
this.setData({
|
|
646
|
-
showToOtherModal: false
|
|
647
|
-
})
|
|
648
|
-
},
|
|
649
|
-
// 登录帮助
|
|
650
|
-
handletoLoginHelp () {
|
|
651
|
-
wx.navigateTo({
|
|
652
|
-
url: '/weapps-plugin-jingtong-verify/pages/login-help/login-help',
|
|
653
|
-
})
|
|
654
|
-
},
|
|
655
|
-
// 显示自定义校验错误提示
|
|
656
|
-
showCuntomErrTip(msg) {
|
|
657
|
-
this.setData({
|
|
658
|
-
showCustomTips: true,
|
|
659
|
-
customTipsMsg: msg
|
|
660
|
-
}, () => {
|
|
661
|
-
// 3秒后关闭
|
|
662
|
-
setTimeout(() => {
|
|
663
|
-
this.setData({
|
|
664
|
-
showCustomTips: false,
|
|
665
|
-
customTipsMsg: ''
|
|
666
|
-
});
|
|
667
|
-
}, 3500);
|
|
668
|
-
})
|
|
669
|
-
},
|
|
670
|
-
// 触发问号弹出
|
|
671
|
-
showQuestionTip() {
|
|
672
|
-
this.setData({
|
|
673
|
-
showTipModal: true
|
|
674
|
-
})
|
|
675
|
-
},
|
|
676
|
-
openEye(e) {
|
|
677
|
-
console.log(e)
|
|
678
|
-
const isOpen = e.detail.isOpen
|
|
679
|
-
const key = e.currentTarget.id
|
|
680
|
-
const strKey = e.currentTarget.dataset.star
|
|
681
|
-
console.log('isOpen', isOpen)
|
|
682
|
-
console.log('key', key)
|
|
683
|
-
console.log('strKey', strKey)
|
|
684
|
-
if (isOpen) {
|
|
685
|
-
console.log('显示脱敏')
|
|
686
|
-
const { id_card_number } = this.data.formData
|
|
687
|
-
const value = utils.hideIdCard(id_card_number, '111')
|
|
688
|
-
console.log('value', value)
|
|
689
|
-
this.setData({
|
|
690
|
-
[`formData.${strKey}`]: value
|
|
691
|
-
})
|
|
692
|
-
} else {
|
|
693
|
-
console.log('删除脱敏,显示明文')
|
|
694
|
-
this.setData({
|
|
695
|
-
[`formData.${strKey}`]: ''
|
|
696
|
-
})
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
handleModalOk() {
|
|
700
|
-
this.setData({
|
|
701
|
-
showTipModal: false
|
|
702
|
-
})
|
|
703
|
-
},
|
|
704
|
-
|
|
705
|
-
// 发送验证码
|
|
706
|
-
async sendVerificationCodeVerify() {
|
|
707
|
-
// 检查是否正在处理中
|
|
708
|
-
if (this.data.isSubmitting) {
|
|
709
|
-
console.log('正在处理中,请勿重复点击')
|
|
710
|
-
wx.showToast({
|
|
711
|
-
title: '正在处理中,请稍候...',
|
|
712
|
-
icon: 'none',
|
|
713
|
-
duration: 1500
|
|
714
|
-
})
|
|
715
|
-
return
|
|
716
|
-
}
|
|
717
|
-
// 立即设置处理状态,防止重复点击
|
|
718
|
-
this.data.isSubmitting = true
|
|
719
|
-
try {
|
|
720
|
-
// 临时保存并移除 verification_code
|
|
721
|
-
const tempCode = this.data.formData.verification_code
|
|
722
|
-
const tempFormData = { ...this.data.formData }
|
|
723
|
-
delete tempFormData.verification_code
|
|
724
|
-
|
|
725
|
-
this.setData({
|
|
726
|
-
submitMode: 'other',
|
|
727
|
-
formData: tempFormData,
|
|
728
|
-
_tempVerificationCode: tempCode // 临时保存验证码
|
|
729
|
-
})
|
|
730
|
-
|
|
731
|
-
const form = this.selectComponent('#form')
|
|
732
|
-
if (form && typeof form.handleSubmit === 'function') {
|
|
733
|
-
form.handleSubmit()
|
|
734
|
-
} else {
|
|
735
|
-
// 恢复 verification_code
|
|
736
|
-
this.setData({
|
|
737
|
-
formData: { ...this.data.formData, verification_code: tempCode },
|
|
738
|
-
submitMode: '',
|
|
739
|
-
isSubmitting: false,
|
|
740
|
-
_tempVerificationCode: '' // 清空临时值
|
|
741
|
-
})
|
|
742
|
-
}
|
|
743
|
-
} catch (error) {
|
|
744
|
-
// 恢复 verification_code
|
|
745
|
-
this.setData({
|
|
746
|
-
formData: { ...this.data.formData, verification_code: tempCode },
|
|
747
|
-
submitMode: '',
|
|
748
|
-
isSubmitting: false,
|
|
749
|
-
_tempVerificationCode: '' // 清空临时值
|
|
750
|
-
})
|
|
751
|
-
}
|
|
752
|
-
},
|
|
753
|
-
// 发送验证码
|
|
754
|
-
sendVerificationCode() {
|
|
755
|
-
if (this.data.isCountingDown) {
|
|
756
|
-
return;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
// 检查重试次数
|
|
760
|
-
// if (this.data.retryCount >= this.data.maxRetryCount) {
|
|
761
|
-
// wx.showToast({
|
|
762
|
-
// title: '今日发送次数已达上限',
|
|
763
|
-
// icon: 'none'
|
|
764
|
-
// });
|
|
765
|
-
// return;
|
|
766
|
-
// }
|
|
767
|
-
const { formData } = this.data
|
|
768
|
-
if(formData.bank_phone === ''){
|
|
769
|
-
wx.showToast({
|
|
770
|
-
title: '手机号码与绑定手机号码不一致,请检查后输入',
|
|
771
|
-
icon: 'none',
|
|
772
|
-
duration: 2000
|
|
773
|
-
});
|
|
774
|
-
return;
|
|
775
|
-
}
|
|
776
|
-
// 验证手机号格式
|
|
777
|
-
if (!this.validatePhone(formData.bank_phone)) {
|
|
778
|
-
wx.showToast({
|
|
779
|
-
title: '请输入正确的手机号',
|
|
780
|
-
icon: 'none'
|
|
781
|
-
});
|
|
782
|
-
return;
|
|
783
|
-
}
|
|
784
|
-
// this.toGetPhoneCodeByIdCard()
|
|
785
|
-
this.checkBankCardInfo()
|
|
786
|
-
console.log(this.data.bankInfoSuccess)
|
|
787
|
-
|
|
788
|
-
},
|
|
789
|
-
sendSmsCode(phoneNumber) {
|
|
790
|
-
wx.showLoading({
|
|
791
|
-
title: '发送中...'
|
|
792
|
-
});
|
|
793
|
-
// 调接口获取短信验证码
|
|
794
|
-
jingtongVerifyRequest.sendSmsCode(phoneNumber).then(res => {
|
|
795
|
-
console.log(res.data)
|
|
796
|
-
const { data, errcode, errmsg } = res
|
|
797
|
-
wx.hideLoading()
|
|
798
|
-
if(errcode === 0){
|
|
799
|
-
wx.showToast({
|
|
800
|
-
title: '验证码已发送',
|
|
801
|
-
icon: 'success'
|
|
802
|
-
});
|
|
803
|
-
this.startCountdown();
|
|
804
|
-
this.setData({
|
|
805
|
-
isSendSms: true,
|
|
806
|
-
formDataVerificationCode: data.code
|
|
807
|
-
});
|
|
808
|
-
} else {
|
|
809
|
-
wx.showToast({
|
|
810
|
-
title: errmsg || '验证码获取已超10次,请明天再试。',
|
|
811
|
-
icon: 'none',
|
|
812
|
-
duration: 2500
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
})
|
|
816
|
-
},
|
|
817
|
-
// 开始倒计时
|
|
818
|
-
startCountdown() {
|
|
819
|
-
this.setData({
|
|
820
|
-
countdown: 60,
|
|
821
|
-
isCountingDown: true,
|
|
822
|
-
verificationText: '已发送(60s)'
|
|
823
|
-
});
|
|
824
|
-
|
|
825
|
-
this.countdownTimer = setInterval(() => {
|
|
826
|
-
const newCountdown = this.data.countdown - 1;
|
|
827
|
-
|
|
828
|
-
if (newCountdown <= 0) {
|
|
829
|
-
this.setData({
|
|
830
|
-
countdown: 0,
|
|
831
|
-
isCountingDown: false,
|
|
832
|
-
verificationText: '重新发送'
|
|
833
|
-
});
|
|
834
|
-
clearInterval(this.countdownTimer);
|
|
835
|
-
this.countdownTimer = null;
|
|
836
|
-
} else {
|
|
837
|
-
this.setData({
|
|
838
|
-
countdown: newCountdown,
|
|
839
|
-
verificationText: `已发送(${newCountdown}s)`
|
|
840
|
-
});
|
|
841
|
-
}
|
|
842
|
-
}, 1000);
|
|
843
|
-
},
|
|
844
|
-
// 获取手机号尾号并设置手机号是否匹配
|
|
845
|
-
toGetPhoneCodeByIdCard(){
|
|
846
|
-
const { formData } = this.data
|
|
847
|
-
const phoneCodeParam = {
|
|
848
|
-
"id_card_number" : formData.id_card_number,
|
|
849
|
-
"mobile": formData.bank_phone
|
|
850
|
-
}
|
|
851
|
-
jingtongVerifyRequest.getInfoCheck(phoneCodeParam).then(res => {
|
|
852
|
-
const { errcode, errmsg } = res
|
|
853
|
-
if(errcode === 0){
|
|
854
|
-
this.setData({
|
|
855
|
-
isFormDataCodeMobile: res.data.is_matched
|
|
856
|
-
})
|
|
857
|
-
} else {
|
|
858
|
-
wx.showToast({
|
|
859
|
-
title: errmsg,
|
|
860
|
-
icon: "none",
|
|
861
|
-
duration: 3000
|
|
862
|
-
})
|
|
863
|
-
}
|
|
864
|
-
})
|
|
865
|
-
},
|
|
866
|
-
// 验证手机号
|
|
867
|
-
validatePhone(phone) {
|
|
868
|
-
console.log(phone)
|
|
869
|
-
const phoneReg = /^1[3-9]\d{9}$/;
|
|
870
|
-
return phoneReg.test(phone);
|
|
871
|
-
},
|
|
872
|
-
// 银行卡号失焦检测
|
|
873
|
-
bankCardToCheckBankInfo() {
|
|
874
|
-
const { formData, source_type }= this.data
|
|
875
|
-
// 设置密码才进行检测,如果是忘记密码进入的,不走这里
|
|
876
|
-
if(source_type != 2){
|
|
877
|
-
// 手机号号是否填写,填写就进行银行卡核验
|
|
878
|
-
if(formData.phone_number){
|
|
879
|
-
console.log('填写了')
|
|
880
|
-
// this.checkBankCardInfo()
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
},
|
|
884
|
-
// 手机号失焦检测
|
|
885
|
-
phoneToCheckBankInfo(){
|
|
886
|
-
const { formData, source_type }= this.data
|
|
887
|
-
// 设置密码才进行检测,如果是忘记密码进入的,不走这里
|
|
888
|
-
if(source_type != 2) {
|
|
889
|
-
// 银行卡号是否填写,填写就进行银行卡核验
|
|
890
|
-
if(formData.bank_card_account){
|
|
891
|
-
console.log('填写了')
|
|
892
|
-
// this.checkBankCardInfo()
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
},
|
|
896
|
-
// 银行卡核验-仅核验
|
|
897
|
-
checkBankCardInfo() {
|
|
898
|
-
wx.showLoading({
|
|
899
|
-
title: '验证中…',
|
|
900
|
-
})
|
|
901
|
-
const { formData, idCardType }= this.data
|
|
902
|
-
console.log('参数')
|
|
903
|
-
console.log(formData)
|
|
904
|
-
const checkBankCardParam = {
|
|
905
|
-
'id_card_number': formData.id_card_number,
|
|
906
|
-
"cert_name": formData.cardholder_name,
|
|
907
|
-
"verify_type": '110',
|
|
908
|
-
"support_type": '110',
|
|
909
|
-
"id_type": idCardType[formData.cid_type],
|
|
910
|
-
"account_no": formData.bank_card_account,
|
|
911
|
-
"mobile": formData.bank_phone,
|
|
912
|
-
"isbind": 1,
|
|
913
|
-
"cid_type": "111"
|
|
914
|
-
}
|
|
915
|
-
jingtongVerifyRequest.setNewPwdToBankCardVerifyWithIdCard(checkBankCardParam).then(res =>{
|
|
916
|
-
console.log('请求结果')
|
|
917
|
-
console.log(res)
|
|
918
|
-
wx.hideLoading()
|
|
919
|
-
const { errcode, errmsg } = res
|
|
920
|
-
//核验通过,进行标记
|
|
921
|
-
if(errcode === 0){
|
|
922
|
-
this.setData({
|
|
923
|
-
bankInfoSuccess: true
|
|
924
|
-
})
|
|
925
|
-
// 手机号匹配,进行发送验证码
|
|
926
|
-
if(this.data.bankInfoSuccess){
|
|
927
|
-
const { formData } = this.data
|
|
928
|
-
this.sendSmsCode(formData.bank_phone)
|
|
929
|
-
}
|
|
930
|
-
} else {
|
|
931
|
-
wx.showToast({
|
|
932
|
-
title: errmsg,
|
|
933
|
-
icon: 'none',
|
|
934
|
-
duration: 3000
|
|
935
|
-
})
|
|
936
|
-
this.setData({
|
|
937
|
-
bankInfoSuccess: false
|
|
938
|
-
})
|
|
939
|
-
}
|
|
940
|
-
}).catch(error => {
|
|
941
|
-
wx.showToast({
|
|
942
|
-
title: '请求异常',
|
|
943
|
-
icon: 'none',
|
|
944
|
-
duration: 3000
|
|
945
|
-
})
|
|
946
|
-
})
|
|
947
|
-
},
|
|
948
|
-
/**
|
|
949
|
-
* 打开收不到验证码提示框
|
|
950
|
-
*/
|
|
951
|
-
handleNotVerificationTipModal () {
|
|
952
|
-
this.setData({
|
|
953
|
-
showNotGetVerificationCodeTipModal: true
|
|
954
|
-
})
|
|
955
|
-
},
|
|
956
|
-
/**
|
|
957
|
-
* 关闭收不到验证码提示框
|
|
958
|
-
*/
|
|
959
|
-
handleNotGetVerificationCodeTipModalCancel() {
|
|
960
|
-
this.setData({
|
|
961
|
-
showNotGetVerificationCodeTipModal: false
|
|
962
|
-
})
|
|
963
|
-
},
|
|
964
|
-
/**
|
|
965
|
-
* 页面相关事件处理函数--监听用户下拉动作
|
|
966
|
-
*/
|
|
967
|
-
onPullDownRefresh() {
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
|
|
971
|
-
/**
|
|
972
|
-
* 页面上拉触底事件的处理函数
|
|
973
|
-
*/
|
|
974
|
-
onReachBottom() {
|
|
975
|
-
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* 用户点击右上角分享
|
|
980
|
-
*/
|
|
981
|
-
onShareAppMessage() {
|
|
982
|
-
|
|
983
|
-
}
|
|
984
|
-
})
|