weapps-plugin-jingtong-verify 1.6.0 → 1.6.1
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 +2 -1
- package/app.json +3 -11
- package/package.json +2 -2
- package/sdk.js +1 -32
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-form/index.js +0 -3
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.js +0 -5
- package/weapps-plugin-jingtong-verify/components/gsd-ui/g-input/index.wxml +1 -1
- package/weapps-plugin-jingtong-verify/components/gsd-ui/static/style/components/g-input.wxss +1 -9
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.js +0 -8
- package/weapps-plugin-jingtong-verify/components/tip-modal/tip-modal.wxml +0 -2
- package/weapps-plugin-jingtong-verify/i18n/rules.js +5 -146
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.js +12 -276
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxml +1 -19
- package/weapps-plugin-jingtong-verify/pages/face-verify/face-verify.wxss +1 -53
- package/weapps-plugin-jingtong-verify/pages/nation-list/nation-list.js +12 -2
- package/weapps-plugin-jingtong-verify/pages/setting/setting.js +7 -10
- package/weapps-plugin-jingtong-verify/utils/request.js +1 -670
- package/weapps-plugin-jingtong-verify/utils/rules.js +1 -105
- package/weapps-plugin-jingtong-verify/utils/validate.js +1 -139
- 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,66 +0,0 @@
|
|
|
1
|
-
// weapps-plugin-jingtong-verify/pages/bank-card-login-forgot-sms-setting/bank-card-login-forgot-sms-setting.js
|
|
2
|
-
Page({
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 页面的初始数据
|
|
6
|
-
*/
|
|
7
|
-
data: {
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* 生命周期函数--监听页面加载
|
|
13
|
-
*/
|
|
14
|
-
onLoad(options) {
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 生命周期函数--监听页面初次渲染完成
|
|
20
|
-
*/
|
|
21
|
-
onReady() {
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* 生命周期函数--监听页面显示
|
|
27
|
-
*/
|
|
28
|
-
onShow() {
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 生命周期函数--监听页面隐藏
|
|
34
|
-
*/
|
|
35
|
-
onHide() {
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 生命周期函数--监听页面卸载
|
|
41
|
-
*/
|
|
42
|
-
onUnload() {
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* 页面相关事件处理函数--监听用户下拉动作
|
|
48
|
-
*/
|
|
49
|
-
onPullDownRefresh() {
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* 页面上拉触底事件的处理函数
|
|
55
|
-
*/
|
|
56
|
-
onReachBottom() {
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* 用户点击右上角分享
|
|
62
|
-
*/
|
|
63
|
-
onShareAppMessage() {
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
})
|
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
const jingtongVerifyRequest = require('../../utils/request')
|
|
2
|
-
const rulesConfig = require("../../utils/rules")
|
|
3
|
-
const utils = require("../../utils/index")
|
|
4
|
-
import { SDKTrack, setAccountInfo } from '../../utils/QDTrackerNew/QDTrackerMain'
|
|
5
|
-
const { flow } = require("@wecity/weda-plugin-utils");
|
|
6
|
-
Page({
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* 页面的初始数据
|
|
10
|
-
*/
|
|
11
|
-
data: {
|
|
12
|
-
language: 'zh_CN', // 语言环境:默认中文
|
|
13
|
-
formData: {
|
|
14
|
-
name: '',
|
|
15
|
-
bank_card_password: '', // 密码
|
|
16
|
-
bank_card_pwd_password: '', // 二次确认密码
|
|
17
|
-
id_card_number: '', // 证件号码
|
|
18
|
-
cid_type: '', // 证件类型
|
|
19
|
-
verify_expire_time: '', // 证件号码
|
|
20
|
-
},
|
|
21
|
-
rules: rulesConfig.bankCardSetPwdRules('zh_CN'),
|
|
22
|
-
validateType: {
|
|
23
|
-
bank_card_password(value) {
|
|
24
|
-
return utils.validate.checkBankCardLoginPwd(value).data
|
|
25
|
-
},
|
|
26
|
-
bank_card_pwd_password(value, formData) {
|
|
27
|
-
console.log(formData)
|
|
28
|
-
console.log(formData.bank_card_password)
|
|
29
|
-
return utils.validate.checkBankCardLoginPwd(value).data && utils.validate.checkConfirmPwd(value, formData.bank_card_password).data
|
|
30
|
-
}, // 记录是否已经登录成功
|
|
31
|
-
},
|
|
32
|
-
isShowPasswordStrength: false,// 是否显示密码强度
|
|
33
|
-
passwordStrength: 0, // 密码强度等级 0-3
|
|
34
|
-
passwordStrengthText: '弱',
|
|
35
|
-
// 是否显示自定义校验提示
|
|
36
|
-
showCustomTips: false,
|
|
37
|
-
// 自定义校验提示文本
|
|
38
|
-
customTipsMsg: '',
|
|
39
|
-
// cidType转化为certType
|
|
40
|
-
certTypeMap: {
|
|
41
|
-
'111': 1,
|
|
42
|
-
'516': 78,
|
|
43
|
-
'511': 4,
|
|
44
|
-
'17': 5,
|
|
45
|
-
'18': 6,
|
|
46
|
-
'414': 2,
|
|
47
|
-
'553': 9,
|
|
48
|
-
'700': 3
|
|
49
|
-
},
|
|
50
|
-
hadSuccessLogin: false,
|
|
51
|
-
needUnite: '', // 是否需要串联起来
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* 生命周期函数--监听页面加载
|
|
56
|
-
*/
|
|
57
|
-
onLoad(options) {
|
|
58
|
-
const that = this
|
|
59
|
-
this.setData({
|
|
60
|
-
validateType: {
|
|
61
|
-
// 单字段复杂度校验:仅依赖 value
|
|
62
|
-
bank_card_password(value) {
|
|
63
|
-
return utils.validate.checkBankCardLoginPwd(value).data
|
|
64
|
-
},
|
|
65
|
-
// 确认密码:通过闭包读取最新的整表单数据(尤其是主密码)
|
|
66
|
-
bank_card_pwd_password(value) {
|
|
67
|
-
const mainPwd = (that.data && that.data.formData && that.data.formData.bank_card_password) || ''
|
|
68
|
-
return utils.validate.checkConfirmPwd(value, mainPwd).data
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
-
})
|
|
72
|
-
const { formData } = this.data
|
|
73
|
-
formData.name = options.name || ''
|
|
74
|
-
this.setData({
|
|
75
|
-
formData: formData,
|
|
76
|
-
needUnite: options.needUnite || 'true'
|
|
77
|
-
})
|
|
78
|
-
},
|
|
79
|
-
// 设置密码输入框变化处理
|
|
80
|
-
handleChange(e) {
|
|
81
|
-
let value = e.detail.value
|
|
82
|
-
let formId = (e && e.currentTarget && e.currentTarget.id) || (e && e.target && e.target.id) || ''
|
|
83
|
-
|
|
84
|
-
if (typeof value === 'string' && formId !== 'cid_type') {
|
|
85
|
-
value = value.trim()
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (formId) {
|
|
89
|
-
this.setData({ [`formData.${formId}`]: value })
|
|
90
|
-
|
|
91
|
-
// 如果是密码字段,计算强度
|
|
92
|
-
// if (formId === 'bank_card_password') {
|
|
93
|
-
// this.calculatePasswordStrength(value)
|
|
94
|
-
// }
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
handlePwdChange (e) {
|
|
98
|
-
let value = e.detail.value
|
|
99
|
-
let formId = (e && e.currentTarget && e.currentTarget.id) || (e && e.target && e.target.id) || ''
|
|
100
|
-
|
|
101
|
-
if (typeof value === 'string' && formId !== 'cid_type') {
|
|
102
|
-
value = value.trim()
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (formId) {
|
|
106
|
-
this.setData({ [`formData.${formId}`]: value })
|
|
107
|
-
|
|
108
|
-
// 如果是密码字段,计算强度
|
|
109
|
-
if (formId === 'bank_card_password') {
|
|
110
|
-
this.calculatePasswordStrength(value)
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
// 计算密码强度
|
|
115
|
-
calculatePasswordStrength(password) {
|
|
116
|
-
console.log('失焦检测')
|
|
117
|
-
let strength = 0
|
|
118
|
-
let strengthText = '弱'
|
|
119
|
-
|
|
120
|
-
if (!password) {
|
|
121
|
-
this.setData({
|
|
122
|
-
passwordStrength: 0,
|
|
123
|
-
passwordStrengthText: '弱'
|
|
124
|
-
})
|
|
125
|
-
return
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// 长度检查
|
|
129
|
-
if (password.length >= 8) {
|
|
130
|
-
strength++
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// 包含数字
|
|
134
|
-
if (/\d/.test(password)) {
|
|
135
|
-
strength++
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// 包含字母
|
|
139
|
-
if (/[a-zA-Z]/.test(password)) {
|
|
140
|
-
strength++
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// 包含特殊字符
|
|
144
|
-
if (/[!@#$%^&*(),.?":{}|<>]/.test(password)) {
|
|
145
|
-
strength++
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// 此处判断密码强度
|
|
149
|
-
jingtongVerifyRequest.verifyPwdStrength(password).then(res => {
|
|
150
|
-
console.log(res)
|
|
151
|
-
const { errcode, data } = res
|
|
152
|
-
if(errcode === 0){
|
|
153
|
-
console.log(strength)
|
|
154
|
-
// 根据强度设置文本和等级(弱=1格,中=2格,强=3格)
|
|
155
|
-
// if (data.score >= 65) {
|
|
156
|
-
// strength = 3
|
|
157
|
-
// strengthText = '强'
|
|
158
|
-
// } else if (data.score >= 50) {
|
|
159
|
-
// strength = 2
|
|
160
|
-
// strengthText = '中'
|
|
161
|
-
// } else {
|
|
162
|
-
// strength = 1
|
|
163
|
-
// strengthText = '弱'
|
|
164
|
-
// }
|
|
165
|
-
|
|
166
|
-
if (data.score >= 90) {
|
|
167
|
-
strength = 3
|
|
168
|
-
strengthText = '强'
|
|
169
|
-
} else if (data.score >= 75) {
|
|
170
|
-
strength = 3
|
|
171
|
-
strengthText = '强'
|
|
172
|
-
} else if (data.score >= 65) {
|
|
173
|
-
strength = 2
|
|
174
|
-
strengthText = '中'
|
|
175
|
-
} else if (data.score >= 50) {
|
|
176
|
-
strength = 2
|
|
177
|
-
strengthText = '中'
|
|
178
|
-
} else {
|
|
179
|
-
strength = 1
|
|
180
|
-
strengthText = '弱'
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
this.setData({
|
|
184
|
-
passwordStrength: strength, // 弱=1,中=2,强=3
|
|
185
|
-
passwordStrengthText: strengthText,
|
|
186
|
-
isShowPasswordStrength: true
|
|
187
|
-
})
|
|
188
|
-
}
|
|
189
|
-
})
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
// 确认提交表单
|
|
193
|
-
async handleFormSubmit(e) {
|
|
194
|
-
const formValid = e.detail.validStatus
|
|
195
|
-
const customValid = this.data.language !== 'en' ? { valid: true, msg: '' } : this.validateFullname()
|
|
196
|
-
if (!formValid || !customValid.valid) {
|
|
197
|
-
// 自定义校验字段有问题,获取表单错误列表
|
|
198
|
-
const formErrList = e.detail.value
|
|
199
|
-
// 如果表单校验有问题,自定义校验没问题,则显示表单校验错误提示
|
|
200
|
-
if (!formValid && customValid.valid) {
|
|
201
|
-
return
|
|
202
|
-
}
|
|
203
|
-
// 如果表单校验没有问题,自定义校验有问题,则显示自定义校验错误提示
|
|
204
|
-
if (formValid && !customValid.valid) {
|
|
205
|
-
return
|
|
206
|
-
}
|
|
207
|
-
return
|
|
208
|
-
}
|
|
209
|
-
// 点击确定出现该提示
|
|
210
|
-
wx.showLoading({
|
|
211
|
-
title: '验证中...',
|
|
212
|
-
mask: true // 防止用户点击
|
|
213
|
-
})
|
|
214
|
-
console.log(this.data.formData)
|
|
215
|
-
// 接口返回验证成功出现这个提示
|
|
216
|
-
jingtongVerifyRequest.resetPwd(this.data.formData.bank_card_password).then(res =>{
|
|
217
|
-
console.log('设置密码')
|
|
218
|
-
console.log(res)
|
|
219
|
-
wx.hideLoading()
|
|
220
|
-
if(res.errcode === 0){
|
|
221
|
-
// wx.showToast({
|
|
222
|
-
// title: '设置成功',
|
|
223
|
-
// mask: true
|
|
224
|
-
// })
|
|
225
|
-
setTimeout(() => {
|
|
226
|
-
wx.showToast({
|
|
227
|
-
title: '设置成功,跳转中…',
|
|
228
|
-
icon: 'none',
|
|
229
|
-
duration: 1500
|
|
230
|
-
})
|
|
231
|
-
// 验证成功,这里跳转页面
|
|
232
|
-
jingtongVerifyRequest.getSession({
|
|
233
|
-
success: res => {
|
|
234
|
-
// 保存银行卡核验成功时间戳
|
|
235
|
-
let timeStamp = new Date().getTime()
|
|
236
|
-
wx.setStorageSync('tif.bankCardTimeStamp', timeStamp)
|
|
237
|
-
this.authSuccess(res)
|
|
238
|
-
}
|
|
239
|
-
})
|
|
240
|
-
// wx.reLaunch({
|
|
241
|
-
// url: '/pages/index/index',
|
|
242
|
-
// })
|
|
243
|
-
}, 1500);
|
|
244
|
-
} else {
|
|
245
|
-
if(res.errcode === 5000){
|
|
246
|
-
// 验证成功,这里跳转页面
|
|
247
|
-
jingtongVerifyRequest.getSession({
|
|
248
|
-
success: res => {
|
|
249
|
-
// 保存银行卡核验成功时间戳
|
|
250
|
-
let timeStamp = new Date().getTime()
|
|
251
|
-
wx.setStorageSync('tif.bankCardTimeStamp', timeStamp)
|
|
252
|
-
this.authSuccess(res)
|
|
253
|
-
}
|
|
254
|
-
})
|
|
255
|
-
} else {
|
|
256
|
-
wx.showToast({
|
|
257
|
-
title: res.errmsg,
|
|
258
|
-
icon: 'none',
|
|
259
|
-
duration: 1500
|
|
260
|
-
})
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
})
|
|
264
|
-
// wx.showToast({
|
|
265
|
-
// title: '验证成功,跳转中…',
|
|
266
|
-
// icon: 'none',
|
|
267
|
-
// duration: 1500
|
|
268
|
-
// })
|
|
269
|
-
// 验证成功,这里跳转页面
|
|
270
|
-
// wx.reLaunch({
|
|
271
|
-
// url: '/pages/index/index',
|
|
272
|
-
// })
|
|
273
|
-
},
|
|
274
|
-
// 认证成功后续操作
|
|
275
|
-
async authSuccess(session, isEn = false) {
|
|
276
|
-
console.log('====判断是否真的登录成功=====')
|
|
277
|
-
console.log(session)
|
|
278
|
-
if (!session) {
|
|
279
|
-
wx.showToast({
|
|
280
|
-
title: '登录态失效,请重试',
|
|
281
|
-
icon: 'none',
|
|
282
|
-
duration: 2000
|
|
283
|
-
})
|
|
284
|
-
return
|
|
285
|
-
}
|
|
286
|
-
const { face_time, realname_time, cid, has_phone, certType } = session
|
|
287
|
-
if ((!face_time && !realname_time) || !cid) {
|
|
288
|
-
wx.showToast({
|
|
289
|
-
title: `登录态失效请重试: ${this.data.formData.cid_type}`,
|
|
290
|
-
icon: 'none',
|
|
291
|
-
duration: 2000
|
|
292
|
-
})
|
|
293
|
-
return
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
wx.showToast({
|
|
297
|
-
title: isEn ? 'Verification successful, redirecting...': '验证成功, 跳转中…',
|
|
298
|
-
icon: 'none',
|
|
299
|
-
duration: 5000,
|
|
300
|
-
mask: true
|
|
301
|
-
})
|
|
302
|
-
|
|
303
|
-
const cidType = session.cid_type
|
|
304
|
-
|
|
305
|
-
wx.setStorageSync('tif.formDataSuccess', session)
|
|
306
|
-
|
|
307
|
-
// 将弹窗标识设置为不需要弹窗
|
|
308
|
-
jingtongVerifyRequest.setUserReadStatus(false).then(() => {
|
|
309
|
-
console.log('设置弹窗标识成功')
|
|
310
|
-
}).catch(err => {
|
|
311
|
-
console.log('设置弹窗标识失败', err)
|
|
312
|
-
})
|
|
313
|
-
|
|
314
|
-
setTimeout(() => {
|
|
315
|
-
if (this.data.needUnite === "true") {
|
|
316
|
-
// this.setData({
|
|
317
|
-
// needUnite: ''
|
|
318
|
-
// })
|
|
319
|
-
|
|
320
|
-
console.log('进入业务总入口, 判断是否有手机号码', has_phone)
|
|
321
|
-
|
|
322
|
-
// 登录成功回调 => 业务侧操作事项
|
|
323
|
-
wx.$_ServiceConfiguration && wx.$_ServiceConfiguration.methods && wx.$_ServiceConfiguration.methods._loginSuccessCallBack && wx.$_ServiceConfiguration.methods._loginSuccessCallBack(session)
|
|
324
|
-
|
|
325
|
-
if (has_phone) {
|
|
326
|
-
const realPhone = wx.getStorageSync('tif.realPhone') || ''
|
|
327
|
-
const caPhone = wx.getStorageSync('tif.caPhone') || ''
|
|
328
|
-
const confirmTime = wx.getStorageSync('tif.tel_confirm_time') || ''
|
|
329
|
-
|
|
330
|
-
console.log('realPhone', realPhone)
|
|
331
|
-
console.log('caPhone', caPhone)
|
|
332
|
-
console.log('confirmTime', confirmTime)
|
|
333
|
-
|
|
334
|
-
if (realPhone !== caPhone && confirmTime && (!utils.completeDate(new Date(Number(confirmTime + '000')), 6))) {
|
|
335
|
-
// 埋点上报事件:自然人登录
|
|
336
|
-
this.loginTracker(1, cidType)
|
|
337
|
-
|
|
338
|
-
this.setData({
|
|
339
|
-
hadSuccessLogin: true
|
|
340
|
-
})
|
|
341
|
-
|
|
342
|
-
// 【phone与caPhone不同】且【tel_confirm_time大于6个月】
|
|
343
|
-
// 数据库手机号码有效期大于6个月
|
|
344
|
-
flow.redirectTo({
|
|
345
|
-
url: '../confirm-phone/confirm-phone'
|
|
346
|
-
})
|
|
347
|
-
} else {
|
|
348
|
-
jingtongVerifyRequest.personToken({
|
|
349
|
-
source: '11'
|
|
350
|
-
}).then(async data => {
|
|
351
|
-
// 设置用户账号信息
|
|
352
|
-
setAccountInfo(session.openid)
|
|
353
|
-
|
|
354
|
-
// 埋点上报事件:自然人登录
|
|
355
|
-
this.loginTracker(1, cidType)
|
|
356
|
-
|
|
357
|
-
this.setData({
|
|
358
|
-
hadSuccessLogin: true
|
|
359
|
-
})
|
|
360
|
-
|
|
361
|
-
// 埋点 - 个人用户实体全属性上报
|
|
362
|
-
let last_login_time = utils.getCurrentTime()
|
|
363
|
-
wx.setStorageSync('tif.lastLoginTime', last_login_time)
|
|
364
|
-
const userEntityReportData = Object.assign(session, {
|
|
365
|
-
user_status: '1',
|
|
366
|
-
last_login_time,
|
|
367
|
-
user_date_of_birth: session.cid_type === '111' ? utils.getBirthByIDCard(session.cid) : ''
|
|
368
|
-
})
|
|
369
|
-
await utils.awaitTo(jingtongVerifyRequest.userEntityReport(userEntityReportData))
|
|
370
|
-
|
|
371
|
-
setTimeout(() => {
|
|
372
|
-
flow.resolve({
|
|
373
|
-
token: data
|
|
374
|
-
})
|
|
375
|
-
wx.reLaunch({
|
|
376
|
-
url: '/pages/index/index' // 主包页面路径
|
|
377
|
-
})
|
|
378
|
-
}, 1200)
|
|
379
|
-
})
|
|
380
|
-
}
|
|
381
|
-
} else {
|
|
382
|
-
// 埋点上报事件:自然人登录
|
|
383
|
-
this.loginTracker(1, cidType)
|
|
384
|
-
|
|
385
|
-
this.setData({
|
|
386
|
-
hadSuccessLogin: true
|
|
387
|
-
})
|
|
388
|
-
|
|
389
|
-
flow.redirectTo({
|
|
390
|
-
url: '../bind-phone/bind-phone?source=3'
|
|
391
|
-
})
|
|
392
|
-
}
|
|
393
|
-
} else {
|
|
394
|
-
console.log('返回主包')
|
|
395
|
-
flow.resolve()
|
|
396
|
-
wx.reLaunch({
|
|
397
|
-
url: '/pages/index/index' // 主包页面路径
|
|
398
|
-
})
|
|
399
|
-
}
|
|
400
|
-
}, 800)
|
|
401
|
-
},
|
|
402
|
-
// 埋点上报事件:自然人登录
|
|
403
|
-
loginTracker(login_status = 1, cidType) {
|
|
404
|
-
SDKTrack('nature_person_login', {
|
|
405
|
-
// 1 登录成功;2 登录失败-身份信息核验失败;3 登录失败-人脸核验失败
|
|
406
|
-
// 4 登录失败-电子营业执照核验失败;5 登录失败-账号密码输入错误
|
|
407
|
-
// 6 取消登录(包含点击温馨提示的“取消”,点击请法人登录的×,在登录页面点击左上角返回按钮退出登录)
|
|
408
|
-
// 7 退出小程序终止登录;old_1 历史数据:除登录成功之外的所有情况
|
|
409
|
-
login_status,
|
|
410
|
-
login_certificate: this.data.certTypeMap[cidType] || 1, // 证件类型
|
|
411
|
-
invoke_location: '', // 调起位置
|
|
412
|
-
login_validity_period: this.data.formData.verify_expire_time / 24 || '' // 免登录时间
|
|
413
|
-
})
|
|
414
|
-
},
|
|
415
|
-
/**
|
|
416
|
-
* 生命周期函数--监听页面初次渲染完成
|
|
417
|
-
*/
|
|
418
|
-
onReady() {
|
|
419
|
-
|
|
420
|
-
},
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* 生命周期函数--监听页面显示
|
|
424
|
-
*/
|
|
425
|
-
onShow() {
|
|
426
|
-
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* 生命周期函数--监听页面隐藏
|
|
431
|
-
*/
|
|
432
|
-
onHide() {
|
|
433
|
-
|
|
434
|
-
},
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* 生命周期函数--监听页面卸载
|
|
438
|
-
*/
|
|
439
|
-
onUnload() {
|
|
440
|
-
|
|
441
|
-
},
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* 页面相关事件处理函数--监听用户下拉动作
|
|
445
|
-
*/
|
|
446
|
-
onPullDownRefresh() {
|
|
447
|
-
|
|
448
|
-
},
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* 页面上拉触底事件的处理函数
|
|
452
|
-
*/
|
|
453
|
-
onReachBottom() {
|
|
454
|
-
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* 用户点击右上角分享
|
|
459
|
-
*/
|
|
460
|
-
onShareAppMessage() {
|
|
461
|
-
|
|
462
|
-
}
|
|
463
|
-
})
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!-- 中文版:银联卡实人核验能力 -->
|
|
2
|
-
<view class="{{ language == 'en' ? 'en-page' : ''}}">
|
|
3
|
-
<view class="top-box">
|
|
4
|
-
<view class="img-box">
|
|
5
|
-
<image src="../../images/Frame.png" mode="aspectFit" class="img"></image>
|
|
6
|
-
</view>
|
|
7
|
-
<view class="title">{{ language == 'zh_CN' ? '设置登录密码' : 'Set login password' }}</view>
|
|
8
|
-
<view class="title_describe">{{ language == 'zh_CN' ? '保护您个人信息更安全' : 'Protect your personal information more securely' }}</view>
|
|
9
|
-
</view>
|
|
10
|
-
<view class="content-box" wx:if="{{ language === 'zh_CN' }}">
|
|
11
|
-
<view class="describe-box" style="margin-top: 50rpx">
|
|
12
|
-
<view class="special-describe-box" >
|
|
13
|
-
<view>请注意:</view>
|
|
14
|
-
<view>密码为8~20位字符,需含数字、大写字母、小写字母、特殊字符中的两种及以上。</view>
|
|
15
|
-
</view>
|
|
16
|
-
</view>
|
|
17
|
-
<g-form
|
|
18
|
-
id="form"
|
|
19
|
-
model="{{ formData }}"
|
|
20
|
-
rules="{{ rules }}"
|
|
21
|
-
validateType="{{ validateType }}"
|
|
22
|
-
primary-text="确定"
|
|
23
|
-
bind:submit="handleFormSubmit"
|
|
24
|
-
>
|
|
25
|
-
<!-- 设置登录密码 -->
|
|
26
|
-
<view class="form-item-wrap">
|
|
27
|
-
<view class="form-item-header">
|
|
28
|
-
<text class="form-label">设置登录密码<text class="required-star">*</text></text>
|
|
29
|
-
<view class="password-strength-indicator" wx:if="{{isShowPasswordStrength}}">
|
|
30
|
-
<view class="strength-bar">
|
|
31
|
-
<view class="strength-segment {{ passwordStrength >= 3 ? 'strong' : passwordStrength >= 2 ? 'medium' : 'weak' }} {{ passwordStrength >= 1 ? 'active' : '' }}"></view>
|
|
32
|
-
<view class="strength-segment {{ passwordStrength >= 3 ? 'strong' : 'medium' }} {{ passwordStrength >= 2 ? 'active' : '' }}"></view>
|
|
33
|
-
<view class="strength-segment strong {{ passwordStrength >= 3 ? 'active' : '' }}"></view>
|
|
34
|
-
</view>
|
|
35
|
-
<view class="strength-text {{ passwordStrength >= 3 ? 'strong' : passwordStrength >= 2 ? 'medium' : 'weak' }}">
|
|
36
|
-
{{ passwordStrengthText }}
|
|
37
|
-
</view>
|
|
38
|
-
</view>
|
|
39
|
-
</view>
|
|
40
|
-
<g-input
|
|
41
|
-
id="bank_card_password"
|
|
42
|
-
placeholder="请输入登录密码"
|
|
43
|
-
placeholder-class="bank-card-verify-placeholder"
|
|
44
|
-
value="{{ formData.bank_card_password }}"
|
|
45
|
-
clearable="true"
|
|
46
|
-
password="true"
|
|
47
|
-
bind:change="handleChange"
|
|
48
|
-
bind:input="handleChange"
|
|
49
|
-
bind:blur="handlePwdChange"
|
|
50
|
-
/>
|
|
51
|
-
</view>
|
|
52
|
-
<!-- 确认登录密码 -->
|
|
53
|
-
<view class="form-item-wrap">
|
|
54
|
-
<g-input
|
|
55
|
-
id="bank_card_pwd_password"
|
|
56
|
-
label="确认登录密码"
|
|
57
|
-
placeholder="请再次输入登录密码"
|
|
58
|
-
placeholder-class="bank-card-verify-placeholder"
|
|
59
|
-
value="{{ formData.bank_card_pwd_password }}"
|
|
60
|
-
clearable="true"
|
|
61
|
-
password="true"
|
|
62
|
-
bind:change="handleChange"
|
|
63
|
-
bind:input="handleChange"
|
|
64
|
-
bind:blur="handleChange"
|
|
65
|
-
/>
|
|
66
|
-
</view>
|
|
67
|
-
</g-form>
|
|
68
|
-
</view>
|
|
69
|
-
</view>
|