weapps-plugin-jingtong-verify 1.6.1 → 1.6.2-beta.2
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 -2
- package/app.json +33 -33
- package/package.json +20 -20
- package/sdk.js +313 -289
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.js +31 -31
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.wxml +9 -9
- package/weapps-plugin-jingtong-verify/components/card-modal/card-modal.wxss +65 -65
- package/weapps-plugin-jingtong-verify/components/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 -179
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.js +92 -92
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.wxml +12 -12
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-cell/index.wxss +2 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.js +49 -49
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form-item/index.wxml +14 -14
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.js +33 -33
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-icon/index.wxml +2 -2
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.js +108 -108
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-index-list/index.wxml +53 -53
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.js +236 -236
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.json +8 -8
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.wxml +49 -49
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.js +328 -328
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.json +6 -6
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-picker/index.wxml +26 -26
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.js +159 -159
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.json +3 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-popover/index.wxml +10 -10
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.js +112 -112
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-search/index.wxml +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.js +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.json +7 -7
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-switch/index.wxml +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.js +50 -50
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.json +5 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-tips/index.wxml +27 -27
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/add.svg +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/arrow.svg +14 -14
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/delete.svg +16 -16
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/preview.svg +21 -21
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/image/user.svg +13 -13
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-agree.wxss +147 -147
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-badge.wxss +41 -41
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-button-group.wxss +244 -244
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-cell.wxss +220 -220
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-dropdown.wxss +115 -115
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form-cell.wxss +101 -101
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form-item.wxss +174 -174
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-form.wxss +101 -101
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-icon.wxss +268 -268
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-index-list.wxss +206 -206
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-input.wxss +206 -206
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-picker.wxss +139 -139
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-popover.wxss +129 -129
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-search.wxss +171 -171
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-switch.wxss +176 -176
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-tips.wxss +173 -173
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/icon/iconfont.wxss +160 -160
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/main.wxss +283 -283
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/helper.js +55 -55
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/validType.js +117 -117
- package/weapps-plugin-jingtong-verify/components/gsd-ui/utils/validator.js +106 -106
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxml +8 -8
- package/weapps-plugin-jingtong-verify/components/lock-face-modal/lock-face-modal.wxss +57 -57
- package/weapps-plugin-jingtong-verify/components/modal/modal.js +32 -32
- package/weapps-plugin-jingtong-verify/components/modal/modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/modal/modal.wxml +28 -28
- package/weapps-plugin-jingtong-verify/components/modal/modal.wxss +84 -84
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.js +82 -82
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxml +18 -18
- package/weapps-plugin-jingtong-verify/components/my-modal/my-modal.wxss +72 -72
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.js +39 -39
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.json +3 -3
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxml +9 -9
- 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 -262
- 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 +1557 -1547
- 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 -504
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxss +133 -133
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.js +127 -127
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.wxml +36 -36
- package/weapps-plugin-jingtong-verify/pages/log-off/log-off.wxss +60 -60
- package/weapps-plugin-jingtong-verify/pages/login-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 -120
- 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 +865 -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 -328
- package/weapps-plugin-jingtong-verify/pages/setting/setting.json +5 -5
- package/weapps-plugin-jingtong-verify/pages/setting/setting.wxml +91 -91
- package/weapps-plugin-jingtong-verify/pages/setting/setting.wxss +69 -69
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.js +306 -306
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.json +7 -7
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.wxml +142 -142
- package/weapps-plugin-jingtong-verify/pages/user-info/user-info.wxss +110 -110
- package/weapps-plugin-jingtong-verify/style/page.wxss +13 -13
- package/weapps-plugin-jingtong-verify/utils/QDTrackerNew/QDTracker.js +15 -15
- package/weapps-plugin-jingtong-verify/utils/QDTrackerNew/QDTrackerMain.js +59 -59
- package/weapps-plugin-jingtong-verify/utils/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 -1
- package/weapps-plugin-jingtong-verify/utils/rules.js +301 -301
- package/weapps-plugin-jingtong-verify/utils/tifadmin_config.js +61 -61
- package/weapps-plugin-jingtong-verify/utils/validate.js +772 -772
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
// weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.js
|
|
2
|
-
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
-
const utils = require("../../utils/index")
|
|
4
|
-
const { flow } = require("@wecity/weda-plugin-utils");
|
|
5
|
-
|
|
6
|
-
Page({
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 页面的初始数据
|
|
10
|
-
*/
|
|
11
|
-
data: {
|
|
12
|
-
source: ''
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
// 微信获取手机号码授权
|
|
16
|
-
async getPhoneNumber(e) {
|
|
17
|
-
console.log('微信获取手机号码授权', e)
|
|
18
|
-
if (e.detail.iv) {
|
|
19
|
-
const params = Object.assign(e.detail, {
|
|
20
|
-
source: this.data.source || ''
|
|
21
|
-
})
|
|
22
|
-
const [err1, session] = await utils.awaitTo(jingtongVerifyRequest.loginPhone(params))
|
|
23
|
-
if (err1) {
|
|
24
|
-
wx.showToast({
|
|
25
|
-
title: err1.errmsg || '手机号码获取失败',
|
|
26
|
-
icon: 'none',
|
|
27
|
-
mask: true
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
// 解决用户未找到的问题:跳转到认证信息填写页面
|
|
31
|
-
if (err1.errcode === 2034) {
|
|
32
|
-
setTimeout(() => {
|
|
33
|
-
flow.redirectTo({
|
|
34
|
-
url: '../face-verify/face-verify?needUnite=true'
|
|
35
|
-
})
|
|
36
|
-
}, 1500)
|
|
37
|
-
}
|
|
38
|
-
return
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
wx.showToast({
|
|
42
|
-
title: '绑定成功, 跳转中…',
|
|
43
|
-
icon: 'none',
|
|
44
|
-
duration: 5000,
|
|
45
|
-
mask: true
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
// 登录成功回调 => 业务侧操作事项
|
|
49
|
-
wx.$_ServiceConfiguration && wx.$_ServiceConfiguration.methods && wx.$_ServiceConfiguration.methods._loginSuccessCallBack && wx.$_ServiceConfiguration.methods._loginSuccessCallBack(session)
|
|
50
|
-
|
|
51
|
-
const [err2, token] = await utils.awaitTo(jingtongVerifyRequest.personToken({ source: '8' }))
|
|
52
|
-
if (err2) {
|
|
53
|
-
return
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// 埋点 - 个人用户实体全属性上报
|
|
57
|
-
let last_login_time = utils.getCurrentTime()
|
|
58
|
-
wx.setStorageSync('tif.lastLoginTime', last_login_time)
|
|
59
|
-
const data = Object.assign(session, {
|
|
60
|
-
user_status: '1',
|
|
61
|
-
last_login_time,
|
|
62
|
-
user_date_of_birth: session.cid_type === '111' ? utils.getBirthByIDCard(session.cid) : ''
|
|
63
|
-
})
|
|
64
|
-
await utils.awaitTo(jingtongVerifyRequest.userEntityReport(data))
|
|
65
|
-
|
|
66
|
-
// 返回主包
|
|
67
|
-
setTimeout(() => {
|
|
68
|
-
flow.resolve({
|
|
69
|
-
token
|
|
70
|
-
})
|
|
71
|
-
}, 1200)
|
|
72
|
-
} else {
|
|
73
|
-
wx.showToast({
|
|
74
|
-
title: '您的微信版本太低,无法授权',
|
|
75
|
-
icon: 'none'
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
onLoad(options) {
|
|
81
|
-
console.log('参数', options)
|
|
82
|
-
this.setData({
|
|
83
|
-
source: options && options.source || ''
|
|
84
|
-
})
|
|
85
|
-
wx.hideShareMenu()
|
|
86
|
-
}
|
|
1
|
+
// weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.js
|
|
2
|
+
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
+
const utils = require("../../utils/index")
|
|
4
|
+
const { flow } = require("@wecity/weda-plugin-utils");
|
|
5
|
+
|
|
6
|
+
Page({
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 页面的初始数据
|
|
10
|
+
*/
|
|
11
|
+
data: {
|
|
12
|
+
source: ''
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// 微信获取手机号码授权
|
|
16
|
+
async getPhoneNumber(e) {
|
|
17
|
+
console.log('微信获取手机号码授权', e)
|
|
18
|
+
if (e.detail.iv) {
|
|
19
|
+
const params = Object.assign(e.detail, {
|
|
20
|
+
source: this.data.source || ''
|
|
21
|
+
})
|
|
22
|
+
const [err1, session] = await utils.awaitTo(jingtongVerifyRequest.loginPhone(params))
|
|
23
|
+
if (err1) {
|
|
24
|
+
wx.showToast({
|
|
25
|
+
title: err1.errmsg || '手机号码获取失败',
|
|
26
|
+
icon: 'none',
|
|
27
|
+
mask: true
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
// 解决用户未找到的问题:跳转到认证信息填写页面
|
|
31
|
+
if (err1.errcode === 2034) {
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
flow.redirectTo({
|
|
34
|
+
url: '../face-verify/face-verify?needUnite=true'
|
|
35
|
+
})
|
|
36
|
+
}, 1500)
|
|
37
|
+
}
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
wx.showToast({
|
|
42
|
+
title: '绑定成功, 跳转中…',
|
|
43
|
+
icon: 'none',
|
|
44
|
+
duration: 5000,
|
|
45
|
+
mask: true
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
// 登录成功回调 => 业务侧操作事项
|
|
49
|
+
wx.$_ServiceConfiguration && wx.$_ServiceConfiguration.methods && wx.$_ServiceConfiguration.methods._loginSuccessCallBack && wx.$_ServiceConfiguration.methods._loginSuccessCallBack(session)
|
|
50
|
+
|
|
51
|
+
const [err2, token] = await utils.awaitTo(jingtongVerifyRequest.personToken({ source: '8' }))
|
|
52
|
+
if (err2) {
|
|
53
|
+
return
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 埋点 - 个人用户实体全属性上报
|
|
57
|
+
let last_login_time = utils.getCurrentTime()
|
|
58
|
+
wx.setStorageSync('tif.lastLoginTime', last_login_time)
|
|
59
|
+
const data = Object.assign(session, {
|
|
60
|
+
user_status: '1',
|
|
61
|
+
last_login_time,
|
|
62
|
+
user_date_of_birth: session.cid_type === '111' ? utils.getBirthByIDCard(session.cid) : ''
|
|
63
|
+
})
|
|
64
|
+
await utils.awaitTo(jingtongVerifyRequest.userEntityReport(data))
|
|
65
|
+
|
|
66
|
+
// 返回主包
|
|
67
|
+
setTimeout(() => {
|
|
68
|
+
flow.resolve({
|
|
69
|
+
token
|
|
70
|
+
})
|
|
71
|
+
}, 1200)
|
|
72
|
+
} else {
|
|
73
|
+
wx.showToast({
|
|
74
|
+
title: '您的微信版本太低,无法授权',
|
|
75
|
+
icon: 'none'
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
onLoad(options) {
|
|
81
|
+
console.log('参数', options)
|
|
82
|
+
this.setData({
|
|
83
|
+
source: options && options.source || ''
|
|
84
|
+
})
|
|
85
|
+
wx.hideShareMenu()
|
|
86
|
+
}
|
|
87
87
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"component": true,
|
|
3
|
-
"usingComponents": {
|
|
4
|
-
"g-button-group": "../../components/gsd-ui/g-button-group"
|
|
5
|
-
},
|
|
6
|
-
"navigationBarTitleText": "手机绑定"
|
|
1
|
+
{
|
|
2
|
+
"component": true,
|
|
3
|
+
"usingComponents": {
|
|
4
|
+
"g-button-group": "../../components/gsd-ui/g-button-group"
|
|
5
|
+
},
|
|
6
|
+
"navigationBarTitleText": "手机绑定"
|
|
7
7
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<view>
|
|
2
|
-
<view class="top-box">
|
|
3
|
-
<image src="../../images/phone.png" mode="" style="width: 272px; height: 229px;"/>
|
|
4
|
-
</view>
|
|
5
|
-
<view class="content-box">
|
|
6
|
-
<text class="title">绑定手机号码</text>
|
|
7
|
-
<view class="important-info">
|
|
8
|
-
(同步注册到北京市统一身份认证平台)
|
|
9
|
-
</view>
|
|
10
|
-
<view class="info">
|
|
11
|
-
信息将与当前微信绑定(用于身份验证)
|
|
12
|
-
</view>
|
|
13
|
-
</view>
|
|
14
|
-
<view class="bottom-box">
|
|
15
|
-
<button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
|
|
16
|
-
<text class="cn">从微信获取,完成绑定</text>
|
|
17
|
-
<text class="en">You can access your phone number from WeChat to complete the bonding process.</text>
|
|
18
|
-
</button>
|
|
19
|
-
</view>
|
|
20
|
-
</view>
|
|
1
|
+
<view>
|
|
2
|
+
<view class="top-box">
|
|
3
|
+
<image src="../../images/phone.png" mode="" style="width: 272px; height: 229px;"/>
|
|
4
|
+
</view>
|
|
5
|
+
<view class="content-box">
|
|
6
|
+
<text class="title">绑定手机号码</text>
|
|
7
|
+
<view class="important-info">
|
|
8
|
+
(同步注册到北京市统一身份认证平台)
|
|
9
|
+
</view>
|
|
10
|
+
<view class="info">
|
|
11
|
+
信息将与当前微信绑定(用于身份验证)
|
|
12
|
+
</view>
|
|
13
|
+
</view>
|
|
14
|
+
<view class="bottom-box">
|
|
15
|
+
<button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
|
|
16
|
+
<text class="cn">从微信获取,完成绑定</text>
|
|
17
|
+
<text class="en">You can access your phone number from WeChat to complete the bonding process.</text>
|
|
18
|
+
</button>
|
|
19
|
+
</view>
|
|
20
|
+
</view>
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
/* weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.wxss */
|
|
2
|
-
.top-box {
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
margin-top: 166rpx;
|
|
6
|
-
}
|
|
7
|
-
.btn {
|
|
8
|
-
background: rgba(206, 0, 34, 1);
|
|
9
|
-
color: #ffffff;
|
|
10
|
-
width: 686rpx !important;
|
|
11
|
-
border-radius: 16rpx;
|
|
12
|
-
padding: 24rpx 28rpx;
|
|
13
|
-
box-shadow: 0 24rpx 48rpx 0 rgba(206, 0, 34, 0.15);
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
align-items: center;
|
|
18
|
-
font-weight: normal;
|
|
19
|
-
}
|
|
20
|
-
.btn .cn {
|
|
21
|
-
font-size: 34rpx;
|
|
22
|
-
line-height: 40rpx;
|
|
23
|
-
margin-bottom: 12rpx;
|
|
24
|
-
}
|
|
25
|
-
.btn .en {
|
|
26
|
-
font-size: 26rpx;
|
|
27
|
-
line-height: 30rpx;
|
|
28
|
-
}
|
|
29
|
-
.content-box {
|
|
30
|
-
display: flex;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
align-items: center;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
}
|
|
35
|
-
.title {
|
|
36
|
-
font-size: 48rpx;
|
|
37
|
-
color: #27282E;
|
|
38
|
-
font-weight: 400;
|
|
39
|
-
margin-bottom: 12rpx;
|
|
40
|
-
}
|
|
41
|
-
.important-info {
|
|
42
|
-
color: rgba(206, 0, 34, 1);
|
|
43
|
-
font-weight: 400;
|
|
44
|
-
font-size: 32rpx;
|
|
45
|
-
margin-bottom: 20rpx;
|
|
46
|
-
}
|
|
47
|
-
.info {
|
|
48
|
-
color: #999999;
|
|
49
|
-
font-size: 28rpx;
|
|
50
|
-
font-weight: 500;
|
|
51
|
-
margin-bottom: 84rpx;
|
|
1
|
+
/* weapps-plugin-jingtong-verify/pages/bind-phone/bind-phone.wxss */
|
|
2
|
+
.top-box {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
margin-top: 166rpx;
|
|
6
|
+
}
|
|
7
|
+
.btn {
|
|
8
|
+
background: rgba(206, 0, 34, 1);
|
|
9
|
+
color: #ffffff;
|
|
10
|
+
width: 686rpx !important;
|
|
11
|
+
border-radius: 16rpx;
|
|
12
|
+
padding: 24rpx 28rpx;
|
|
13
|
+
box-shadow: 0 24rpx 48rpx 0 rgba(206, 0, 34, 0.15);
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
font-weight: normal;
|
|
19
|
+
}
|
|
20
|
+
.btn .cn {
|
|
21
|
+
font-size: 34rpx;
|
|
22
|
+
line-height: 40rpx;
|
|
23
|
+
margin-bottom: 12rpx;
|
|
24
|
+
}
|
|
25
|
+
.btn .en {
|
|
26
|
+
font-size: 26rpx;
|
|
27
|
+
line-height: 30rpx;
|
|
28
|
+
}
|
|
29
|
+
.content-box {
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
align-items: center;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
}
|
|
35
|
+
.title {
|
|
36
|
+
font-size: 48rpx;
|
|
37
|
+
color: #27282E;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
margin-bottom: 12rpx;
|
|
40
|
+
}
|
|
41
|
+
.important-info {
|
|
42
|
+
color: rgba(206, 0, 34, 1);
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
font-size: 32rpx;
|
|
45
|
+
margin-bottom: 20rpx;
|
|
46
|
+
}
|
|
47
|
+
.info {
|
|
48
|
+
color: #999999;
|
|
49
|
+
font-size: 28rpx;
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
margin-bottom: 84rpx;
|
|
52
52
|
}
|
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
// weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.js
|
|
2
|
-
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
-
const utils = require("../../utils/index")
|
|
4
|
-
const { flow } = require("@wecity/weda-plugin-utils");
|
|
5
|
-
|
|
6
|
-
Page({
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 页面的初始数据
|
|
10
|
-
*/
|
|
11
|
-
data: {
|
|
12
|
-
phone: '',
|
|
13
|
-
caPhone: '',
|
|
14
|
-
isClick: true
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 生命周期函数--监听页面显示
|
|
19
|
-
*/
|
|
20
|
-
onShow() {
|
|
21
|
-
wx.hideShareMenu()
|
|
22
|
-
|
|
23
|
-
let pho = /(\d{3})\d*(\d{4})/
|
|
24
|
-
jingtongVerifyRequest.getSession({
|
|
25
|
-
success: res => {
|
|
26
|
-
const { phone, caPhone } = res
|
|
27
|
-
this.setData({
|
|
28
|
-
phone: phone ? phone.replace(pho, '$1****$2') : '',
|
|
29
|
-
caPhone: caPhone ? caPhone.replace(pho, '$1****$2') : ''
|
|
30
|
-
})
|
|
31
|
-
}
|
|
32
|
-
})
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
// 微信获取手机号码授权
|
|
36
|
-
async getPhoneNumber(e) {
|
|
37
|
-
console.log('微信获取手机号授权', e)
|
|
38
|
-
if (e.detail.iv) {
|
|
39
|
-
const params = Object.assign(e.detail, {
|
|
40
|
-
source: '7'
|
|
41
|
-
})
|
|
42
|
-
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.loginPhone(params))
|
|
43
|
-
if (err) {
|
|
44
|
-
wx.showToast({
|
|
45
|
-
title: err.errmsg || '手机号码获取失败',
|
|
46
|
-
icon: 'none',
|
|
47
|
-
mask: true
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
// 解决用户未找到的问题:跳转到认证信息填写页面
|
|
51
|
-
if (err.errcode === 2034) {
|
|
52
|
-
setTimeout(() => {
|
|
53
|
-
flow.redirectTo({
|
|
54
|
-
url: '../face-verify/face-verify?needUnite=true'
|
|
55
|
-
})
|
|
56
|
-
}, 1500)
|
|
57
|
-
}
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
wx.showToast({
|
|
62
|
-
title: '换绑成功, 跳转中…',
|
|
63
|
-
icon: 'none',
|
|
64
|
-
duration: 5000,
|
|
65
|
-
mask: true
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
// 登录成功回调 => 业务侧操作事项
|
|
69
|
-
this.loginSuccessCallBack(session)
|
|
70
|
-
|
|
71
|
-
let { phone, caPhone } = session
|
|
72
|
-
let pho = /(\d{3})\d*(\d{4})/
|
|
73
|
-
this.setData({
|
|
74
|
-
phone: phone ? phone.replace(pho, '$1****$2') : '',
|
|
75
|
-
caPhone: caPhone ? caPhone.replace(pho, '$1****$2') : ''
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
// 获取personToken、触发埋点事件上报
|
|
79
|
-
this.handleLastProcess('9', session)
|
|
80
|
-
} else {
|
|
81
|
-
wx.showToast({
|
|
82
|
-
title: '您的微信版本太低,无法授权',
|
|
83
|
-
icon: 'none'
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
// 节流处理 -- 确认手机号码
|
|
89
|
-
async throttle(delay) {
|
|
90
|
-
if (this.data.isClick) {
|
|
91
|
-
this.setData({
|
|
92
|
-
isClick: false
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.confirmPhone())
|
|
96
|
-
|
|
97
|
-
setTimeout(() => {
|
|
98
|
-
this.setData({
|
|
99
|
-
isClick: true
|
|
100
|
-
})
|
|
101
|
-
}, delay);
|
|
102
|
-
|
|
103
|
-
if (err) {
|
|
104
|
-
wx.showToast({
|
|
105
|
-
title: err.errmsg || '确认失败,请稍后再试',
|
|
106
|
-
icon: 'none'
|
|
107
|
-
})
|
|
108
|
-
return
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
wx.showToast({
|
|
112
|
-
title: '确认成功, 跳转中…',
|
|
113
|
-
icon: 'none',
|
|
114
|
-
duration: 5000,
|
|
115
|
-
mask: true
|
|
116
|
-
})
|
|
117
|
-
|
|
118
|
-
// 登录成功回调 => 业务侧操作事项
|
|
119
|
-
this.loginSuccessCallBack(session)
|
|
120
|
-
|
|
121
|
-
// 获取personToken、触发埋点事件上报
|
|
122
|
-
this.handleLastProcess('10', session)
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
// 主包成功回调
|
|
127
|
-
loginSuccessCallBack(session) {
|
|
128
|
-
wx.$_ServiceConfiguration && wx.$_ServiceConfiguration.methods && wx.$_ServiceConfiguration.methods._loginSuccessCallBack && wx.$_ServiceConfiguration.methods._loginSuccessCallBack(session)
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
// 获取personToken、触发埋点事件上报
|
|
132
|
-
async handleLastProcess(source, session) {
|
|
133
|
-
const [err, token] = await utils.awaitTo(jingtongVerifyRequest.personToken({ source }))
|
|
134
|
-
if (err) {
|
|
135
|
-
// 解决用户未找到的问题:跳转到认证信息填写页面
|
|
136
|
-
let errcode = JSON.parse(err).data.errcode || ''
|
|
137
|
-
if (errcode && errcode === 2034) {
|
|
138
|
-
setTimeout(() => {
|
|
139
|
-
flow.redirectTo({
|
|
140
|
-
url: '../face-verify/face-verify?needUnite=true'
|
|
141
|
-
})
|
|
142
|
-
}, 1500)
|
|
143
|
-
}
|
|
144
|
-
return
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// 埋点 - 个人用户实体全属性上报
|
|
148
|
-
let last_login_time = utils.getCurrentTime()
|
|
149
|
-
wx.setStorageSync('tif.lastLoginTime', last_login_time)
|
|
150
|
-
const data = Object.assign(session, {
|
|
151
|
-
user_status: '1',
|
|
152
|
-
last_login_time,
|
|
153
|
-
user_date_of_birth: session.cid_type === '111' ? utils.getBirthByIDCard(session.cid) : ''
|
|
154
|
-
})
|
|
155
|
-
await utils.awaitTo(jingtongVerifyRequest.userEntityReport(data))
|
|
156
|
-
|
|
157
|
-
setTimeout(() => {
|
|
158
|
-
flow.resolve({
|
|
159
|
-
token
|
|
160
|
-
})
|
|
161
|
-
}, 1200)
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
// 确认手机号码
|
|
165
|
-
confirmPhone() {
|
|
166
|
-
this.throttle(2000)
|
|
167
|
-
}
|
|
1
|
+
// weapps-plugin-jingtong-verify/pages/confirm-phone/confirm-phone.js
|
|
2
|
+
const jingtongVerifyRequest = require('../../utils/request')
|
|
3
|
+
const utils = require("../../utils/index")
|
|
4
|
+
const { flow } = require("@wecity/weda-plugin-utils");
|
|
5
|
+
|
|
6
|
+
Page({
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 页面的初始数据
|
|
10
|
+
*/
|
|
11
|
+
data: {
|
|
12
|
+
phone: '',
|
|
13
|
+
caPhone: '',
|
|
14
|
+
isClick: true
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 生命周期函数--监听页面显示
|
|
19
|
+
*/
|
|
20
|
+
onShow() {
|
|
21
|
+
wx.hideShareMenu()
|
|
22
|
+
|
|
23
|
+
let pho = /(\d{3})\d*(\d{4})/
|
|
24
|
+
jingtongVerifyRequest.getSession({
|
|
25
|
+
success: res => {
|
|
26
|
+
const { phone, caPhone } = res
|
|
27
|
+
this.setData({
|
|
28
|
+
phone: phone ? phone.replace(pho, '$1****$2') : '',
|
|
29
|
+
caPhone: caPhone ? caPhone.replace(pho, '$1****$2') : ''
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// 微信获取手机号码授权
|
|
36
|
+
async getPhoneNumber(e) {
|
|
37
|
+
console.log('微信获取手机号授权', e)
|
|
38
|
+
if (e.detail.iv) {
|
|
39
|
+
const params = Object.assign(e.detail, {
|
|
40
|
+
source: '7'
|
|
41
|
+
})
|
|
42
|
+
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.loginPhone(params))
|
|
43
|
+
if (err) {
|
|
44
|
+
wx.showToast({
|
|
45
|
+
title: err.errmsg || '手机号码获取失败',
|
|
46
|
+
icon: 'none',
|
|
47
|
+
mask: true
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
// 解决用户未找到的问题:跳转到认证信息填写页面
|
|
51
|
+
if (err.errcode === 2034) {
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
flow.redirectTo({
|
|
54
|
+
url: '../face-verify/face-verify?needUnite=true'
|
|
55
|
+
})
|
|
56
|
+
}, 1500)
|
|
57
|
+
}
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
wx.showToast({
|
|
62
|
+
title: '换绑成功, 跳转中…',
|
|
63
|
+
icon: 'none',
|
|
64
|
+
duration: 5000,
|
|
65
|
+
mask: true
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
// 登录成功回调 => 业务侧操作事项
|
|
69
|
+
this.loginSuccessCallBack(session)
|
|
70
|
+
|
|
71
|
+
let { phone, caPhone } = session
|
|
72
|
+
let pho = /(\d{3})\d*(\d{4})/
|
|
73
|
+
this.setData({
|
|
74
|
+
phone: phone ? phone.replace(pho, '$1****$2') : '',
|
|
75
|
+
caPhone: caPhone ? caPhone.replace(pho, '$1****$2') : ''
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
// 获取personToken、触发埋点事件上报
|
|
79
|
+
this.handleLastProcess('9', session)
|
|
80
|
+
} else {
|
|
81
|
+
wx.showToast({
|
|
82
|
+
title: '您的微信版本太低,无法授权',
|
|
83
|
+
icon: 'none'
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
// 节流处理 -- 确认手机号码
|
|
89
|
+
async throttle(delay) {
|
|
90
|
+
if (this.data.isClick) {
|
|
91
|
+
this.setData({
|
|
92
|
+
isClick: false
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
const [err, session] = await utils.awaitTo(jingtongVerifyRequest.confirmPhone())
|
|
96
|
+
|
|
97
|
+
setTimeout(() => {
|
|
98
|
+
this.setData({
|
|
99
|
+
isClick: true
|
|
100
|
+
})
|
|
101
|
+
}, delay);
|
|
102
|
+
|
|
103
|
+
if (err) {
|
|
104
|
+
wx.showToast({
|
|
105
|
+
title: err.errmsg || '确认失败,请稍后再试',
|
|
106
|
+
icon: 'none'
|
|
107
|
+
})
|
|
108
|
+
return
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
wx.showToast({
|
|
112
|
+
title: '确认成功, 跳转中…',
|
|
113
|
+
icon: 'none',
|
|
114
|
+
duration: 5000,
|
|
115
|
+
mask: true
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
// 登录成功回调 => 业务侧操作事项
|
|
119
|
+
this.loginSuccessCallBack(session)
|
|
120
|
+
|
|
121
|
+
// 获取personToken、触发埋点事件上报
|
|
122
|
+
this.handleLastProcess('10', session)
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
// 主包成功回调
|
|
127
|
+
loginSuccessCallBack(session) {
|
|
128
|
+
wx.$_ServiceConfiguration && wx.$_ServiceConfiguration.methods && wx.$_ServiceConfiguration.methods._loginSuccessCallBack && wx.$_ServiceConfiguration.methods._loginSuccessCallBack(session)
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
// 获取personToken、触发埋点事件上报
|
|
132
|
+
async handleLastProcess(source, session) {
|
|
133
|
+
const [err, token] = await utils.awaitTo(jingtongVerifyRequest.personToken({ source }))
|
|
134
|
+
if (err) {
|
|
135
|
+
// 解决用户未找到的问题:跳转到认证信息填写页面
|
|
136
|
+
let errcode = JSON.parse(err).data.errcode || ''
|
|
137
|
+
if (errcode && errcode === 2034) {
|
|
138
|
+
setTimeout(() => {
|
|
139
|
+
flow.redirectTo({
|
|
140
|
+
url: '../face-verify/face-verify?needUnite=true'
|
|
141
|
+
})
|
|
142
|
+
}, 1500)
|
|
143
|
+
}
|
|
144
|
+
return
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// 埋点 - 个人用户实体全属性上报
|
|
148
|
+
let last_login_time = utils.getCurrentTime()
|
|
149
|
+
wx.setStorageSync('tif.lastLoginTime', last_login_time)
|
|
150
|
+
const data = Object.assign(session, {
|
|
151
|
+
user_status: '1',
|
|
152
|
+
last_login_time,
|
|
153
|
+
user_date_of_birth: session.cid_type === '111' ? utils.getBirthByIDCard(session.cid) : ''
|
|
154
|
+
})
|
|
155
|
+
await utils.awaitTo(jingtongVerifyRequest.userEntityReport(data))
|
|
156
|
+
|
|
157
|
+
setTimeout(() => {
|
|
158
|
+
flow.resolve({
|
|
159
|
+
token
|
|
160
|
+
})
|
|
161
|
+
}, 1200)
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
// 确认手机号码
|
|
165
|
+
confirmPhone() {
|
|
166
|
+
this.throttle(2000)
|
|
167
|
+
}
|
|
168
168
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"usingComponents": {},
|
|
3
|
-
"navigationBarTitleText": "手机号确认"
|
|
1
|
+
{
|
|
2
|
+
"usingComponents": {},
|
|
3
|
+
"navigationBarTitleText": "手机号确认"
|
|
4
4
|
}
|