weapps-plugin-jingtong-verify 1.5.8 → 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.8
2
+ 1.5.9
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "weapps-plugin-jingtong-verify",
3
3
  "pluginName": "weapps-plugin-jingtong-verify",
4
4
  "pluginType": "mp",
5
- "version": "1.5.8",
5
+ "version": "1.5.9",
6
6
  "description": "",
7
7
  "main": "sdk.js",
8
8
  "author": "tongyirenzheng",
@@ -296,6 +296,7 @@ Page({
296
296
  // return
297
297
  // }
298
298
  // 接口验证短信验证码
299
+ let isVerifySmsCode = false
299
300
  if(source_type !== '2'){
300
301
  const verSmsCodeParam = {
301
302
  "mobile": formData.bank_phone,
@@ -303,13 +304,16 @@ 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
312
  title: errmsg,
309
313
  icon: 'none',
310
314
  duration: 2000
311
315
  })
312
- return
316
+ isVerifySmsCode = true
313
317
  } else{
314
318
  if(!res.data.success) {
315
319
  wx.showToast({
@@ -317,50 +321,55 @@ Page({
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
- setTimeout(() => {
332
- // 接口验证有没有超出限制次数
333
- jingtongVerifyRequest.getVerifyLimit(param).then(res => {
334
- console.log(res)
335
- if (res.errcode === 0){
336
- const { data } = res
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
- wx.showToast({
357
- title: res.timeLimit,
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
- }, 100)
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(){