back-new.js
1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
const _ = require('lodash');
const co = Promise.coroutine;
const backService = require('../models/back-service');
class BackNew {
/**
* 通过手机找回密码
*/
backByMobile(req, res, next) {
_.set(req.session, 'backupCaptch.verifyResult', false);
if (req.session.captchaValidCount == null) { // eslint-disable-line
req.session.captchaValidCount = 5;
}
co(function* () {
let countrysResult = yield backService.getAreaDataAsync(); // 地区信息列表
let countrys = _.get(countrysResult, 'data', []);
res.render('back/mobile-new', {
width750: true,
localCss: true,
module: 'passport',
page: 'back-mobile-new',
countrys: countrys,
});
})().catch(next);
}
/**
* 通过邮箱找回密码
*/
backByEmail(req, res) {
res.render('back/email-new', {
width750: true,
localCss: true,
module: 'passport',
page: 'back-email-new'
});
}
/**
* 通过邮箱找回密码成功页
*/
backByEmailSuccess(req, res) {
res.render('back/email-success-new', {
width750: true,
localCss: true,
module: 'passport',
page: 'back-email-success-new'
});
}
}
module.exports = BackNew;