user-changepaypwd-1.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>修改支付密码1-创业帮</title>
  6. <meta name="keywords" content="修改支付密码1-创业帮">
  7. <meta name="description" content="修改支付密码1-创业帮">
  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="修改支付密码1-创业帮">
  14. <meta http-equiv="Cache-Control" content="no-siteapp">
  15. <link rel="stylesheet" href="./static/css/main.css">
  16. </head>
  17. <body class="bgc-back nopb ovh">
  18. <div id="app" v-cloak>
  19. <div class="tc">
  20. <van-row class="pt8 pb8">
  21. <van-col offset="7" span="10">
  22. <div class="f12 c999 pt32 pb16">{{tipText}}</div>
  23. </van-col>
  24. </van-row>
  25. </div>
  26. <van-password-input :value="value2" :gutter="1" :focused="showKeyboard" @focus="showKeyboard = true"></van-password-input>
  27. <!-- 数字键盘-->
  28. <van-number-keyboard v-model="value2" random-key-order :show="showKeyboard" @blur="showKeyboard = false"></van-number-keyboard>
  29. </div>
  30. <script src="./static/js/klm-vv.min.js"></script>
  31. <script src="./static/js/appfunc.min.js"></script>
  32. <script src="./static/js/klm-axios-config.js"></script>
  33. <script src="./static/js/publicfn.js"></script>
  34. <script>
  35. // 通过 CDN 引入时不会自动注册 Lazyload 组件
  36. // 可以通过下面的方式手动注册
  37. Vue.use(vant.Lazyload);
  38. // 在 #app 标签下渲染一个按钮组件
  39. let app = new Vue({
  40. el: '#app',
  41. data() {
  42. return {
  43. tipText: '请输入原支付密码,验证身份',
  44. value2: '',
  45. showKeyboard: true,
  46. userid:'',
  47. };
  48. },
  49. created() {
  50. //- 初始化密码
  51. this.userid = PublicLib.getCookieInfo('userId');
  52. },
  53. watch: {
  54. async value2(value) {
  55. if (value.length === 6) {
  56. //- 验证原支付密码
  57. const res = await getRequest('api/v1/users/checkpaypwd?t='+Math.random(6),JSON.stringify({Id:this.userid,PayPwd:this.value2}));
  58. if(res.status === '1'){
  59. this.successToast();
  60. }else{
  61. this.giveToast(res.info);
  62. };
  63. } else {
  64. };
  65. },
  66. },
  67. methods: {
  68. giveToast(data){
  69. vant.Toast({
  70. message:data,
  71. onClose: () => {
  72. this.value2 = '';
  73. }}
  74. );
  75. },
  76. successToast(){
  77. vant.Toast('密码正确');
  78. PublicLib.putCookieInfo('paypwd', true);
  79. setTimeout(()=>{
  80. PublicLib.Goto({Url:'user-changepaypwd-2'});
  81. },500);
  82. },
  83. },
  84. });
  85. </script>
  86. </body>
  87. </html>