weapps-plugin-jingtong-verify 1.4.6 → 1.4.8

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