Showing
2 changed files
with
7 additions
and
7 deletions
@@ -215,6 +215,7 @@ const resetPasswordPage = (req, res, next) => { | @@ -215,6 +215,7 @@ const resetPasswordPage = (req, res, next) => { | ||
215 | }; | 215 | }; |
216 | 216 | ||
217 | const verifyCodeByMobilePage = (req, res, next) => { | 217 | const verifyCodeByMobilePage = (req, res, next) => { |
218 | + req.session.type = 'back-step2'; | ||
218 | 219 | ||
219 | passportHelper.getLeftBannerAsync() | 220 | passportHelper.getLeftBannerAsync() |
220 | .then(result => { | 221 | .then(result => { |
@@ -281,6 +282,10 @@ const verifyCodeByMobileAPI = (req, res) => { | @@ -281,6 +282,10 @@ const verifyCodeByMobileAPI = (req, res) => { | ||
281 | return res.json(ERR); | 282 | return res.json(ERR); |
282 | } | 283 | } |
283 | 284 | ||
285 | + if (session.type !== 'back-step2') { | ||
286 | + return res.json(ERR); | ||
287 | + } | ||
288 | + | ||
284 | service.verifyCodyByMobileAsync(area, mobile, mobileCode) | 289 | service.verifyCodyByMobileAsync(area, mobile, mobileCode) |
285 | .then(result => { | 290 | .then(result => { |
286 | res.json(result); | 291 | res.json(result); |
@@ -156,15 +156,10 @@ router.get('/passport/back/verification', | @@ -156,15 +156,10 @@ router.get('/passport/back/verification', | ||
156 | back.verifyCodeByMobilePage); | 156 | back.verifyCodeByMobilePage); |
157 | 157 | ||
158 | // 重新发送短信接口 | 158 | // 重新发送短信接口 |
159 | -router.post('/passport/back/sendBackMobile', | ||
160 | - captcha.requiredAPI, | ||
161 | - back.validateMobileAPI, | ||
162 | - back.sendBackMobileAPI); | 159 | +router.post('/passport/back/sendBackMobile', back.validateMobileAPI, back.sendBackMobileAPI); |
163 | 160 | ||
164 | // 验证手机验证码接口 | 161 | // 验证手机验证码接口 |
165 | -router.post('/passport/back/backMobile', | ||
166 | - captcha.requiredAPI, | ||
167 | - back.verifyCodeByMobileAPI); | 162 | +router.post('/passport/back/backMobile', back.verifyCodeByMobileAPI); |
168 | 163 | ||
169 | /** | 164 | /** |
170 | * 重置密码 | 165 | * 重置密码 |
-
Please register or login to post a comment