user-forgetpaypwd.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!DOCTYPE html>
  2. <html class="h100p">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>忘记支付密码-创业帮</title>
  6. <meta name="keywords" content="忘记支付密码-创业帮">
  7. <meta name="description" content="忘记支付密码-创业帮">
  8. <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
  9. <meta name="apple-mobile-web-app-capable" content="yes">
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  11. <meta content="telephone=no" name="format-detection">
  12. <meta content="email=no" name="format-detection">
  13. <meta name="apple-mobile-web-app-title" content="忘记支付密码-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. <style>.borderno{border:none;background-color:#f7f7f7;}</style>
  17. </head>
  18. <body class="h100p nopb bgcf7f7f7 ovh">
  19. <div id="app" v-cloak>
  20. <van-nav-bar class="bgcf7f7f7 user_rank_explan_title" left-arrow @click-left="goback" v-if="toptitleisshow">
  21. <template #left> <img src="./static/images/left.png" alt=""></template>
  22. </van-nav-bar>
  23. <div class="pt8 pb32 pl32 pr32">
  24. <div class="f24 c333 pb32">验证身份信息</div>
  25. <van-cell-group class="forgetpaypwd">
  26. <van-field class="forgetpaypwd_plr0 bgcf7f7f7" v-model="userinfo.RealName" placeholder="请输入真实姓名"> </van-field>
  27. <van-field class="forgetpaypwd_plr0 bgcf7f7f7" v-model="userinfo.Mobile" placeholder="请输入注册手机号"> </van-field>
  28. <van-field class="forgetpaypwd_plr0 bgcf7f7f7" v-model="userinfo.CertId" placeholder="请输入姓名对应的身份证号"> </van-field>
  29. <van-field class="bottom_line forgetpaypwd_plr0 bgcf7f7f7" v-model="userinfo.MobileCode" type="number" placeholder="请输入验证码">
  30. <template #button>
  31. <van-button class="borderno" plain color="#ff502a" size="small" v-if="codeisclick" @click="getsmscode">获取验证码</van-button>
  32. <van-button class="borderno fl" plain size="small" color="#ff502a" disabled v-else>{{countdown}}s</van-button>
  33. </template>
  34. </van-field>
  35. </van-cell-group>
  36. <div class="pt16 bc333" v-cloak>
  37. <van-button class="border_radius8" type="primary" block color="#FFD500" @click="changepaypwd">确认修改</van-button>
  38. </div>
  39. </div>
  40. </div>
  41. <script src="./static/js/klm-vv.min.js"></script>
  42. <script src="./static/js/appfunc.min.js"></script>
  43. <script src="./static/js/klm-axios-config.js"></script>
  44. <script src="./static/js/publicfn.js"></script>
  45. <script>
  46. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  47. // 可以通过下面的方式手动注册
  48. Vue.use(vant.Lazyload);
  49. // 在 #app 标签下渲染一个按钮组件
  50. let app = new Vue({
  51. el: '#app',
  52. data() {
  53. return {
  54. toptitleisshow:false,
  55. userinfo:{
  56. Id:'',
  57. RealName: '',
  58. CertId:'',
  59. Mobile:'',
  60. MobileCode:''
  61. },
  62. codeisclick:true,
  63. countdown:60
  64. };
  65. },
  66. created() {
  67. this.toptitleisshow = toptitleisshow;
  68. this.userinfo.Id = PublicLib.getCookieInfo('userId');
  69. },
  70. methods: {
  71. goback(){
  72. PublicLib.GoBack({Level:1});
  73. },
  74. async getsmscode(){
  75. //- 验证码发送间隔
  76. if(verification(this.userinfo.Mobile)) return ;
  77. this.codeisclick = false;
  78. setTimeout(()=>{
  79. this.codeisclick = true;
  80. },60000);
  81. const timer = setInterval(()=>{
  82. this.countdown--;
  83. if(this.countdown === 0) {
  84. this.countdown = 60;
  85. clearInterval(timer);
  86. }
  87. },1000);
  88. const res = await postRequest('api/v1/mobilecodecheck/sendsms',JSON.stringify({Mobile:this.userinfo.Mobile}));
  89. if(res.status === '1' ) {
  90. tips('验证码发送成功,请注意查收!');
  91. };
  92. },
  93. async changepaypwd(){
  94. //- 验证信息是否完整
  95. if(this.userinfo.Id === '' || this.userinfo.RealName === '' || this.userinfo.CertId === '' || this.userinfo.Mobile === '' || this.userinfo.MobileCode === '' ) {
  96. return tips('请将信息填写完整!');
  97. };
  98. //- 验证手机号码
  99. if(verification(this.userinfo.Mobile)) return ;
  100. //- 验证身份证格式
  101. if(!verificationIdCardNumber(this.userinfo.CertId)){
  102. return tips('身份证格式不正确!');
  103. };
  104. const res = await postRequest('api/v1/users/checkforgetpwd?t='+Math.random(6),JSON.stringify(this.userinfo));
  105. if(res.status !== '1') {
  106. return tips(res.info);
  107. };
  108. PublicLib.Goto({Url:'user-changepaypwd-2'});
  109. }
  110. }
  111. });
  112. </script>
  113. </body>
  114. </html>