|
@@ -16,71 +16,75 @@ const reg = require(cRoot + '/reg'); |
|
@@ -16,71 +16,75 @@ const reg = require(cRoot + '/reg'); |
16
|
|
16
|
|
17
|
const router = express.Router(); // eslint-disable-line
|
17
|
const router = express.Router(); // eslint-disable-line
|
18
|
|
18
|
|
|
|
19
|
+// 兼容老的路由
|
|
|
20
|
+router.get('/signin.html', login.common.beforeLogin, login.local.loginPage);
|
|
|
21
|
+router.get('/reg.html', reg.index);
|
|
|
22
|
+
|
19
|
// 登出
|
23
|
// 登出
|
20
|
-router.get('/signout/index', login.local.logout);
|
24
|
+router.get('/passport/signout/index', login.local.logout);
|
21
|
|
25
|
|
22
|
// 登录页面
|
26
|
// 登录页面
|
23
|
-router.get('/login', login.common.beforeLogin, login.local.loginPage);
|
27
|
+router.get('/passport/login', login.common.beforeLogin, login.local.loginPage);
|
24
|
|
28
|
|
25
|
// 本地登录
|
29
|
// 本地登录
|
26
|
-router.post('/login/auth', login.local.login);
|
30
|
+router.post('/passport/login/auth', login.local.login);
|
27
|
|
31
|
|
28
|
// 微信登录
|
32
|
// 微信登录
|
29
|
-router.get('/login/wechat', login.common.beforeLogin, login.wechat.login);
|
|
|
30
|
-router.get('/login/wechat/callback', login.wechat.callback);
|
33
|
+router.get('/passport/login/wechat', login.common.beforeLogin, login.wechat.login);
|
|
|
34
|
+router.get('/passport/login/wechat/callback', login.wechat.callback);
|
31
|
|
35
|
|
32
|
// sina登录
|
36
|
// sina登录
|
33
|
-router.get('/login/sina', login.common.beforeLogin, login.sina.login);
|
|
|
34
|
-router.get('/login/sina/callback', login.sina.callback);
|
37
|
+router.get('/passport/login/sina', login.common.beforeLogin, login.sina.login);
|
|
|
38
|
+router.get('/passport/login/sina/callback', login.sina.callback);
|
35
|
|
39
|
|
36
|
// qq登录
|
40
|
// qq登录
|
37
|
-router.get('/login/qq', login.common.beforeLogin, login.qq.login);
|
|
|
38
|
-router.get('/login/qq/callback', login.qq.callback);
|
41
|
+router.get('/passport/login/qq', login.common.beforeLogin, login.qq.login);
|
|
|
42
|
+router.get('/passport/login/qq/callback', login.qq.callback);
|
39
|
|
43
|
|
40
|
// 支付宝登录
|
44
|
// 支付宝登录
|
41
|
-router.get('/login/alipay', login.common.beforeLogin, login.alipay.login);
|
|
|
42
|
-router.get('/login/alipay/callback', login.alipay.callback);
|
45
|
+router.get('/passport/login/alipay', login.common.beforeLogin, login.alipay.login);
|
|
|
46
|
+router.get('/passport/login/alipay/callback', login.alipay.callback);
|
43
|
|
47
|
|
44
|
// 登录绑定
|
48
|
// 登录绑定
|
45
|
-router.get('/bind/index', bind.indexPage);
|
|
|
46
|
-router.post('/bind/bindCheck', bind.bindCheck);
|
|
|
47
|
-router.get('/bind/code', bind.codePage);
|
|
|
48
|
-router.post('/bind/sendBindMsg', bind.sendBindMsg);
|
|
|
49
|
-router.post('/bind/bindMobile', bind.bindMobile);
|
49
|
+router.get('/passport/bind/index', bind.indexPage);
|
|
|
50
|
+router.post('/passport/bind/bindCheck', bind.bindCheck);
|
|
|
51
|
+router.get('/passport/bind/code', bind.codePage);
|
|
|
52
|
+router.post('/passport/bind/sendBindMsg', bind.sendBindMsg);
|
|
|
53
|
+router.post('/passport/bind/bindMobile', bind.bindMobile);
|
50
|
|
54
|
|
51
|
-router.post('/bind/relateMobile', bind.relateMobile);
|
|
|
52
|
-router.get('/bind/password', bind.passwordPage);
|
|
|
53
|
-router.get('/bind/success', bind.successPage);
|
55
|
+router.post('/passport/bind/relateMobile', bind.relateMobile);
|
|
|
56
|
+router.get('/passport/bind/password', bind.passwordPage);
|
|
|
57
|
+router.get('/passport/bind/success', bind.successPage);
|
54
|
|
58
|
|
55
|
-router.post('/bind/changeCheck', bind.changeCheck);
|
|
|
56
|
-router.post('/bind/changeMobile', bind.changeMobile);
|
59
|
+router.post('/passport/bind/changeCheck', bind.changeCheck);
|
|
|
60
|
+router.post('/passport/bind/changeMobile', bind.changeMobile);
|
57
|
|
61
|
|
58
|
/**
|
62
|
/**
|
59
|
* 注册
|
63
|
* 注册
|
60
|
*/
|
64
|
*/
|
61
|
-router.get('/reg/index', reg.index);
|
|
|
62
|
-router.post('/reg/verifymobile', reg.verifyMobile);
|
|
|
63
|
-router.get('/reg/code', reg.code);
|
|
|
64
|
-router.post('/reg/sendcode', reg.sendCode);
|
|
|
65
|
-router.post('/reg/verifycode', reg.verifyCode);
|
|
|
66
|
-router.get('/reg/password', reg.password);
|
|
|
67
|
-router.post('/reg/setpassword', reg.setPassword);
|
65
|
+router.get('/passport/reg/index', reg.index);
|
|
|
66
|
+router.post('/passport/reg/verifymobile', reg.verifyMobile);
|
|
|
67
|
+router.get('/passport/reg/code', reg.code);
|
|
|
68
|
+router.post('/passport/reg/sendcode', reg.sendCode);
|
|
|
69
|
+router.post('/passport/reg/verifycode', reg.verifyCode);
|
|
|
70
|
+router.get('/passport/reg/password', reg.password);
|
|
|
71
|
+router.post('/passport/reg/setpassword', reg.setPassword);
|
68
|
|
72
|
|
69
|
/**
|
73
|
/**
|
70
|
* 密码找回
|
74
|
* 密码找回
|
71
|
*/
|
75
|
*/
|
72
|
-router.get('/back/email', back.indexEmailPage);// 通过邮箱找回密码页面
|
|
|
73
|
-router.post('/back/sendemail', back.sendCodeToEmailAPI);// 发送邮箱验证码
|
|
|
74
|
-router.get('/back/resendemail', back.resendCodeToEmailAPI);// 重新发送邮箱验证码
|
|
|
75
|
-router.get('/back/success', back.backSuccessByEmailPage);// 邮箱找回密码-发送成功页面
|
|
|
76
|
-
|
|
|
77
|
-router.get('/back/mobile', back.indexMobilePage);// 输入手机号找回密码页面
|
|
|
78
|
-router.get('/back/mobilecode', back.verifyCodeByMobilePage);// 输入手机验证码页面
|
|
|
79
|
-router.post('/back/sendcode', back.sendCodeToMobileAPI);// 发送手机验证码
|
|
|
80
|
-router.post('/back/verifycode', back.verifyCodeByMobileAPI);// 校验手机验证码
|
|
|
81
|
-
|
|
|
82
|
-router.get('/back/backcode', back.setNewPasswordByMobilePage);// 设置新密码页面
|
|
|
83
|
-router.post('/back/passwordbyemail', back.setNewPasswordByEmailAPI);// 依据邮箱验证码修改密码
|
|
|
84
|
-router.post('/back/passwordbymobile', back.setNewPasswordByMobileAPI);// 依据手机验证码修改密码
|
76
|
+router.get('/passport/back/email', back.indexEmailPage);// 通过邮箱找回密码页面
|
|
|
77
|
+router.post('/passport/back/sendemail', back.sendCodeToEmailAPI);// 发送邮箱验证码
|
|
|
78
|
+router.get('/passport/back/resendemail', back.resendCodeToEmailAPI);// 重新发送邮箱验证码
|
|
|
79
|
+router.get('/passport/back/success', back.backSuccessByEmailPage);// 邮箱找回密码-发送成功页面
|
|
|
80
|
+
|
|
|
81
|
+router.get('/passport/back/mobile', back.indexMobilePage);// 输入手机号找回密码页面
|
|
|
82
|
+router.get('/passport/back/mobilecode', back.verifyCodeByMobilePage);// 输入手机验证码页面
|
|
|
83
|
+router.post('/passport/back/sendcode', back.sendCodeToMobileAPI);// 发送手机验证码
|
|
|
84
|
+router.post('/passport/back/verifycode', back.verifyCodeByMobileAPI);// 校验手机验证码
|
|
|
85
|
+
|
|
|
86
|
+router.get('/passport/back/backcode', back.setNewPasswordByMobilePage);// 设置新密码页面
|
|
|
87
|
+router.post('/passport/back/passwordbyemail', back.setNewPasswordByEmailAPI);// 依据邮箱验证码修改密码
|
|
|
88
|
+router.post('/passport/back/passwordbymobile', back.setNewPasswordByMobileAPI);// 依据手机验证码修改密码
|
85
|
|
89
|
|
86
|
module.exports = router; |
90
|
module.exports = router; |