Authored by OF1706

weak reset pwd hbs

@@ -435,6 +435,24 @@ const weakPasswordPage = (req, res, next) => { @@ -435,6 +435,24 @@ const weakPasswordPage = (req, res, next) => {
435 }).catch(next); 435 }).catch(next);
436 }; 436 };
437 437
  438 +const weakPwdSuccessPage = (req, res, next) => {
  439 + passportHelper.getLeftBannerAsync()
  440 + .then(result => {
  441 + res.render('back/reset-success', Object.assign({
  442 + module: 'passport',
  443 + page: 'back-index',
  444 + simpleHeader: simpleHeaderModel.setSimpleHeaderData(),
  445 + title: '重置密码成功'
  446 + }, {
  447 + resetSuccess: {
  448 + coverHref: result.url,
  449 + coverImg: result.img
  450 + }
  451 + }));
  452 + })
  453 + .catch(next);
  454 +};
  455 +
438 module.exports = { 456 module.exports = {
439 index, // 首页 457 index, // 首页
440 fakeGetUserInfoAPI, // 通过邮箱或手机号获得用户信息 458 fakeGetUserInfoAPI, // 通过邮箱或手机号获得用户信息
@@ -467,6 +485,7 @@ module.exports = { @@ -467,6 +485,7 @@ module.exports = {
467 485
468 validatePwdPage, // 验证密码是否合法 486 validatePwdPage, // 验证密码是否合法
469 487
470 - weakPasswordPage // 弱密码页面 488 + weakPasswordPage, // 弱密码页面
  489 + weakPwdSuccessPage // 弱密码重置成功页面
471 }; 490 };
472 491
@@ -187,4 +187,8 @@ router.post('/passport/captcha/img', captcha.checkAPI); @@ -187,4 +187,8 @@ router.post('/passport/captcha/img', captcha.checkAPI);
187 187
188 router.get('/passport/back/weak', back.weakPasswordPage); 188 router.get('/passport/back/weak', back.weakPasswordPage);
189 189
  190 +// 重置密码成功页面
  191 +router.get('/passport/back/weakSuccess',
  192 + back.weakPwdSuccessPage);
  193 +
190 module.exports = router; 194 module.exports = router;
1 -<div class="reset-pwd-page back-page passport-page yoho-page clearfix"> 1 +<div class="weak-pwd-page back-page passport-page yoho-page clearfix">
2 {{# resetPwd}} 2 {{# resetPwd}}
3 {{> back/cover}} 3 {{> back/cover}}
4 <div class="content"> 4 <div class="content">
5 - <h2 class="title2">重置登录密码</h2> 5 + <h2 class="title3">重置登录密码</h2>
  6 + <p class="title-tip">您的账号密码过于简单请重置登陆密码</p>
6 <form id="reset-pwd-form" class="reset-pwd-form" method="POST" action="/passport/back/update"> 7 <form id="reset-pwd-form" class="reset-pwd-form" method="POST" action="/passport/back/update">
7 <ul> 8 <ul>
8 <li class="input-container-li po-re"> 9 <li class="input-container-li po-re">
9 - <input id="pwd" class="input va pwd" type="password" name="pwd" placeholder="密码" 10 + <input id="pwd" class="input va pwd" type="password" name="pwd" placeholder="密码"
10 maxlength="20"> 11 maxlength="20">
  12 + <span id="pwd-err" class="err-tip hide">
  13 + <i></i>
  14 + <em>请输入密码</em>
  15 + </span>
  16 + </li>
  17 + <li class="input-container-li clearfix po-re">
  18 + <input id="re-input" class="input va re-input repwd" type="password" name="re-input"
  19 + placeholder="6-20位新密码" maxlength="20">
11 <div class="pwd-intensity-container"> 20 <div class="pwd-intensity-container">
12 <span class="pwd-intensity low"></span> 21 <span class="pwd-intensity low"></span>
13 <span class="pwd-intensity mid"></span> 22 <span class="pwd-intensity mid"></span>
@@ -23,18 +32,10 @@ @@ -23,18 +32,10 @@
23 由字母、 数字组合,不能包含特殊符号 32 由字母、 数字组合,不能包含特殊符号
24 </div> 33 </div>
25 </div> 34 </div>
26 - <span id="pwd-err" class="err-tip hide">  
27 - <i></i>  
28 - <em>请输入密码</em>  
29 - </span>  
30 - </li>  
31 - <li class="input-container-li clearfix po-re">  
32 - <input id="re-input" class="input va re-input repwd" type="password" name="re-input"  
33 - placeholder="再次输入" maxlength="20">  
34 - <span id="repwd-err" class="err-tip hide">  
35 - <i></i>  
36 - <em>请输入密码确认</em>  
37 - </span> 35 + <span id="repwd-err" class="err-tip hide">
  36 + <i></i>
  37 + <em>请输入密码确认</em>
  38 + </span>
38 </li> 39 </li>
39 <li class="input-container-li clearfix"> 40 <li class="input-container-li clearfix">
40 <input type="hidden" name="code" value="{{code}}"> 41 <input type="hidden" name="code" value="{{code}}">
@@ -42,7 +43,10 @@ @@ -42,7 +43,10 @@
42 <input type="hidden" name="area" value="{{area}}"> 43 <input type="hidden" name="area" value="{{area}}">
43 <input type="hidden" name="token" value="{{token}}"> 44 <input type="hidden" name="token" value="{{token}}">
44 <input type="hidden" name="createdAt" value="{{createdAt}}"> 45 <input type="hidden" name="createdAt" value="{{createdAt}}">
45 - <input id="reset-pwd-btn" class="btn reset-pwd-btn" type="submit" value="提交" disabled=""> 46 + <input id="reset-pwd-btn" class="btn reset-pwd-btn" type="submit" value="重新登录" disabled="">
  47 + </li>
  48 + <li class="input-container-li">
  49 + <a class="weak-pwd-pass">跳过<i class="iconfont right-icon"></i></a>
46 </li> 50 </li>
47 </ul> 51 </ul>
48 </form> 52 </form>
@@ -240,3 +240,57 @@ @@ -240,3 +240,57 @@
240 line-height: 45px; 240 line-height: 45px;
241 } 241 }
242 } 242 }
  243 +
  244 +.weak-pwd-page {
  245 + .content {
  246 + margin-top: 142px !important;
  247 + }
  248 +
  249 + .title3 {
  250 + margin: 0 0 5px;
  251 + color: #000;
  252 + font-weight: normal;
  253 + font-size: 18px;
  254 + line-height: 40px;
  255 + }
  256 +
  257 + .title-tip {
  258 + margin-top: 10px;
  259 + margin-bottom: 27px;
  260 + color: #ff1a02;
  261 + font-size: 14px;
  262 + line-height: 14px;
  263 + }
  264 +
  265 + .input {
  266 + font-size: 14px;
  267 + }
  268 +
  269 + .input-container-li {
  270 + .btn {
  271 + font-size: 18px;
  272 + line-height: 42px;
  273 + }
  274 +
  275 + .weak-pwd-pass {
  276 + display: block;
  277 + text-align: right;
  278 + font-size: 14px;
  279 + height: 20px;
  280 + line-height: 20px;
  281 + color: #b0b0b0;
  282 + overflow: hidden;
  283 + }
  284 +
  285 + .right-icon {
  286 + margin-left: 3px;
  287 + font-size: 14px;
  288 + vertical-align: top;
  289 + -webkit-text-stroke-width: 1px;
  290 +
  291 + &:before {
  292 + content: "\e6dc";
  293 + }
  294 + }
  295 + }
  296 +}