...
|
...
|
@@ -79,7 +79,6 @@ Page(Object.assign({ |
|
|
]
|
|
|
},
|
|
|
|
|
|
shopRecList: [],
|
|
|
preferList: [],
|
|
|
|
|
|
showMenu: false,
|
...
|
...
|
@@ -200,37 +199,6 @@ Page(Object.assign({ |
|
|
showSnapshootShare: false
|
|
|
});
|
|
|
},
|
|
|
shopRecList: function() {
|
|
|
detailModel.shopRecommend({
|
|
|
page: 1,
|
|
|
limit: 20,
|
|
|
shopId: app.getShopId(),
|
|
|
product_skn: this.data.productSkn
|
|
|
}).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
const keyAdapter = {
|
|
|
skn: 'product_skn',
|
|
|
salesPrice: 'sales_price',
|
|
|
marketPrice: 'market_price',
|
|
|
productName: 'product_name',
|
|
|
defaultImages: 'default_images'
|
|
|
};
|
|
|
let list = [];
|
|
|
|
|
|
(res.data.product_list || []).forEach(product => {
|
|
|
let item = {};
|
|
|
|
|
|
Object.keys(keyAdapter).forEach(key => {
|
|
|
item[key] = product[keyAdapter[key]];
|
|
|
});
|
|
|
list.push(item);
|
|
|
});
|
|
|
this.setData({
|
|
|
shopRecList: list
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
preferList: function() {
|
|
|
detailModel.preference({
|
|
|
page: 1,
|
...
|
...
|
@@ -357,8 +325,6 @@ Page(Object.assign({ |
|
|
productNotForSale: res.data.attribute === 2,
|
|
|
showBottomTipView: true
|
|
|
});
|
|
|
|
|
|
this.shopRecList(res.data.shop_id);
|
|
|
}
|
|
|
});
|
|
|
},
|
...
|
...
|
|