Authored by 王水玲

登录注册添加兼容的老路由

... ... @@ -16,71 +16,75 @@ const reg = require(cRoot + '/reg');
const router = express.Router(); // eslint-disable-line
// 兼容老的路由
router.get('/signin.html', login.common.beforeLogin, login.local.loginPage);
router.get('/reg.html', reg.index);
// 登出
router.get('/signout/index', login.local.logout);
router.get('/passport/signout/index', login.local.logout);
// 登录页面
router.get('/login', login.common.beforeLogin, login.local.loginPage);
router.get('/passport/login', login.common.beforeLogin, login.local.loginPage);
// 本地登录
router.post('/login/auth', login.local.login);
router.post('/passport/login/auth', login.local.login);
// 微信登录
router.get('/login/wechat', login.common.beforeLogin, login.wechat.login);
router.get('/login/wechat/callback', login.wechat.callback);
router.get('/passport/login/wechat', login.common.beforeLogin, login.wechat.login);
router.get('/passport/login/wechat/callback', login.wechat.callback);
// sina登录
router.get('/login/sina', login.common.beforeLogin, login.sina.login);
router.get('/login/sina/callback', login.sina.callback);
router.get('/passport/login/sina', login.common.beforeLogin, login.sina.login);
router.get('/passport/login/sina/callback', login.sina.callback);
// qq登录
router.get('/login/qq', login.common.beforeLogin, login.qq.login);
router.get('/login/qq/callback', login.qq.callback);
router.get('/passport/login/qq', login.common.beforeLogin, login.qq.login);
router.get('/passport/login/qq/callback', login.qq.callback);
// 支付宝登录
router.get('/login/alipay', login.common.beforeLogin, login.alipay.login);
router.get('/login/alipay/callback', login.alipay.callback);
router.get('/passport/login/alipay', login.common.beforeLogin, login.alipay.login);
router.get('/passport/login/alipay/callback', login.alipay.callback);
// 登录绑定
router.get('/bind/index', bind.indexPage);
router.post('/bind/bindCheck', bind.bindCheck);
router.get('/bind/code', bind.codePage);
router.post('/bind/sendBindMsg', bind.sendBindMsg);
router.post('/bind/bindMobile', bind.bindMobile);
router.get('/passport/bind/index', bind.indexPage);
router.post('/passport/bind/bindCheck', bind.bindCheck);
router.get('/passport/bind/code', bind.codePage);
router.post('/passport/bind/sendBindMsg', bind.sendBindMsg);
router.post('/passport/bind/bindMobile', bind.bindMobile);
router.post('/bind/relateMobile', bind.relateMobile);
router.get('/bind/password', bind.passwordPage);
router.get('/bind/success', bind.successPage);
router.post('/passport/bind/relateMobile', bind.relateMobile);
router.get('/passport/bind/password', bind.passwordPage);
router.get('/passport/bind/success', bind.successPage);
router.post('/bind/changeCheck', bind.changeCheck);
router.post('/bind/changeMobile', bind.changeMobile);
router.post('/passport/bind/changeCheck', bind.changeCheck);
router.post('/passport/bind/changeMobile', bind.changeMobile);
/**
* 注册
*/
router.get('/reg/index', reg.index);
router.post('/reg/verifymobile', reg.verifyMobile);
router.get('/reg/code', reg.code);
router.post('/reg/sendcode', reg.sendCode);
router.post('/reg/verifycode', reg.verifyCode);
router.get('/reg/password', reg.password);
router.post('/reg/setpassword', reg.setPassword);
router.get('/passport/reg/index', reg.index);
router.post('/passport/reg/verifymobile', reg.verifyMobile);
router.get('/passport/reg/code', reg.code);
router.post('/passport/reg/sendcode', reg.sendCode);
router.post('/passport/reg/verifycode', reg.verifyCode);
router.get('/passport/reg/password', reg.password);
router.post('/passport/reg/setpassword', reg.setPassword);
/**
* 密码找回
*/
router.get('/back/email', back.indexEmailPage);// 通过邮箱找回密码页面
router.post('/back/sendemail', back.sendCodeToEmailAPI);// 发送邮箱验证码
router.get('/back/resendemail', back.resendCodeToEmailAPI);// 重新发送邮箱验证码
router.get('/back/success', back.backSuccessByEmailPage);// 邮箱找回密码-发送成功页面
router.get('/back/mobile', back.indexMobilePage);// 输入手机号找回密码页面
router.get('/back/mobilecode', back.verifyCodeByMobilePage);// 输入手机验证码页面
router.post('/back/sendcode', back.sendCodeToMobileAPI);// 发送手机验证码
router.post('/back/verifycode', back.verifyCodeByMobileAPI);// 校验手机验证码
router.get('/back/backcode', back.setNewPasswordByMobilePage);// 设置新密码页面
router.post('/back/passwordbyemail', back.setNewPasswordByEmailAPI);// 依据邮箱验证码修改密码
router.post('/back/passwordbymobile', back.setNewPasswordByMobileAPI);// 依据手机验证码修改密码
router.get('/passport/back/email', back.indexEmailPage);// 通过邮箱找回密码页面
router.post('/passport/back/sendemail', back.sendCodeToEmailAPI);// 发送邮箱验证码
router.get('/passport/back/resendemail', back.resendCodeToEmailAPI);// 重新发送邮箱验证码
router.get('/passport/back/success', back.backSuccessByEmailPage);// 邮箱找回密码-发送成功页面
router.get('/passport/back/mobile', back.indexMobilePage);// 输入手机号找回密码页面
router.get('/passport/back/mobilecode', back.verifyCodeByMobilePage);// 输入手机验证码页面
router.post('/passport/back/sendcode', back.sendCodeToMobileAPI);// 发送手机验证码
router.post('/passport/back/verifycode', back.verifyCodeByMobileAPI);// 校验手机验证码
router.get('/passport/back/backcode', back.setNewPasswordByMobilePage);// 设置新密码页面
router.post('/passport/back/passwordbyemail', back.setNewPasswordByEmailAPI);// 依据邮箱验证码修改密码
router.post('/passport/back/passwordbymobile', back.setNewPasswordByMobileAPI);// 依据手机验证码修改密码
module.exports = router;
... ...
... ... @@ -10,10 +10,9 @@ module.exports = app => {
// 四个频道页,频道选择页面 /boys,/girls,/,/kids,/lifestyle 等页面,就直接占用路由了
app.use(require('./apps/channel'));
app.use(require('./apps/passport'));
// 业务模块
app.use('/product', require('./apps/product'));
app.use('/guang', require('./apps/guang'));
app.use('/passport', require('./apps/passport'));
app.use('/activity', require('./apps/activity'));
};
... ...
... ... @@ -74,7 +74,7 @@ body.passport-body {
padding-right: 40PX;
right: 0;
color: #fff;
background-color: transparent;
background-color: #575757;
border: 0;
border-radius: 5PX;
appearance: none;
... ...