9 Star 19 Fork 4

12345 / plusToken

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
find-login-password.html 5.74 KB
一键复制 编辑 原始数据 按行查看 历史
12345 提交于 2019-11-09 17:26 . fd
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="HandheldFriendly" content="true" />
<meta name="MobileOptimized" content="320" />
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/jiazai.css">
<title>重置登陆密码</title>
<style>
.notice-hea {
position: fixed;
top: 0;
right: 0;
left: 0;
height: 40px;
padding: 0 20px;
display: flex;
align-items: flex-end;
}
.notice-hea>span {
margin-left: 18px;
font-size: 17px;
}
.set-trans-wrap {
position: fixed;
top: 40px;
left: 0;
right: 0;
bottom: 0;
padding: 20px;
overflow: auto;
}
.set-list {
margin-top: 30px;
padding: 8px 0;
display: flex;
align-items: center;
font-size: 14px;
border-bottom: 1px solid #eee;
}
.set-list>span {
flex: 0 0 80px;
}
.set-list>input {
flex: 1 1 0;
letter-spacing: 2px;
}
.btn-sure {
width: 70%;
margin: 100px 15% 0;
padding: 8px 0;
font-size: 15px;
letter-spacing: 2px;
color: white;
background: #3574FA;
border-radius: 5px;
box-shadow: 1px 1px 10px RGBA(53, 116, 250, .7);
}
</style>
</head>
<body>
<div id='app'>
<!-- 加载中动画 -->
<div class='jiazai' v-if='jiazai'>
<img src="./img/jia-ani.gif" width="50px" height="50px">
</div>
<!-- 加载中动画 -->
<div class='notice-hea'>
<img @click='close' src="./img/right-black.svg" width="20px" height="20px">
<span>重置登陆密码</span>
</div>
<div class='set-trans-wrap'>
<div class='set-list'>
<span>新密码</span>
<input type="password" placeholder="密码由6-20位数字、字母组合" v-model='pass'>
</div>
<div class='set-list'>
<span>确认密码</span>
<input type="password" placeholder="再次确认密码" v-model='surePass'>
</div>
<button class='btn-sure' @click='sub'>确认提交</button>
</div>
</div>
<script src="js/comm.js" type="text/javascript" charset="utf-8"></script>
<script src="js/back.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.min.js"></script>
<script src="js/vue.min.js"></script>
<script>
var user = function(data) {
app.$data.user = JSON.parse(data);
}
var app = new Vue({
el: '#app',
data: {
jiazai: false,
//上级传过来的user
user: {},
//新密码
pass: '',
//确认新密码
surePass: ''
},
methods: {
close: function() {
var web = plus.webview.currentWebview();
web.close('none');
},
//确认提交
sub: function() {
var passLen = this.pass.length;
var patt = /^\w+$/;
var off = patt.test(this.pass);
if (!(passLen >= 6 && passLen <= 20) || !off) {
_toast('您的登陆密码不符合要求');
return;
}
if (this.pass != this.surePass) {
_toast('您两次登陆密码不一致');
return;
}
var This = this;
this.jiazai = true;
_post(FORGET_PASSWORD2, {
userid: this.user.userid,
type: this.user.type,
password1: this.pass,
password2: this.surePass
}, function(data) {
This.jiazai = false;
if (data.status == 1) {
_toast('重置密码成功,请牢记你的新密码');
localStorage.setItem('user', '');
localStorage.setItem('shouPassword', '');
var all = plus.webview.all();
_openHref('login.html', 'login');
setTimeout(function() {
for (var i = 0; i < all.length; i++) {
all[i].hide();
}
}, 1000);
setTimeout(function() {
for (var i = 0; i < all.length; i++) {
all[i].close('none');
}
}, 2000);
} else {
_toast(data.msg);
}
});
}
}
});
</script>
<script type="text/javascript" charset="utf-8">
function plusReady() {
}
// 判断扩展API是否准备,否则监听'plusready'事件
if (window.plus) {
plusReady();
} else {
document.addEventListener('plusready', plusReady, false);
}
</script>
</body>
</html>
JavaScript
1
https://gitee.com/gongmengling/plusToken.git
git@gitee.com:gongmengling/plusToken.git
gongmengling
plusToken
plusToken
master

搜索帮助