12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>设置支付密码2-创业帮</title>
- <meta name="keywords" content="设置支付密码2-创业帮">
- <meta name="description" content="设置支付密码2-创业帮">
- <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="设置支付密码2-创业帮">
- <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">
- <div class="tc">
- <van-row class="pt8 pb8">
- <van-col offset="7" span="10">
- <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 {
- tipText: '请再次输入6位数字支付密码',
- value1: '',
- value2: '',
- showKeyboard: true,
- };
- },
- created() {
- this.value1 = PublicLib.getCookieInfo("setpaypwd");
- },
- watch: {
- value2(value) {
- if (value.length === 6) {
- if(this.value1 == this.value2){
- this.successToast();
- }else{
- this.giveToast();
- }
- }
- }
- },
- methods: {
- giveToast(){
- vant.Toast({
- message:'密码错误,请再次输入',
- onClose: () => {
- this.value2 = '';
- }}
- );
- },
- async successToast(){
- const Id = PublicLib.getCookieInfo("userId");
- const res = await postRequest('api/v1/users/setpaypwd?t='+Math.random(6),JSON.stringify({Id,PayPwd:this.value2}));
- vant.Toast({
- message:'设置密码成功',
- onClose: () => {
- //- 退回当前根节点
- PublicLib.GoBack({Level:2});
- }}
- );
- }
- },
- });
- </script>
- </body>
- </html>
|