|
@@ -144,6 +144,7 @@ exports.index = (req, res, next) => { |
|
@@ -144,6 +144,7 @@ exports.index = (req, res, next) => { |
144
|
let code = 'a83b7d55324fb65f96c1f85a3387ebd8';
|
144
|
let code = 'a83b7d55324fb65f96c1f85a3387ebd8';
|
145
|
let uid = req.__USER__.uid;
|
145
|
let uid = req.__USER__.uid;
|
146
|
let options;
|
146
|
let options;
|
|
|
147
|
+ let noLoginUrl = helpers.urlFormat('/activity/student/register')+'?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '://m.yohobuy.com/activity/student"}}}';
|
147
|
|
148
|
|
148
|
|
149
|
|
149
|
|
150
|
|
|
@@ -183,23 +184,14 @@ exports.index = (req, res, next) => { |
|
@@ -183,23 +184,14 @@ exports.index = (req, res, next) => { |
183
|
if (coupons && coupons.data) {
|
184
|
if (coupons && coupons.data) {
|
184
|
coupons.link = link && link.data ? link.data[0].url + (req.__USER__.isApp ? '&app_version=' + req.__USER__.app_version : '') : '';
|
185
|
coupons.link = link && link.data ? link.data[0].url + (req.__USER__.isApp ? '&app_version=' + req.__USER__.app_version : '') : '';
|
185
|
coupons.data = (coupons.data || []).map((item) => {
|
186
|
coupons.data = (coupons.data || []).map((item) => {
|
|
|
187
|
+ // let url = item.image.url;
|
186
|
couponids.push(item.couponID);
|
188
|
couponids.push(item.couponID);
|
187
|
|
189
|
|
188
|
- if (!req.__USER__.isLogin) {
|
|
|
189
|
- item.image.url = 'http://m.yohobuy.com/activity/student/register?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/student"}}}';
|
|
|
190
|
- }
|
|
|
191
|
-
|
|
|
192
|
- // if (item.image.url.indexOf('?') === -1) {
|
|
|
193
|
- // item.image.url += '?';
|
190
|
+ // if (!req.__USER__.isLogin) {
|
|
|
191
|
+ // url = 'http://m.yohobuy.com/activity/student/register?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/student"}}}';
|
194
|
// }
|
192
|
// }
|
195
|
//
|
193
|
//
|
196
|
- //
|
|
|
197
|
- // url = item.image.url.substring(0, item.image.url.indexOf('?'));
|
|
|
198
|
- //
|
|
|
199
|
- // param = JSON.stringify(getRequest(item.image.url));
|
|
|
200
|
- // item.image.url = item.image.url + '&app_version=1&openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"' + url + '","param":' + param + '}}';
|
|
|
201
|
-
|
|
|
202
|
- // console.log(item);
|
194
|
+ // item.image.noLoginUrl=url;
|
203
|
return item;
|
195
|
return item;
|
204
|
});
|
196
|
});
|
205
|
}
|
197
|
}
|
|
@@ -240,7 +232,8 @@ exports.index = (req, res, next) => { |
|
@@ -240,7 +232,8 @@ exports.index = (req, res, next) => { |
240
|
http: req.__USER__.http,
|
232
|
http: req.__USER__.http,
|
241
|
uid: req.__USER__.uid,
|
233
|
uid: req.__USER__.uid,
|
242
|
app_version: req.__USER__.app_version,
|
234
|
app_version: req.__USER__.app_version,
|
243
|
- isAppNoLogin: req.__USER__.isApp && !req.__USER__.isLogin
|
235
|
+ isAppNoLogin: req.__USER__.isApp && !req.__USER__.isLogin,
|
|
|
236
|
+ noLoginUrl:noLoginUrl
|
244
|
};
|
237
|
};
|
245
|
if (!req.__USER__.isApp) {
|
238
|
if (!req.__USER__.isApp) {
|
246
|
options.pageHeader = headerModel.setNav({
|
239
|
options.pageHeader = headerModel.setNav({
|
|
@@ -259,7 +252,7 @@ exports.index = (req, res, next) => { |
|
@@ -259,7 +252,7 @@ exports.index = (req, res, next) => { |
259
|
}
|
252
|
}
|
260
|
} else {
|
253
|
} else {
|
261
|
// no login
|
254
|
// no login
|
262
|
- options.loginUrl = options.loginUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '//m.yohobuy.com/activity/student/register"}}}';
|
255
|
+ options.loginUrl = options.loginUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '//m.yohobuy.com/activity/student/register","antarget":"1"}}}';
|
263
|
}
|
256
|
}
|
264
|
} else {
|
257
|
} else {
|
265
|
if (options.isLogin) {
|
258
|
if (options.isLogin) {
|