|
|
'use strict';
|
|
|
|
|
|
const utils = '../../../utils';
|
|
|
const productNameProcess = require(`${utils}/product-name-process`);
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const crypto = global.yoho.crypto;
|
|
|
const queryString = require('querystring');
|
...
|
...
|
@@ -131,15 +129,8 @@ exports.index = (req, res, next) => { |
|
|
return item;
|
|
|
});
|
|
|
|
|
|
|
|
|
datas[1].data = datas[1].data || {};
|
|
|
datas[1].data.product_list = (datas[1].data.product_list || []).map(function(value) {
|
|
|
value.goodsId = value.goods_list[0].goods_id;
|
|
|
|
|
|
if (value.cn_alphabet) {
|
|
|
value.cn_alphabet = productNameProcess(value.cn_alphabet);
|
|
|
}
|
|
|
|
|
|
// 商品url改版
|
|
|
value.url = helpers.urlFormat(`/product/${value.product_skn}.html`) + `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${value.product_skn}}}`; // eslint-disable-line
|
|
|
return value;
|
...
|
...
|
@@ -189,7 +180,6 @@ exports.index = (req, res, next) => { |
|
|
}
|
|
|
}
|
|
|
|
|
|
// console.log(options);
|
|
|
options.studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true);
|
|
|
res.render('student', options);
|
|
|
});
|
...
|
...
|
@@ -337,13 +327,6 @@ exports.verifystudent = (req, res, next) => { |
|
|
});
|
|
|
}
|
|
|
datas[1].data.product_list = (datas[1].data.product_list || []).map(function(value) {
|
|
|
value.goodsId = value.goods_list[0].goods_id;
|
|
|
value.product_id = value.product_id;
|
|
|
|
|
|
if (value.cn_alphabet) {
|
|
|
value.cn_alphabet = productNameProcess(value.cn_alphabet);
|
|
|
}
|
|
|
|
|
|
// 商品url改版
|
|
|
value.url = helpers.urlFormat(`/product/${value.product_skn}.html`) + `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${value.product_skn}}}`; // eslint-disable-line
|
|
|
return value;
|
...
|
...
|
|