Authored by 郝肖肖

'邮箱登录绑定手机号判断是否合法'

... ... @@ -423,12 +423,16 @@ const bind = {
return res.json({code: 200, data: {}, message: 'success'});
},
// 调用绑定接口
forceBindMobileApi: (req, res, next) => {
isCheckEmailPassword: (req, res, next) => {
if (!req.session.bindEmail || !req.session.bindPassword) {
return res.json({code: 401, data: {}, message: '请重新登录授权'});
}
return next();
},
// 调用绑定接口
forceBindMobileApi: (req, res, next) => {
req.ctx(BindServiceModel).bindEmailLoginMobile(Object.assign(req.body, {
email: req.session.bindEmail,
password: req.session.bindPassword,
... ...
... ... @@ -83,12 +83,18 @@ router.get('/passport/password/resetsuccess', reset.passwordResetOkPage); // 重
// 通过邮箱登录绑定手机号
router.get('/passport/bind/forceBindMobile', validateCode.load, bind.forceBindMobilePage);
router.post('/passport/bind/forceSendMsg', validateCode.check, bind.sendMsgApi, bind.forceSendMsg);
router.post('/passport/bind/forceSendMsg',
validateCode.check,
bind.isCheckEmailPassword,
bind.sendMsgApi,
bind.forceSendMsg
);
router.post('/passport/bind/forceMobileCheck',
bind.isCheckEmailPassword,
bind.changeMobileCheckApi,
bind.forceBindMobileApi
);
router.post('/passport/bind/continueMobile', bind.forceBindMobileApi);
router.post('/passport/bind/continueMobile', bind.isCheckEmailPassword, bind.forceBindMobileApi);
// 第三方绑定手机号
router.get('/passport/bind/index', validateCode.load, bind.thirdBindMobilePage);
... ...