112 行
3.1 KiB
HTML
可执行文件
112 行
3.1 KiB
HTML
可执行文件
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vip/css/templateA/card-password.css" />
|
|
<script type="text/javascript" src="__PUBLIC__/vip/js/templateA/rem2.js"></script>
|
|
<title>修改支付密码</title>
|
|
<style type="text/css">
|
|
[v-cloak] {
|
|
display: none;
|
|
}
|
|
.submit>span{
|
|
background: #6FA1FB;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="app" v-cloak class="wrap">
|
|
<div class="content">
|
|
<div class="content-info">
|
|
<input type="password" maxlength="6" v-model="value1" placeholder="请输入原密码" />
|
|
</div>
|
|
<div class="content-info">
|
|
<input type="password" maxlength="6" v-model="value2" placeholder="请输入新密码" />
|
|
</div>
|
|
<div class="content-info">
|
|
<input type="password" maxlength="6" v-model="value3" placeholder="请再次输入新密码" />
|
|
</div>
|
|
</div>
|
|
<a class="forget" href="{:U('Set/forgetpwd')}">忘记密码?</a>
|
|
<div class="submit" @click="sure">
|
|
<span>确认修改</span>
|
|
</div>
|
|
<transition name="slide-fade">
|
|
<div v-if="isshow" class="tips">{{tips}}</div>
|
|
</transition>
|
|
<transition name="bounce">
|
|
<div v-if="isbounce" class="tips">{{successtext}}</div>
|
|
</transition>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
<script src="__PUBLIC__/vip/js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script type="text/javascript" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
|
<script type="text/javascript">
|
|
var app = new Vue({
|
|
el: "#app",
|
|
data: {
|
|
value1: '',
|
|
value2: '',
|
|
value3: '',
|
|
tips: '',
|
|
isshow: false,
|
|
successtext: '',
|
|
isbounce: false
|
|
},
|
|
methods: {
|
|
sure: function() {
|
|
var that = this;
|
|
if(!that.value1) {
|
|
fn(that, '请输入原密码');
|
|
} else if(!that.value2) {
|
|
fn(that, '请输入新密码');
|
|
} else if(!that.value3) {
|
|
fn(that, '请再次输入新密码');
|
|
} else if(that.value2 != that.value3) {
|
|
fn(that, '两次输入的密码不一致');
|
|
} else {
|
|
this.subPwd();
|
|
}
|
|
},
|
|
subPwd: function() {
|
|
var that = this;
|
|
$.post("/index.php/Vip/Set/changepwd", {
|
|
oldpwd: this.value1,
|
|
pwd: this.value2
|
|
}, function(data) {
|
|
if(data.success) {
|
|
that.isbounce = true;
|
|
that.successtext = data.msg;
|
|
setTimeout(function() {
|
|
that.isbounce = false;
|
|
window.location.replace("/index.php/Vip/Cardcenter/index");
|
|
}, 1000);
|
|
} else {
|
|
that.isbounce = true;
|
|
that.successtext = data.msg;
|
|
setTimeout(function() {
|
|
that.isbounce = false;
|
|
}, 1000);
|
|
}
|
|
})
|
|
}
|
|
|
|
}
|
|
})
|
|
|
|
function fn(that, text) {
|
|
that.isshow = true;
|
|
that.tips = text;
|
|
setTimeout(function() {
|
|
that.isshow = false;
|
|
that.tips = '';
|
|
}, 1000);
|
|
}
|
|
</script>
|
|
|
|
</html> |