|
|
'use strict';
|
|
|
|
|
|
const productNameProcess = require(`${utils}/product-name-process`);
|
|
|
const serviceApi = global.yoho.ServiceAPI;
|
|
|
const api = global.yoho.API;
|
|
|
const helpers = global.yoho.helpers;
|
...
|
...
|
@@ -224,6 +226,11 @@ exports.index = (req, res, next) => { |
|
|
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);
|
|
|
}
|
|
|
|
|
|
value.url = helpers.urlFormat(`/product/pro_${value.product_id}_${value.goodsId}/${value.cn_alphabet}.html`) + `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${value.product_skn}}}`;
|
|
|
return value;
|
|
|
});
|
...
|
...
|
@@ -368,6 +375,11 @@ 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);
|
|
|
}
|
|
|
|
|
|
value.url = helpers.urlFormat(`/product/pro_${value.product_id}_${value.goodsId}/${value.cn_alphabet}.html`) + `?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${value.product_skn}}}`;
|
|
|
return value;
|
|
|
});
|
...
|
...
|
|