Authored by htoooth

fix login

... ... @@ -266,7 +266,7 @@ let mobileRegister = (req, res, next) => {
}
/* 手机注册: 调用注册接口*/
let regResult = yield regService.regMobileAes(area, mobile, password, cookie.getShoppingKey(req));
let regResult = yield regService.regMobileAes(area, mobile, password, code, cookie.getShoppingKey(req));
if (!regResult.code || regResult.code !== 200) {
data.message = '注册失败';
... ...
... ... @@ -30,27 +30,13 @@ let validMobileCode = (area, mobile, code) => {
return api.post('', params);
};
let regMobile = (area, mobile, password, shoppingKey)=> {
let params = {
method: 'app.passport.register',
area: area,
profile: mobile,
password: password
};
if (shoppingKey) {
params.shopping_key = shoppingKey;
}
return api.post('', params);
};
let regMobileAes = (area, mobile, password, shoppingKey)=> {
let regMobileAes = (area, mobile, password, code, shoppingKey)=> {
let params = {
method: 'app.passport.registerAES',
area: area,
profile: mobile,
password: aes.aesPwd(password)
password: aes.aesPwd(password),
verifyCode: code
};
if (shoppingKey) {
... ... @@ -63,6 +49,5 @@ let regMobileAes = (area, mobile, password, shoppingKey)=> {
module.exports = {
sendCodeToMobile,
validMobileCode,
regMobile,
regMobileAes
};
... ...
... ... @@ -76,8 +76,8 @@ function setLoginStatus(data) {
'<a href="//www.yohobuy.com/logout.html">[退出]</a>';
} else {
loginHtml = '<span>Hi~</span>&nbsp;' +
'<a href="//www.yohobuy.com/signin.html?refer="' + window.location.href + '>[请登录]</a>&nbsp;' +
'<a href="//www.yohobuy.com/reg.html"' + window.location.href + '>[免费注册]</a>';
'<a href="//www.yohobuy.com/signin.html">[请登录]</a>&nbsp;' +
'<a href="//www.yohobuy.com/reg.html">[免费注册]</a>';
}
$('.header-tool li').eq(0).html(loginHtml);
}
... ...