...
|
...
|
@@ -144,6 +144,7 @@ exports.index = (req, res, next) => { |
|
|
let code = 'a83b7d55324fb65f96c1f85a3387ebd8';
|
|
|
let uid = req.__USER__.uid;
|
|
|
let options;
|
|
|
let noLoginUrl = helpers.urlFormat('/activity/student/register')+'?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '://m.yohobuy.com/activity/student"}}}';
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -183,23 +184,14 @@ exports.index = (req, res, next) => { |
|
|
if (coupons && coupons.data) {
|
|
|
coupons.link = link && link.data ? link.data[0].url + (req.__USER__.isApp ? '&app_version=' + req.__USER__.app_version : '') : '';
|
|
|
coupons.data = (coupons.data || []).map((item) => {
|
|
|
// let url = item.image.url;
|
|
|
couponids.push(item.couponID);
|
|
|
|
|
|
if (!req.__USER__.isLogin) {
|
|
|
item.image.url = 'http://m.yohobuy.com/activity/student/register?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/student"}}}';
|
|
|
}
|
|
|
|
|
|
// if (item.image.url.indexOf('?') === -1) {
|
|
|
// item.image.url += '?';
|
|
|
// if (!req.__USER__.isLogin) {
|
|
|
// url = 'http://m.yohobuy.com/activity/student/register?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/student"}}}';
|
|
|
// }
|
|
|
//
|
|
|
//
|
|
|
// url = item.image.url.substring(0, item.image.url.indexOf('?'));
|
|
|
//
|
|
|
// param = JSON.stringify(getRequest(item.image.url));
|
|
|
// item.image.url = item.image.url + '&app_version=1&openby:yohobuy={"action":"go.h5","params":{"islogin":"N","url":"' + url + '","param":' + param + '}}';
|
|
|
|
|
|
// console.log(item);
|
|
|
// item.image.noLoginUrl=url;
|
|
|
return item;
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -240,7 +232,8 @@ exports.index = (req, res, next) => { |
|
|
http: req.__USER__.http,
|
|
|
uid: req.__USER__.uid,
|
|
|
app_version: req.__USER__.app_version,
|
|
|
isAppNoLogin: req.__USER__.isApp && !req.__USER__.isLogin
|
|
|
isAppNoLogin: req.__USER__.isApp && !req.__USER__.isLogin,
|
|
|
noLoginUrl:noLoginUrl
|
|
|
};
|
|
|
if (!req.__USER__.isApp) {
|
|
|
options.pageHeader = headerModel.setNav({
|
...
|
...
|
@@ -259,7 +252,7 @@ exports.index = (req, res, next) => { |
|
|
}
|
|
|
} else {
|
|
|
// no login
|
|
|
options.loginUrl = options.loginUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '//m.yohobuy.com/activity/student/register"}}}';
|
|
|
options.loginUrl = options.loginUrl + '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' + req.__USER__.http + '//m.yohobuy.com/activity/student/register","antarget":"1"}}}';
|
|
|
}
|
|
|
} else {
|
|
|
if (options.isLogin) {
|
...
|
...
|
|