Authored by 邱骏

短信登录增加注册用户判断

... ... @@ -185,6 +185,8 @@ class SmsLogin {
return;
}
let isNewUser = false;
// 手机号码已注册 --> 直接登录
req.ctx(PhoneServiceModel).autoSignin({
profile: mobile,
... ... @@ -193,10 +195,15 @@ class SmsLogin {
shopping_key,
from
}).then(info => {
if (info.code !== 200) {
return Promise.reject(info);
}
if (info.data.nFlag === 'Y') {
isNewUser = true;
}
res.cookie('_LOGIN_TYPE', 5, {
domain: 'm.yohobuy.com'
});
... ... @@ -205,7 +212,8 @@ class SmsLogin {
res.json({
code: 200,
message: LOGIN_SUCCSS,
redirect: _.get(authData, 'refer') || utils.refererLimit(req.cookies.refer)
redirect: _.get(authData, 'refer') || utils.refererLimit(req.cookies.refer),
isNewUser: isNewUser
});
delete req.session.smsLogin;
... ...
... ... @@ -13,7 +13,7 @@
<ul>
{{#each normalCoupon}}
<li>
<div class="coupon-info">
<div class="coupon-info {{#if isUfo}}ufo{{/if}}">
<div class="coupon-left">
<p class="coupon-price">{{amount}}</p>
<p class="coupon-condition">{{useRuleText}}</p>
... ...
{
"name": "yohobuywap-node",
"version": "6.9.8-1",
"version": "6.9.8-2",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -175,8 +175,15 @@ class SmsLoginNew extends Page {
modal.show();
}
console.log(res);
setTimeout(() => {
location.href = res.redirect;
if (res.isNewUser) {
location.href = '/regSuccess.html';
} else {
location.href = res.redirect;
}
}, 1000);
return;
}
... ...
... ... @@ -97,22 +97,6 @@ body {
overflow: hidden;
}
.not-get .coupon-info {
background-image: url("img/passport/reg-success-coupon-bg-off.png");
}
.not-get .coupon-left .coupon-price {
color: #b0b0b0;
}
.not-get .coupon-left .coupon-condition {
color: #b0b0b0;
}
.not-get .coupon-right .coupon-name {
color: #b0b0b0;
}
.list-title {
font-size: 28px;
color: #b0b0b0;
... ... @@ -189,6 +173,26 @@ body {
transform: translateY(-50%);
border-radius: 10px;
}
&.ufo {
background-image: url("img/passport/reg-success-coupon-bg-on-ufo.png");
}
}
.coupon-container .not-get .coupon-info {
background-image: url("img/passport/reg-success-coupon-bg-off.png");
}
.coupon-container .not-get .coupon-left .coupon-price {
color: #b0b0b0;
}
.coupon-container .not-get .coupon-left .coupon-condition {
color: #b0b0b0;
}
.coupon-container .not-get .coupon-right .coupon-name {
color: #b0b0b0;
}
}
... ...