Authored by hongweigao

修改详情页链接

... ... @@ -90,8 +90,7 @@ const _handelPaymentInfo = (d) => {
_.forEach(d.goods_list, g => {
// link to goods
g.linkToGoods = helper.urlFormat(`/product/pro_${g.product_id}_${g.goods_id}/${g.cn_alphabet}.html`,
'', 'item');
g.linkToGoods = helper.getUrlBySkc(g.product_id, g.goods_id, g.cn_alphabet);
});
resData.goodsList = d.goods_list;
... ...
... ... @@ -41,8 +41,7 @@ const index = (skn, limit) => {
market_price: mp === sp ? '' : ${helper.round(mp, 2)}`,
price: ${helper.round(sp, 2)}`,
product_name: hp.product_name,
url: helper.urlFormat(
`/product/pro_${hp.product_id}_${defaultGoods.goods_id}/${hp.cn_alphabet}.html`, null, 'item'),
url: helper.getUrlBySkc(hp.product_id, defaultGoods.goods_id, hp.cn_alphabet),
pic_url: helper.image(defaultGoods.images_url, 280, 382, 2, 70)
});
});
... ...
... ... @@ -30,8 +30,7 @@ const EXCHANGE_URI = '/home/returns/exchangeDetail';
const getProductUrlBySkc = (pid, gid, cnAlphabet) => {
cnAlphabet = cnAlphabet || 'cnalphabet';
return helpers.urlFormat(`/product/pro_${pid}_${gid}/${cnAlphabet}.html`,
{}, 'item');
return helpers.getUrlBySkc(pid, gid, cnAlphabet);
};
const setDetailGoods = (list) => {
... ...
... ... @@ -1635,7 +1635,7 @@ const recommendAsync = (skn, page, limit) => {
}
const formatPrice = p => ${p}`;
const productUrl = (pid, gid, cn) => helpers.urlFormat(`/product/pro_${pid}_${gid}/${cn}.html`, null, 'item');
const productUrl = (pid, gid, cn) => helpers.getUrlBySkc(pid, gid, cn);
const productImageUrl = Fn.pipe(Fn.prop('default_images'), _.partial(helpers.image, _, 280, 382, 2, 70));
let products = _.get(recommendData, 'data.product_list', []).map((rp) => {
... ...
... ... @@ -195,7 +195,7 @@ const _proListHandler = (data, params) => {
_.forEach(pro.data, subData => {
tags.push({
url: helpers.urlFormat('', {sort: subData.relationParameter}),
url: helpers.urlFormat('', {sort: subData.relationParameter}, 'list'),
name: subData.categoryName
});
});
... ... @@ -256,8 +256,7 @@ const _proListHandler = (data, params) => {
defaultGoods = pro.goods_list[0];
}
proObj = {
url: helpers.urlFormat(
`/product/pro_${pro.product_id}_${defaultGoods.goods_id}/${pro.cn_alphabet}.html`, null, 'item'),
url: helpers.getUrlBySkc(pro.product_id, defaultGoods.goods_id, pro.cn_alphabet),
src: pro.default_images,
proName: pro.product_name,
salesPrice: pro.sales_price
... ...