Authored by 郭成尧

Merge branch 'feature/loginview' into release/6.0.1

@@ -28,11 +28,11 @@ const router = express.Router(); // eslint-disable-line @@ -28,11 +28,11 @@ const router = express.Router(); // eslint-disable-line
28 router.get('/passport/geetest/register', geetest.register); 28 router.get('/passport/geetest/register', geetest.register);
29 29
30 // 兼容老的路由 30 // 兼容老的路由
31 -router.get('/signin.html', login.common.weixinCheck, validateCode.load,  
32 - login.common.beforeLogin, login.common.clearCookie, smsLogin.loginPage);  
33 -router.get('/reg.html', validateCode.load, disableBFCahce, reg.index);  
34 -router.get('/login.html', validateCode.load,  
35 - login.common.beforeLogin, login.common.clearCookie, login.local.international); 31 +// router.get('/signin.html', login.common.weixinCheck, validateCode.load,
  32 +// login.common.beforeLogin, login.common.clearCookie, smsLogin.loginPage);
  33 +// router.get('/reg.html', validateCode.load, disableBFCahce, reg.index);
  34 +// router.get('/login.html', validateCode.load,
  35 +// login.common.beforeLogin, login.common.clearCookie, login.local.international);
36 router.get('/phoneback.html', back.indexMobilePage); 36 router.get('/phoneback.html', back.indexMobilePage);
37 router.get('/emailback.html', back.indexEmailPage); 37 router.get('/emailback.html', back.indexEmailPage);
38 38
@@ -40,21 +40,21 @@ router.get('/emailback.html', back.indexEmailPage); @@ -40,21 +40,21 @@ router.get('/emailback.html', back.indexEmailPage);
40 router.get('/passport/signout/index', login.common.clearCookie, login.local.logout); 40 router.get('/passport/signout/index', login.common.clearCookie, login.local.logout);
41 41
42 // 登录页面 42 // 登录页面
43 -router.get('/passport/login',  
44 - validateCode.load,  
45 - login.common.beforeLogin,  
46 - login.common.clearCookie,  
47 - login.loginShowCaptchaByIp,  
48 - login.local.loginPage  
49 -);  
50 -  
51 -router.get('/passport/international',  
52 - validateCode.load,  
53 - login.common.beforeLogin,  
54 - login.common.clearCookie,  
55 - login.loginShowCaptchaByIp,  
56 - login.local.international  
57 -); 43 +// router.get('/passport/login',
  44 +// validateCode.load,
  45 +// login.common.beforeLogin,
  46 +// login.common.clearCookie,
  47 +// login.loginShowCaptchaByIp,
  48 +// login.local.loginPage
  49 +// );
  50 +
  51 +// router.get('/passport/international',
  52 +// validateCode.load,
  53 +// login.common.beforeLogin,
  54 +// login.common.clearCookie,
  55 +// login.loginShowCaptchaByIp,
  56 +// login.local.international
  57 +// );
58 58
59 // 本地登录 59 // 本地登录
60 router.post('/passport/login/auth', validateCode.check, login.local.login); 60 router.post('/passport/login/auth', validateCode.check, login.local.login);
@@ -63,8 +63,9 @@ router.post('/passport/login/auth', validateCode.check, login.local.login); @@ -63,8 +63,9 @@ router.post('/passport/login/auth', validateCode.check, login.local.login);
63 router.get('/passport/login/check', login.common.check); 63 router.get('/passport/login/check', login.common.check);
64 64
65 // SMS 短信 65 // SMS 短信
66 -router.use('/passport/sms_login', login.common.beforeLogin, smsLogin.beforeIn);  
67 -router.get('/passport/sms_login', validateCode.load, smsLogin.loginPage); 66 +// router.use('/passport/sms_login', login.common.beforeLogin, smsLogin.beforeIn);
  67 +// router.get('/passport/sms_login', validateCode.load, smsLogin.loginPage);
  68 +
