123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>修改支付密码3-创业帮</title>
- <meta name="keywords" content="修改支付密码3-创业帮">
- <meta name="description" content="修改支付密码3-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="修改支付密码3-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- </head>
- <body class="bgc-back nopb">
- <div id="app" v-cloak>
- <div class="tc">
- <van-row class="pt8 pb8">
- <van-col offset="6" span="12">
- <div class="f12 c999 pt32 pb16">{{tipText}}</div>
- </van-col>
- </van-row>
- </div>
- <van-password-input :value="value2" :gutter="1" :focused="showKeyboard" @focus="showKeyboard = true"></van-password-input>
- <!-- 数字键盘-->
- <van-number-keyboard v-model="value2" random-key-order :show="showKeyboard" @blur="showKeyboard = false"></van-number-keyboard>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- active: 0,
- tipText: '请再次输入6位数字支付密码',
- value1: '',
- value2: '',
- changepaypwd:{
- Id:'',
- NewPayPwd:'',
- PayPwd:'',
- },
- showKeyboard: true,
- };
- },
- mounted() {
- this.value1 = PublicLib.getCookieInfo('newpaypwd');
- this.PayPwd = PublicLib.getCookieInfo('paypwd');
- this.changepaypwd.Id = PublicLib.getCookieInfo('userId');
- },
- watch: {
- value2(value) {
- if (value.length === 6) {
- if(this.value1 == this.value2){
- this.successToast();
- }else{
- this.giveToast();
- }
- } else {
- console.log('');
- }
- },
- },
- methods: {
- giveToast(){
- vant.Toast({
- message:'两次输入密码不一致',
- onClose: () => {
- this.value2 = '';
- }
- }
- );
- },
- goback(){
- PublicLib.GoBack({Level:'0'});
- },
- async successToast(){
- //- 修改密码
- if(this.PayPwd){
- this.changepaypwd.NewPayPwd = this.value2;
- const res = await postRequest('api/v1/users/modifypaypwd',JSON.stringify(this.changepaypwd));
- PublicLib.putCookieInfo('paypwd', '');
- PublicLib.putCookieInfo('newpaypwd', '');
- if(res.status === '1') tips('修改支付密码成功!');
- setTimeout(()=>{
- PublicLib.GoBack({Level:'0'});
- },1000);
- } else {
- //- 重置密码
- const res = await postRequest('api/v1/users/forgetpaypwd?t='+Math.random(6),JSON.stringify({Id:this.changepaypwd.Id,PayPwd:this.value2}));
- PublicLib.putCookieInfo('newpaypwd', '');
- if(res.status === '1') tips('重置支付密码成功!');
- setTimeout(()=>{
- //- 回到根节点
- PublicLib.GoBack({Level:'0'});
- },1000);
- }
- }
- },
- });
- </script>
- </body>
- </html>
|