# Conflicts:
#	pages/product/goods.vue
This commit is contained in:
mabo
2021-07-02 15:49:24 +08:00
10 changed files with 183 additions and 109 deletions

View File

@@ -327,7 +327,7 @@ export default {
header: {
top: 0,
height: 50,
},
},
goodsParams: [], // 商品参数
headerFlag: false, //顶部导航显示与否
headerList: [
@@ -400,9 +400,9 @@ export default {
return {
title: this.goodsDetail.goodsName,
type: 0,
query:`id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`,
query: `id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`,
path: `/pages/product/goods`,
imageUrl:this.goodsDetail.goodsGalleryList[0],
imageUrl: this.goodsDetail.goodsGalleryList[0],
};
},
// #endif
@@ -471,7 +471,7 @@ export default {
this.init(data[0], data[1], data[2]);
}
});
} else {
} else {
this.init(
this.routerVal.id,
this.routerVal.goodsId,
@@ -500,13 +500,14 @@ export default {
return true;
}
},
selectSku (idObj) { // 选择sku的回调
this.init(idObj.skuId,idObj.goodsId)
},
selectSku(idObj) {
this.init(idObj.skuId, idObj.goodsId);
},
/**
* 初始化信息
*/
async init(id, goodsId, distributionId) {
async init(id, goodsId, distributionId) {
console.log(id, goodsId);
this.isGroup = false; //初始化拼团
this.productId = id; // skuId
// 这里请求获取到页面数据 解析数据
@@ -532,7 +533,7 @@ export default {
/**商品信息以及规格信息存储 */
this.goodsDetail = response.data.result.data;
this.goodsSpec = response.data.result.specs;
this.PromotionList = response.data.result.promotionMap;
this.PromotionList = response.data.result.promotionMap;
this.goodsParams = response.data.result.goodsParamsDTOList || []
// 判断是否拼团活动或者积分商品 如果有则显示拼团活动信息