weapps-plugin-jingtong-verify 1.6.2 → 1.6.4

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.6.2
2
+ 1.6.4
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.6.2",
5
+ "version": "1.6.4",
6
6
  "description": "",
7
7
  "main": "sdk.js",
8
8
  "author": "tongyirenzheng",
@@ -251,7 +251,7 @@ function fetchSessionId() {
251
251
  resolve(session_id)
252
252
  } else {
253
253
  wx.showToast({
254
- title: res.data.errmsg || 'mp/login失败,请重试',
254
+ title: res.data.errmsg || '网络超时,请检查网络或重启设备重试',
255
255
  icon: 'none',
256
256
  duration: 2000
257
257
  })
@@ -480,15 +480,11 @@ function _getSession(options) {
480
480
  url: tifhost + '/tif/sys/session',
481
481
  tifEncrypt: true,
482
482
  success: res => {
483
+ console.log('request _getSession success: ', res)
483
484
  const { errcode, data } = res.data
484
485
  if (errcode === 0) {
485
- console.log('获取到的session信息', data)
486
-
487
- console.log('解密', DecrtptAES('700d435bf4c1ff6fbce7f8af99e8c1a9'))
488
-
489
486
  const { name = '', cid = '', phone = '', caPhone = '', passport_number = '' } = data
490
487
  if (name && name.indexOf('tif_') >= 0) {
491
- console.log('解密name')
492
488
  try {
493
489
  data.name = DecrtptAES(name.split('tif_')[1])
494
490
  } catch(err) {
@@ -497,7 +493,6 @@ function _getSession(options) {
497
493
  }
498
494
  }
499
495
  if (cid && cid.indexOf('tif_') >= 0) {
500
- console.log('解密cid')
501
496
  try {
502
497
  data.cid = DecrtptAES(cid.split('tif_')[1])
503
498
  } catch(err) {
@@ -506,7 +501,6 @@ function _getSession(options) {
506
501
  }
507
502
  }
508
503
  if (phone && phone.indexOf('tif_') >= 0) {
509
- console.log('解密phone')
510
504
  try {
511
505
  data.phone = DecrtptAES(phone.split('tif_')[1])
512
506
  } catch(err) {
@@ -515,7 +509,6 @@ function _getSession(options) {
515
509
  }
516
510
  }
517
511
  if (caPhone && caPhone.indexOf('tif_') >= 0) {
518
- console.log('解密caPhone')
519
512
  try {
520
513
  data.caPhone = DecrtptAES(caPhone.split('tif_')[1])
521
514
  } catch(err) {
@@ -524,7 +517,6 @@ function _getSession(options) {
524
517
  }
525
518
  }
526
519
  if (passport_number && passport_number.indexOf('tif_') >= 0) {
527
- console.log('解密passport_number')
528
520
  try {
529
521
  data.passport_number = DecrtptAES(passport_number.split('tif_')[1])
530
522
  } catch(err) {
@@ -532,7 +524,6 @@ function _getSession(options) {
532
524
  data.passport_number = passport_number
533
525
  }
534
526
  }
535
-
536
527
  wx.setStorageSync('tif.openid', data.openid)
537
528
  wx.setStorageSync('tif.phone', data.phone.replace(/(\d{3})\d*(\d{4})/, '$1****$2'))
538
529
  wx.setStorageSync('tif.realPhone', data.phone)
@@ -540,7 +531,6 @@ function _getSession(options) {
540
531
  wx.setStorageSync('tif.has_phone', data.has_phone)
541
532
  wx.setStorageSync('tif.tel_confirm_time', data.tel_confirm_time)
542
533
  setTimeout(() => {
543
- console.log('====session信息====3', data)
544
534
  options && options.success && options.success(data)
545
535
  }, 200)
546
536
  } else {
@@ -548,6 +538,12 @@ function _getSession(options) {
548
538
  }
549
539
  },
550
540
  fail: err => {
541
+ wx.showToast({
542
+ title: '当前访问人数过多,请您稍后再试,也可通过京通支付宝端登录。',
543
+ icon: 'none',
544
+ duration: 2000
545
+ })
546
+ console.log('request _getSession fail: ', res)
551
547
  options && options.fail && options.fail(JSON.stringify(err))
552
548
  }
553
549
  })