Merge remote-tracking branch 'origin/feature/back' into feature/passport
Showing
3 changed files
with
41 additions
and
0 deletions
apps/passport/controllers/back.js
0 → 100644
1 | +/** | ||
2 | + * 找回密码 | ||
3 | + * Created by yoho on 2016/6/12. | ||
4 | + */ | ||
5 | + | ||
6 | +'use strict'; | ||
7 | + | ||
8 | +const library = '../../../library'; | ||
9 | +const helpers = require(`${library}/helpers`); | ||
10 | + | ||
11 | +/** | ||
12 | + * 通过邮箱找回密码 | ||
13 | + * @param req | ||
14 | + * @param res | ||
15 | + */ | ||
16 | +module.exports.byEmail = (req, res) => { | ||
17 | + | ||
18 | + let data = { | ||
19 | + backUrl: helpers.urlFormat('/signin.html'), | ||
20 | + headerText: '找回密码', | ||
21 | + isPassportPage: true, | ||
22 | + backEmail: true | ||
23 | + }; | ||
24 | + | ||
25 | + res.render('back/by-email', { | ||
26 | + result: data, | ||
27 | + module: 'passport', | ||
28 | + page: 'back', | ||
29 | + title: data.backUrl | ||
30 | + }); | ||
31 | +}; |
apps/passport/models/back-helper.js
0 → 100644
@@ -15,5 +15,6 @@ const router = express.Router(); // eslint-disable-line | @@ -15,5 +15,6 @@ const router = express.Router(); // eslint-disable-line | ||
15 | router.get('/login', login.local.loginPage); | 15 | router.get('/login', login.local.loginPage); |
16 | router.get('/login/wechat', login.wechat.beforeLogin, login.wechat.login); // 登录 | 16 | router.get('/login/wechat', login.wechat.beforeLogin, login.wechat.login); // 登录 |
17 | router.get('/login/wechat/callback', login.wechat.callback); | 17 | router.get('/login/wechat/callback', login.wechat.callback); |
18 | +router.get('/ '); | ||
18 | 19 | ||
19 | module.exports = router; | 20 | module.exports = router; |
-
Please register or login to post a comment