...
|
...
|
@@ -10,10 +10,8 @@ const _getProductBySkns = function(productObj) { |
|
|
productObj.defaultPros = [];
|
|
|
if (result && result.data && result.data.product_list && result.code === 200) {
|
|
|
result.data.product_list.forEach(function(val) {
|
|
|
var goods_id = Array.isArray(val.goods_list) &&
|
|
|
val.goods_list.length ? val.goods_list[0].goods_id : null;
|
|
|
var obj = {
|
|
|
producturl: `//m.yohobuy.com/product/pro_${val.product_id}_${goods_id}/${val.cn_alphabet}.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${val.product_skn}}}`, // eslint-disable-line
|
|
|
producturl: `//m.yohobuy.com/product/${val.product_skn}.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":${val.product_skn}}}`, // eslint-disable-line
|
|
|
productimg: helpers.image(val.default_images, 213, 284, 2, 60).replace('quality/80', 'quality/60'),
|
|
|
productname: val.product_name,
|
|
|
vipprice: val.vip_price,
|
...
|
...
|
@@ -47,12 +45,14 @@ module.exports = { |
|
|
if (params.type === 'preview') { // 开发/预览模式
|
|
|
data = yield api.get('', {
|
|
|
method: 'app.activity.template.ignoreCache',
|
|
|
activity_id: params.code
|
|
|
activity_id: params.code,
|
|
|
user_id: params.user_id
|
|
|
});
|
|
|
} else {
|
|
|
data = yield api.get('', { // 生产模式
|
|
|
method: 'app.activity.template',
|
|
|
activity_id: params.code
|
|
|
activity_id: params.code,
|
|
|
user_id: params.user_id
|
|
|
}, {
|
|
|
cache: true
|
|
|
});
|
...
|
...
|
@@ -67,6 +67,14 @@ module.exports = { |
|
|
f.component[0].type === 'productGroup' && f.component[0].defaultSkns) {
|
|
|
sknsArr.push(_getProductBySkns(f.component[0]));
|
|
|
}
|
|
|
|
|
|
if (f.component && f.component[0] &&
|
|
|
f.component[0].type === 'productGroup' && f.component[0].favourite_prds_enable === '1') {
|
|
|
f.component[0].searchCondition = Object.assign({
|
|
|
maybeLike: '1',
|
|
|
limit: '12'
|
|
|
}, f.component[0].searchCondition || {});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|