weapps-plugin-jingtong-verify 1.4.6 → 1.4.7

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