Authored by 邱骏

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

@@ -185,6 +185,8 @@ class SmsLogin { @@ -185,6 +185,8 @@ class SmsLogin {
185 return; 185 return;
186 } 186 }
187 187
  188 + let isNewUser = false;
  189 +
188 // 手机号码已注册 --> 直接登录 190 // 手机号码已注册 --> 直接登录
189 req.ctx(PhoneServiceModel).autoSignin({ 191 req.ctx(PhoneServiceModel).autoSignin({
190 profile: mobile, 192 profile: mobile,
@@ -193,10 +195,15 @@ class SmsLogin { @@ -193,10 +195,15 @@ class SmsLogin {
193 shopping_key, 195 shopping_key,
194 from 196 from
195 }).then(info => { 197 }).then(info => {
  198 +
196 if (info.code !== 200) { 199 if (info.code !== 200) {
197 return Promise.reject(info); 200 return Promise.reject(info);
198 } 201 }
199 202
  203 + if (info.data.nFlag === 'Y') {
  204 + isNewUser = true;
  205 + }
  206 +
200 res.cookie('_LOGIN_TYPE', 5, { 207 res.cookie('_LOGIN_TYPE', 5, {
201 domain: 'm.yohobuy.com' 208 domain: 'm.yohobuy.com'
202 }); 209 });
@@ -205,7 +212,8 @@ class SmsLogin { @@ -205,7 +212,8 @@ class SmsLogin {
205 res.json({ 212 res.json({
206 code: 200, 213 code: 200,
207 message: LOGIN_SUCCSS, 214 message: LOGIN_SUCCSS,
208 - redirect: _.get(authData, 'refer') || utils.refererLimit(req.cookies.refer) 215 + redirect: _.get(authData, 'refer') || utils.refererLimit(req.cookies.refer),
  216 + isNewUser: isNewUser
209 }); 217 });
210 218
211 delete req.session.smsLogin; 219 delete req.session.smsLogin;
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <ul> 13 <ul>
14 {{#each normalCoupon}} 14 {{#each normalCoupon}}
15 <li> 15 <li>
16 - <div class="coupon-info"> 16 + <div class="coupon-info {{#if isUfo}}ufo{{/if}}">
17 <div class="coupon-left"> 17 <div class="coupon-left">
18 <p class="coupon-price">{{amount}}</p> 18 <p class="coupon-price">{{amount}}</p>
19 <p class="coupon-condition">{{useRuleText}}</p> 19 <p class="coupon-condition">{{useRuleText}}</p>
1 { 1 {
2 "name": "yohobuywap-node", 2 "name": "yohobuywap-node",
3 - "version": "6.9.8-1", 3 + "version": "6.9.8-2",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -175,8 +175,15 @@ class SmsLoginNew extends Page { @@ -175,8 +175,15 @@ class SmsLoginNew extends Page {
175 modal.show(); 175 modal.show();
176 } 176 }
177 177
  178 + console.log(res);
  179 +
178 setTimeout(() => { 180 setTimeout(() => {
179 - location.href = res.redirect; 181 + if (res.isNewUser) {
  182 + location.href = '/regSuccess.html';
  183 + } else {
  184 + location.href = res.redirect;
  185 + }
  186 +
180 }, 1000); 187 }, 1000);
181 return; 188 return;
182 } 189 }
@@ -97,22 +97,6 @@ body { @@ -97,22 +97,6 @@ body {
97 overflow: hidden; 97 overflow: hidden;
98 } 98 }
99 99
100 - .not-get .coupon-info {  
101 - background-image: url("img/passport/reg-success-coupon-bg-off.png");  
102 - }  
103 -  
104 - .not-get .coupon-left .coupon-price {  
105 - color: #b0b0b0;  
106 - }  
107 -  
108 - .not-get .coupon-left .coupon-condition {  
109 - color: #b0b0b0;  
110 - }  
111 -  
112 - .not-get .coupon-right .coupon-name {  
113 - color: #b0b0b0;  
114 - }  
115 -  
116 .list-title { 100 .list-title {
117 font-size: 28px; 101 font-size: 28px;
118 color: #b0b0b0; 102 color: #b0b0b0;
@@ -189,6 +173,26 @@ body { @@ -189,6 +173,26 @@ body {
189 transform: translateY(-50%); 173 transform: translateY(-50%);
190 border-radius: 10px; 174 border-radius: 10px;
191 } 175 }
  176 +
  177 + &.ufo {
  178 + background-image: url("img/passport/reg-success-coupon-bg-on-ufo.png");
  179 + }
  180 + }
  181 +
  182 + .coupon-container .not-get .coupon-info {
  183 + background-image: url("img/passport/reg-success-coupon-bg-off.png");
  184 + }
  185 +
  186 + .coupon-container .not-get .coupon-left .coupon-price {
  187 + color: #b0b0b0;
  188 + }
  189 +
  190 + .coupon-container .not-get .coupon-left .coupon-condition {
  191 + color: #b0b0b0;
  192 + }
  193 +
  194 + .coupon-container .not-get .coupon-right .coupon-name {
  195 + color: #b0b0b0;
192 } 196 }
193 } 197 }
194 198