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
package/sdk.js
CHANGED
|
@@ -1,321 +1,310 @@
|
|
|
1
|
-
const jingtongVerifyRequest = require('./weapps-plugin-jingtong-verify/utils/request')
|
|
2
|
-
const { nation } = require("./weapps-plugin-jingtong-verify/utils/country")
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
//
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
const
|
|
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
|
-
|
|
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
|
-
exports.setLocalLanguage = (options) => {
|
|
314
|
-
// 对参数做兼容性处理
|
|
315
|
-
let optionsParse = parseOptions(options)
|
|
316
|
-
|
|
317
|
-
Object.assign(optionsParse, {
|
|
318
|
-
language: optionsParse.language || 'zh_CN'
|
|
319
|
-
})
|
|
320
|
-
wx.setStorageSync('tif.currentLanguage', optionsParse.language)
|
|
1
|
+
const jingtongVerifyRequest = require('./weapps-plugin-jingtong-verify/utils/request')
|
|
2
|
+
const { nation } = require("./weapps-plugin-jingtong-verify/utils/country")
|
|
3
|
+
const {
|
|
4
|
+
flow,
|
|
5
|
+
config
|
|
6
|
+
} = require('@wecity/weda-plugin-utils')
|
|
7
|
+
|
|
8
|
+
// 统一插件配置
|
|
9
|
+
exports.init = (options) => {
|
|
10
|
+
console.log('设置配置', options)
|
|
11
|
+
jingtongVerifyRequest.init(options)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// 对业务侧入参进行拦截和兼容
|
|
15
|
+
const parseOptions = (options) => {
|
|
16
|
+
const optionsType = Object.prototype.toString.call(options)
|
|
17
|
+
console.log('===处理前options===', options)
|
|
18
|
+
if ((options && optionsType !== '[object Object]') || (optionsType === '[object Null]')) {
|
|
19
|
+
console.error('业务侧入参不合法!!入参的数据类型必须为对象')
|
|
20
|
+
options = {}
|
|
21
|
+
}
|
|
22
|
+
options = Object.assign({}, options)
|
|
23
|
+
console.log('== 处理后options ==', options)
|
|
24
|
+
return options
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 获取会话
|
|
28
|
+
exports.getSession = (options) => {
|
|
29
|
+
// 对参数做兼容性处理
|
|
30
|
+
let optionsParse = parseOptions(options)
|
|
31
|
+
|
|
32
|
+
jingtongVerifyRequest.getSession({
|
|
33
|
+
success: res => {
|
|
34
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
35
|
+
},
|
|
36
|
+
fail: fail => {
|
|
37
|
+
console.log('getSession-fail', fail)
|
|
38
|
+
optionsParse && optionsParse.fail && optionsParse.fail(fail)
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 个人信息
|
|
44
|
+
exports.goToUserInfo = () => {
|
|
45
|
+
console.log('跳转到子包 === 个人信息服务')
|
|
46
|
+
return flow.createFlow('/weapps-plugin-jingtong-verify/pages/user-info/user-info')
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 设置
|
|
50
|
+
exports.goToSetting = () => {
|
|
51
|
+
console.log('跳转到子包 === 设置服务')
|
|
52
|
+
return flow.createFlow('/weapps-plugin-jingtong-verify/pages/setting/setting')
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 身份验证
|
|
56
|
+
const toVerify = () => {
|
|
57
|
+
return flow.createFlow('/weapps-plugin-jingtong-verify/pages/face-verify/face-verify', {
|
|
58
|
+
needUnite: 'true' // 需串联起来
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// 确认手机号码
|
|
63
|
+
const toConfirmPhone = () => {
|
|
64
|
+
return flow.createFlow('/weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone')
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 绑定手机号码
|
|
68
|
+
const toBindPhone = (source) => {
|
|
69
|
+
return flow.createFlow('/weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone', {
|
|
70
|
+
source
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// 比较两个时间 time1,time2均为日期类型
|
|
75
|
+
// 判断当前日期与time1日期是否相差小于6月
|
|
76
|
+
const completeDate = (time1, m) => {
|
|
77
|
+
var diffyear = new Date().getFullYear() - time1.getFullYear();
|
|
78
|
+
var diffmonth = diffyear * 12 + new Date().getMonth() - time1.getMonth();
|
|
79
|
+
if (diffmonth < 0) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
var diffDay = new Date().getDate() - time1.getDate();
|
|
84
|
+
if (diffmonth < m || (diffmonth == m && diffDay <= 0)) {
|
|
85
|
+
if (diffmonth == m && diffDay == 0) {
|
|
86
|
+
var timeA = time1.getHours() * 3600 + 60 * time1.getMinutes() + time1.getSeconds();
|
|
87
|
+
var timeB = new Date().getHours() * 3600 + 60 * new Date().getMinutes() + new Date().getSeconds();
|
|
88
|
+
if (timeB - timeA > 0) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 串通业务总接口
|
|
98
|
+
exports.getPersonToken = (options) => {
|
|
99
|
+
// 对参数做兼容性处理
|
|
100
|
+
let optionsParse = parseOptions(options)
|
|
101
|
+
|
|
102
|
+
jingtongVerifyRequest.getSession({
|
|
103
|
+
success: res => {
|
|
104
|
+
if (!res.face_time && !res.realname_time) {
|
|
105
|
+
// 未身份验证/身份验证已过期
|
|
106
|
+
toVerify().then(res => {
|
|
107
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
108
|
+
})
|
|
109
|
+
} else {
|
|
110
|
+
// 身份验证未过期 => 判断有无手机号码
|
|
111
|
+
if (res.has_phone) {
|
|
112
|
+
const { tel_confirm_time } = res
|
|
113
|
+
if (res.phone !== res.caPhone && tel_confirm_time && (!completeDate(new Date(Number(tel_confirm_time + '000')), 6))) {
|
|
114
|
+
// 【phone与caPhone不同】且【tel_confirm_time大于6个月】
|
|
115
|
+
// toConfirmPhone().then(res => {
|
|
116
|
+
// optionsParse && optionsParse.success && optionsParse.success(res)
|
|
117
|
+
// })
|
|
118
|
+
// 新增逻辑:如果caPhone存在,则跳转原来的逻辑,即换绑手机号,否则跳转绑定手机号
|
|
119
|
+
if (res.caPhone == null || res.caPhone === '') {
|
|
120
|
+
toBindPhone('14').then(res => {
|
|
121
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
122
|
+
})
|
|
123
|
+
} else {
|
|
124
|
+
toConfirmPhone().then(res => {
|
|
125
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
} else {
|
|
129
|
+
// 手机号码未过期
|
|
130
|
+
jingtongVerifyRequest.personToken({
|
|
131
|
+
from: 'sdk'
|
|
132
|
+
}).then(data => {
|
|
133
|
+
optionsParse && optionsParse.success && optionsParse.success({
|
|
134
|
+
token: data
|
|
135
|
+
})
|
|
136
|
+
}).catch(err => {
|
|
137
|
+
console.log(JSON.parse(err))
|
|
138
|
+
if (err && err === '4035') {
|
|
139
|
+
// 无手机号码 => 绑定手机号码
|
|
140
|
+
toBindPhone('5').then(res => {
|
|
141
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
// 无手机号码 => 绑定手机号码
|
|
148
|
+
toBindPhone('6').then(res => {
|
|
149
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
fail: err => {
|
|
155
|
+
console.log('getSession-fail', err)
|
|
156
|
+
optionsParse && optionsParse.fail && optionsParse.fail(err)
|
|
157
|
+
}
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 外国护照认证
|
|
162
|
+
const toPassportVerify = () => {
|
|
163
|
+
return flow.createFlow('/weapps-plugin-jingtong-verify/pages/passport-verify/passport-verify', {
|
|
164
|
+
needUnite: 'true' // 需串联起来
|
|
165
|
+
})
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// 串通业务总接口 -- 外国护照入口
|
|
169
|
+
exports.getPersonTokenPassport = (options) => {
|
|
170
|
+
// 对参数做兼容性处理
|
|
171
|
+
let optionsParse = parseOptions(options)
|
|
172
|
+
|
|
173
|
+
jingtongVerifyRequest.getSession({
|
|
174
|
+
success: res => {
|
|
175
|
+
if (!res.face_time && !res.realname_time) {
|
|
176
|
+
// 未身份验证/身份验证已过期
|
|
177
|
+
toPassportVerify().then(res => {
|
|
178
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
179
|
+
})
|
|
180
|
+
} else {
|
|
181
|
+
// 身份验证未过期 => 判断有无手机号码
|
|
182
|
+
if (res.has_phone) {
|
|
183
|
+
const { tel_confirm_time } = res
|
|
184
|
+
if (res.phone !== res.caPhone && tel_confirm_time && (!completeDate(new Date(Number(tel_confirm_time + '000')), 6))) {
|
|
185
|
+
// 【phone与caPhone不同】且【tel_confirm_time大于6个月】
|
|
186
|
+
// toConfirmPhone().then(res => {
|
|
187
|
+
// optionsParse && optionsParse.success && optionsParse.success(res)
|
|
188
|
+
// })
|
|
189
|
+
// 新增逻辑:如果caPhone存在,则跳转原来的逻辑,即换绑手机号,否则跳转绑定手机号
|
|
190
|
+
if (res.caPhone == null || res.caPhone === '') {
|
|
191
|
+
toBindPhone('14').then(res => {
|
|
192
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
193
|
+
})
|
|
194
|
+
} else {
|
|
195
|
+
toConfirmPhone().then(res => {
|
|
196
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
197
|
+
})
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
// 手机号码未过期
|
|
201
|
+
jingtongVerifyRequest.personToken({
|
|
202
|
+
from: 'sdk'
|
|
203
|
+
}).then(data => {
|
|
204
|
+
optionsParse && optionsParse.success && optionsParse.success({
|
|
205
|
+
token: data
|
|
206
|
+
})
|
|
207
|
+
}).catch(err => {
|
|
208
|
+
console.log(JSON.parse(err))
|
|
209
|
+
if (err && err === '4035') {
|
|
210
|
+
// 无手机号码 => 绑定手机号码
|
|
211
|
+
toBindPhone('5').then(res => {
|
|
212
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
213
|
+
})
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
}
|
|
217
|
+
} else {
|
|
218
|
+
// 无手机号码 => 绑定手机号码
|
|
219
|
+
toBindPhone('6').then(res => {
|
|
220
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
221
|
+
})
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
fail: err => {
|
|
226
|
+
console.log('getSession-fail', err)
|
|
227
|
+
optionsParse && optionsParse.fail && optionsParse.fail(err)
|
|
228
|
+
}
|
|
229
|
+
})
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// 退出登录(非页面)
|
|
233
|
+
exports.toLogOut = (options) => {
|
|
234
|
+
// 对参数做兼容性处理
|
|
235
|
+
let optionsParse = parseOptions(options)
|
|
236
|
+
|
|
237
|
+
// 将弹窗标识设置为不需要弹窗
|
|
238
|
+
jingtongVerifyRequest.setUserReadStatus(false).then(() => {
|
|
239
|
+
console.log('设置弹窗标识成功')
|
|
240
|
+
|
|
241
|
+
jingtongVerifyRequest.logOut().then(() => {
|
|
242
|
+
optionsParse && optionsParse.success && optionsParse.success()
|
|
243
|
+
}).catch(err => {
|
|
244
|
+
console.log('退出登录err', err)
|
|
245
|
+
optionsParse && optionsParse.fail && optionsParse.fail(err)
|
|
246
|
+
})
|
|
247
|
+
}).catch(err => {
|
|
248
|
+
console.log('设置弹窗标识失败', err)
|
|
249
|
+
})
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// 获取弹窗标识
|
|
253
|
+
exports.getUserReadStatus = (options) => {
|
|
254
|
+
// 对参数做兼容性处理
|
|
255
|
+
let optionsParse = parseOptions(options)
|
|
256
|
+
|
|
257
|
+
jingtongVerifyRequest.getUserReadStatus().then(res => {
|
|
258
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
259
|
+
}).catch(err => {
|
|
260
|
+
optionsParse && optionsParse.fail && optionsParse.fail(err)
|
|
261
|
+
})
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// 设置弹窗标识(入参默认为不需要弹窗)
|
|
265
|
+
exports.setUserReadStatus = (options) => {
|
|
266
|
+
// 对参数做兼容性处理
|
|
267
|
+
let optionsParse = parseOptions(options)
|
|
268
|
+
|
|
269
|
+
const status = optionsParse && optionsParse.needRead || false
|
|
270
|
+
console.log('业务侧入参的弹窗标识', status)
|
|
271
|
+
jingtongVerifyRequest.setUserReadStatus(status).then(() => {
|
|
272
|
+
console.log('设置弹窗标识成功')
|
|
273
|
+
}).catch(err => {
|
|
274
|
+
console.log('设置弹窗标识失败', err)
|
|
275
|
+
})
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// 拉起人脸识别,返回结果
|
|
279
|
+
exports.toFaceVerifyAll = (options) => {
|
|
280
|
+
// 对参数做兼容性处理
|
|
281
|
+
let optionsParse = parseOptions(options)
|
|
282
|
+
|
|
283
|
+
jingtongVerifyRequest.fetchFaceVerify({
|
|
284
|
+
params: optionsParse.params,
|
|
285
|
+
success: res => {
|
|
286
|
+
console.log('=====人脸识别成功=====', res)
|
|
287
|
+
optionsParse && optionsParse.success && optionsParse.success(res)
|
|
288
|
+
},
|
|
289
|
+
fail: err => {
|
|
290
|
+
console.log('=====人脸识别失败=====', err)
|
|
291
|
+
optionsParse && optionsParse.fail && optionsParse.fail(err)
|
|
292
|
+
}
|
|
293
|
+
})
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// 获取国籍列表
|
|
297
|
+
exports.getNationList = () => {
|
|
298
|
+
return nation || []
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// 语言国际化
|
|
302
|
+
exports.setLocalLanguage = (options) => {
|
|
303
|
+
// 对参数做兼容性处理
|
|
304
|
+
let optionsParse = parseOptions(options)
|
|
305
|
+
|
|
306
|
+
Object.assign(optionsParse, {
|
|
307
|
+
language: optionsParse.language || 'zh_CN'
|
|
308
|
+
})
|
|
309
|
+
wx.setStorageSync('tif.currentLanguage', optionsParse.language)
|
|
321
310
|
}
|