Authored by OF1706

weak reset pwd hbs

... ... @@ -435,6 +435,24 @@ const weakPasswordPage = (req, res, next) => {
}).catch(next);
};
const weakPwdSuccessPage = (req, res, next) => {
passportHelper.getLeftBannerAsync()
.then(result => {
res.render('back/reset-success', Object.assign({
module: 'passport',
page: 'back-index',
simpleHeader: simpleHeaderModel.setSimpleHeaderData(),
title: '重置密码成功'
}, {
resetSuccess: {
coverHref: result.url,
coverImg: result.img
}
}));
})
.catch(next);
};
module.exports = {
index, // 首页
fakeGetUserInfoAPI, // 通过邮箱或手机号获得用户信息
... ... @@ -467,6 +485,7 @@ module.exports = {
validatePwdPage, // 验证密码是否合法
weakPasswordPage // 弱密码页面
weakPasswordPage, // 弱密码页面
weakPwdSuccessPage // 弱密码重置成功页面
};
... ...
... ... @@ -187,4 +187,8 @@ router.post('/passport/captcha/img', captcha.checkAPI);
router.get('/passport/back/weak', back.weakPasswordPage);
// 重置密码成功页面
router.get('/passport/back/weakSuccess',
back.weakPwdSuccessPage);
module.exports = router;
... ...
<div class="reset-pwd-page back-page passport-page yoho-page clearfix">
<div class="weak-pwd-page back-page passport-page yoho-page clearfix">
{{# resetPwd}}
{{> back/cover}}
<div class="content">
<h2 class="title2">重置登录密码</h2>
<h2 class="title3">重置登录密码</h2>
<p class="title-tip">您的账号密码过于简单请重置登陆密码</p>
<form id="reset-pwd-form" class="reset-pwd-form" method="POST" action="/passport/back/update">
<ul>
<li class="input-container-li po-re">
<input id="pwd" class="input va pwd" type="password" name="pwd" placeholder="密码"
<input id="pwd" class="input va pwd" type="password" name="pwd" placeholder="密码"
maxlength="20">
<span id="pwd-err" class="err-tip hide">
<i></i>
<em>请输入密码</em>
</span>
</li>
<li class="input-container-li clearfix po-re">
<input id="re-input" class="input va re-input repwd" type="password" name="re-input"
placeholder="6-20位新密码" maxlength="20">
<div class="pwd-intensity-container">
<span class="pwd-intensity low"></span>
<span class="pwd-intensity mid"></span>
... ... @@ -23,14 +32,6 @@
由字母、 数字组合,不能包含特殊符号
</div>
</div>
<span id="pwd-err" class="err-tip hide">
<i></i>
<em>请输入密码</em>
</span>
</li>
<li class="input-container-li clearfix po-re">
<input id="re-input" class="input va re-input repwd" type="password" name="re-input"
placeholder="再次输入" maxlength="20">
<span id="repwd-err" class="err-tip hide">
<i></i>
<em>请输入密码确认</em>
... ... @@ -42,7 +43,10 @@
<input type="hidden" name="area" value="{{area}}">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="createdAt" value="{{createdAt}}">
<input id="reset-pwd-btn" class="btn reset-pwd-btn" type="submit" value="提交" disabled="">
<input id="reset-pwd-btn" class="btn reset-pwd-btn" type="submit" value="重新登录" disabled="">
</li>
<li class="input-container-li">
<a class="weak-pwd-pass">跳过<i class="iconfont right-icon"></i></a>
</li>
</ul>
</form>
... ...
... ... @@ -240,3 +240,57 @@
line-height: 45px;
}
}
.weak-pwd-page {
.content {
margin-top: 142px !important;
}
.title3 {
margin: 0 0 5px;
color: #000;
font-weight: normal;
font-size: 18px;
line-height: 40px;
}
.title-tip {
margin-top: 10px;
margin-bottom: 27px;
color: #ff1a02;
font-size: 14px;
line-height: 14px;
}
.input {
font-size: 14px;
}
.input-container-li {
.btn {
font-size: 18px;
line-height: 42px;
}
.weak-pwd-pass {
display: block;
text-align: right;
font-size: 14px;
height: 20px;
line-height: 20px;
color: #b0b0b0;
overflow: hidden;
}
.right-icon {
margin-left: 3px;
font-size: 14px;
vertical-align: top;
-webkit-text-stroke-width: 1px;
&:before {
content: "\e6dc";
}
}
}
}
... ...