weapps-plugin-jingtong-verify 1.5.7 → 1.5.9
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
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# SDK #
|
|
2
|
-
1.5.
|
|
2
|
+
1.5.9
|
package/package.json
CHANGED
|
@@ -843,7 +843,7 @@ Page({
|
|
|
843
843
|
});
|
|
844
844
|
} else {
|
|
845
845
|
wx.showToast({
|
|
846
|
-
title: errmsg || '
|
|
846
|
+
title: errmsg || '验证码获取已超10次,请明天再试。',
|
|
847
847
|
icon: 'none',
|
|
848
848
|
duration: 2500
|
|
849
849
|
});
|
|
@@ -994,15 +994,15 @@ Page({
|
|
|
994
994
|
})
|
|
995
995
|
return
|
|
996
996
|
}
|
|
997
|
-
const ms5Code = MD5(this.data.formSafeData.verification_code).toString()
|
|
998
|
-
if ( formSafeDataCode !== ms5Code) {
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
}
|
|
997
|
+
// const ms5Code = MD5(this.data.formSafeData.verification_code).toString()
|
|
998
|
+
// if ( formSafeDataCode !== ms5Code) {
|
|
999
|
+
// wx.showToast({
|
|
1000
|
+
// title: '验证码不一致,请重新输入',
|
|
1001
|
+
// icon: 'none',
|
|
1002
|
+
// duration: 2000
|
|
1003
|
+
// })
|
|
1004
|
+
// return
|
|
1005
|
+
// }
|
|
1006
1006
|
|
|
1007
1007
|
// 接口校验验证码
|
|
1008
1008
|
const smsCodeParam = {
|
|
@@ -1014,7 +1014,7 @@ Page({
|
|
|
1014
1014
|
if (errcode === 0) {
|
|
1015
1015
|
if(!res.data.success){
|
|
1016
1016
|
wx.showToast({
|
|
1017
|
-
title: '
|
|
1017
|
+
title: errmsg || '验证码校验失败,请重新输入。',
|
|
1018
1018
|
icon: 'none',
|
|
1019
1019
|
duration: 2000
|
|
1020
1020
|
})
|
|
@@ -1024,7 +1024,7 @@ Page({
|
|
|
1024
1024
|
}
|
|
1025
1025
|
} else {
|
|
1026
1026
|
wx.showToast({
|
|
1027
|
-
title: errmsg,
|
|
1027
|
+
title: errmsg || '验证码校验失败,请重新输入。',
|
|
1028
1028
|
icon: 'none',
|
|
1029
1029
|
duration: 2000
|
|
1030
1030
|
})
|
|
@@ -285,17 +285,18 @@ Page({
|
|
|
285
285
|
mask: true // 防止用户点击
|
|
286
286
|
})
|
|
287
287
|
const { formDataVerificationCode } = this.data
|
|
288
|
-
const ms5Code = MD5(formData.verification_code).toString()
|
|
289
|
-
if ( formDataVerificationCode !== ms5Code) {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
288
|
+
// const ms5Code = MD5(formData.verification_code).toString()
|
|
289
|
+
// if ( formDataVerificationCode !== ms5Code) {
|
|
290
|
+
// wx.hideLoading()
|
|
291
|
+
// wx.showToast({
|
|
292
|
+
// title: '验证码不一致,请重新输入',
|
|
293
|
+
// icon: 'none',
|
|
294
|
+
// duration: 2000
|
|
295
|
+
// })
|
|
296
|
+
// return
|
|
297
|
+
// }
|
|
298
298
|
// 接口验证短信验证码
|
|
299
|
+
let isVerifySmsCode = false
|
|
299
300
|
if(source_type !== '2'){
|
|
300
301
|
const verSmsCodeParam = {
|
|
301
302
|
"mobile": formData.bank_phone,
|
|
@@ -303,64 +304,72 @@ Page({
|
|
|
303
304
|
}
|
|
304
305
|
jingtongVerifyRequest.verifySmsCode(verSmsCodeParam).then(res => {
|
|
305
306
|
const { errcode, errmsg } = res
|
|
307
|
+
console.log('返回状态码')
|
|
308
|
+
console.log(errcode)
|
|
306
309
|
if(errcode !== 0){
|
|
310
|
+
console.log('进入了')
|
|
307
311
|
wx.showToast({
|
|
308
|
-
title:
|
|
312
|
+
title: errmsg,
|
|
309
313
|
icon: 'none',
|
|
310
314
|
duration: 2000
|
|
311
315
|
})
|
|
312
|
-
|
|
316
|
+
isVerifySmsCode = true
|
|
313
317
|
} else{
|
|
314
318
|
if(!res.data.success) {
|
|
315
319
|
wx.showToast({
|
|
316
|
-
title: '
|
|
320
|
+
title: errmsg || '验证码校验失败,请重新输入。',
|
|
317
321
|
icon: 'none',
|
|
318
322
|
duration: 2000
|
|
319
323
|
})
|
|
324
|
+
isVerifySmsCode = true
|
|
320
325
|
return
|
|
326
|
+
} else {
|
|
327
|
+
this.toOpera()
|
|
321
328
|
}
|
|
322
329
|
}
|
|
330
|
+
console.log('没有返回')
|
|
323
331
|
})
|
|
324
332
|
}
|
|
333
|
+
},
|
|
334
|
+
toOpera() {
|
|
335
|
+
const { formData, idCardType, source_type } = this.data
|
|
325
336
|
const param = {
|
|
326
337
|
'id_card_number': formData.id_card_number,
|
|
327
338
|
'type': 2,
|
|
328
339
|
'isCount': true
|
|
329
340
|
}
|
|
330
341
|
// 接口返回验证成功出现这个提示
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
if(data.times >= 3){
|
|
338
|
-
wx.hideLoading()
|
|
339
|
-
this.setData({
|
|
340
|
-
showToOtherModal: true
|
|
341
|
-
})
|
|
342
|
-
} else {
|
|
343
|
-
console.log(idCardType)
|
|
344
|
-
console.log(idCardType[formData.cid_type])
|
|
345
|
-
console.log('来源类型')
|
|
346
|
-
console.log(source_type)
|
|
347
|
-
wx.hideLoading()
|
|
348
|
-
if(source_type === '2'){
|
|
349
|
-
this.forgotVerify()
|
|
350
|
-
} else {
|
|
351
|
-
this.setPwdVerify()
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
} else {
|
|
342
|
+
// 接口验证有没有超出限制次数
|
|
343
|
+
jingtongVerifyRequest.getVerifyLimit(param).then(res => {
|
|
344
|
+
console.log(res)
|
|
345
|
+
if (res.errcode === 0){
|
|
346
|
+
const { data } = res
|
|
347
|
+
if(data.times >= 3){
|
|
355
348
|
wx.hideLoading()
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
icon: 'none',
|
|
359
|
-
duration: 1500
|
|
349
|
+
this.setData({
|
|
350
|
+
showToOtherModal: true
|
|
360
351
|
})
|
|
352
|
+
} else {
|
|
353
|
+
console.log(idCardType)
|
|
354
|
+
console.log(idCardType[formData.cid_type])
|
|
355
|
+
console.log('来源类型')
|
|
356
|
+
console.log(source_type)
|
|
357
|
+
wx.hideLoading()
|
|
358
|
+
if(source_type === '2'){
|
|
359
|
+
this.forgotVerify()
|
|
360
|
+
} else {
|
|
361
|
+
this.setPwdVerify()
|
|
362
|
+
}
|
|
361
363
|
}
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
+
} else {
|
|
365
|
+
wx.hideLoading()
|
|
366
|
+
wx.showToast({
|
|
367
|
+
title: res.timeLimit,
|
|
368
|
+
icon: 'none',
|
|
369
|
+
duration: 1500
|
|
370
|
+
})
|
|
371
|
+
}
|
|
372
|
+
})
|
|
364
373
|
},
|
|
365
374
|
// 设置密码进入
|
|
366
375
|
setPwdVerify(){
|
|
@@ -706,7 +715,7 @@ Page({
|
|
|
706
715
|
});
|
|
707
716
|
} else {
|
|
708
717
|
wx.showToast({
|
|
709
|
-
title: errmsg || '
|
|
718
|
+
title: errmsg || '验证码获取已超10次,请明天再试。',
|
|
710
719
|
icon: 'none',
|
|
711
720
|
duration: 2500
|
|
712
721
|
});
|