Authored by 毕凯

Merge branch 'hotfix/login' into 'gray'

Hotfix/login



See merge request !345
@@ -419,16 +419,19 @@ let setPassword = (req, res, next) => { @@ -419,16 +419,19 @@ let setPassword = (req, res, next) => {
419 419
420 RegService.regMobileAes(area, mobile, password, shoppingKey, smsCode, isFromMy).then((result) => { 420 RegService.regMobileAes(area, mobile, password, shoppingKey, smsCode, isFromMy).then((result) => {
421 if (!result.code || result.code !== 200) { 421 if (!result.code || result.code !== 200) {
422 - return Promise.reject(result); 422 + return res.send(result);
423 } 423 }
424 if (!result.data || !result.data.uid) { 424 if (!result.data || !result.data.uid) {
425 - return Promise.reject(result); 425 + return res.send(result);
426 } 426 }
427 427
428 resultCopy = result; 428 resultCopy = result;
429 429
430 return AuthHelper.syncUserSession(result.data.uid, req, res); 430 return AuthHelper.syncUserSession(result.data.uid, req, res);
431 }).then(() => { 431 }).then(() => {
  432 + if (!resultCopy) {
  433 + return;
  434 + }
432 // 返回跳转到来源页面 435 // 返回跳转到来源页面
433 let refer = req.cookies.refer; 436 let refer = req.cookies.refer;
434 437