weapps-plugin-jingtong-verify 1.5.9 → 1.6.1

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