68 router.post('/passport/sms_login/step1_check', validateCode.check, smsLogin.indexCheck); 69 router.post('/passport/sms_login/step1_check', validateCode.check, smsLogin.indexCheck);
69 router.get('/passport/sms_login/token.json', 70 router.get('/passport/sms_login/token.json',
70 smsLogin.tokenBefore, 71 smsLogin.tokenBefore,
@@ -113,7 +114,8 @@ router.post('/passport/bind/changeMobile', bind.changeMobile); @@ -113,7 +114,8 @@ router.post('/passport/bind/changeMobile', bind.changeMobile);
113 * 注册 114 * 注册
114 */ 115 */
115 router.use('/passport/reg/*', disableBFCahce); 116 router.use('/passport/reg/*', disableBFCahce);
116 -router.get('/passport/reg/index', validateCode.load, reg.index); 117 +
  118 +// router.get('/passport/reg/index', validateCode.load, reg.index);
117 router.post('/passport/reg/verifymobile', validateCode.check, reg.sendCodeBusyBoy, reg.verifyMobile); 119 router.post('/passport/reg/verifymobile', validateCode.check, reg.sendCodeBusyBoy, reg.verifyMobile);
118 router.get('/passport/reg/code', reg.guardStep(2), reg.code); 120 router.get('/passport/reg/code', reg.guardStep(2), reg.code);
119 router.post('/passport/reg/sendcode', reg.guardStep(2), reg.sendCodeBusyBoy, reg.sendCode); 121 router.post('/passport/reg/sendcode', reg.guardStep(2), reg.sendCodeBusyBoy, reg.sendCode);
@@ -173,29 +175,46 @@ const smsNew = new SmsNew(); @@ -173,29 +175,46 @@ const smsNew = new SmsNew();
173 const BackNew = require('./controllers/back-new'); 175 const BackNew = require('./controllers/back-new');
174 const backNew = new BackNew(); 176 const backNew = new BackNew();
175 177
176 -router.get('/passport/login-new', 178 +router.get('/passport/login',
177 validateCode.load, 179 validateCode.load,
178 login.common.beforeLogin, 180 login.common.beforeLogin,
179 login.common.clearCookie, 181 login.common.clearCookie,
180 login.loginShowCaptchaByIp, 182 login.loginShowCaptchaByIp,
181 loginNew.loginPage); // 普通登录 183 loginNew.loginPage); // 普通登录
182 -router.get('/passport/international-new', 184 +router.get('/passport/international',
183 validateCode.load, 185 validateCode.load,
184 login.common.beforeLogin, 186 login.common.beforeLogin,
185 login.common.clearCookie, 187 login.common.clearCookie,
186 login.loginShowCaptchaByIp, 188 login.loginShowCaptchaByIp,
187 loginNew.international); // 国际账号登录 189 loginNew.international); // 国际账号登录
188 -router.get('/passport/reg-new', 190 +router.get('/passport/reg/index',
189 validateCode.forTest, // 测试使用,上灰度前删除 191 validateCode.forTest, // 测试使用,上灰度前删除
190 validateCode.load, 192 validateCode.load,
191 regNew.regPage); // 注册页面 193 regNew.regPage); // 注册页面
192 router.post('/passport/register-new', 194 router.post('/passport/register-new',
193 reg.sendCodeBusyBoy, 195 reg.sendCodeBusyBoy,
194 regNew.register); // 注册请求 196 regNew.register); // 注册请求
195 -router.get('/passport/sms-login-new', 197 +router.get('/passport/sms_login',
196 validateCode.forTest, // 测试使用,上灰度前删除 198 validateCode.forTest, // 测试使用,上灰度前删除
197 validateCode.load, 199 validateCode.load,
198 smsNew.smsLoginPage); // 短信验证码登录 200 smsNew.smsLoginPage); // 短信验证码登录
  201 +
  202 +// 兼容老的路由
  203 +router.get('/signin.html',
  204 + validateCode.forTest, // 测试使用,上灰度前删除
  205 + validateCode.load,
  206 + smsNew.smsLoginPage); // 短信验证码登录
  207 +router.get('/reg.html',
  208 + validateCode.forTest, // 测试使用,上灰度前删除
  209 + validateCode.load,
  210 + regNew.regPage); // 注册页面
  211 +router.get('/login.html',
  212 + validateCode.load,
  213 + login.common.beforeLogin,
  214 + login.common.clearCookie,
  215 + login.loginShowCaptchaByIp,
  216 + loginNew.international); // 国际账号登录
  217 +
199 router.get('/passport/back/mobile-new', backNew.backByMobile); // 通过手机找回密码 218 router.get('/passport/back/mobile-new', backNew.backByMobile); // 通过手机找回密码
200 router.get('/passport/back/email-new', backNew.backByEmail); // 通过邮箱找回密码 219 router.get('/passport/back/email-new', backNew.backByEmail); // 通过邮箱找回密码
201 router.get('/passport/back/email-success-new', backNew.backByEmailSuccess); // 通过邮箱找回密码成功页 220 router.get('/passport/back/email-success-new', backNew.backByEmailSuccess); // 通过邮箱找回密码成功页