...
|
...
|
@@ -73,6 +73,11 @@ |
|
|
|
|
|
<img class="ref-img" v-lazy="prdDetailImage"/>
|
|
|
|
|
|
<!--尺码图片-->
|
|
|
<size-image :brand-id="brandId" :product-id="productId"></size-image>
|
|
|
<!--九宫格社区图-->
|
|
|
<GrassArtilces :productId="productId" :listdata="articleData"></GrassArtilces>
|
|
|
|
|
|
<div class="recommend" v-if="recommend"><h2>相关推荐</h2>
|
|
|
<product-list ref="recommendList" :list="recommend" priceKey="price" :yas-params="recommendYasParams"/>
|
|
|
</div>
|
...
|
...
|
@@ -95,7 +100,7 @@ |
|
|
@hide="onSizeSelectSheetHide"
|
|
|
@select="onSelectTradeProduct"
|
|
|
@add="onRequestSize"/>
|
|
|
<detail-useage-tips></detail-useage-tips>
|
|
|
<!-- <detail-useage-tips></detail-useage-tips>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
...
|
...
|
@@ -118,9 +123,11 @@ import TopList from './components/top-list'; |
|
|
import SquareImg from './components/square-img';
|
|
|
import stateShortCutsMixins from './mixins';
|
|
|
import trackingMixins from './tracking-mixins';
|
|
|
import DetailUseageTips from './components/detail-useage-tips';
|
|
|
// import DetailUseageTips from './components/detail-useage-tips';
|
|
|
|
|
|
import VideoPlayer from '@/components/video-player';
|
|
|
import GrassArtilces from './components/grass-artilces';
|
|
|
import SizeImage from './components/size-image'; // 商品尺码图片
|
|
|
|
|
|
const { mapActions, mapState } = createNamespacedHelpers('product');
|
|
|
const { mapActions: mapSecondActions } = createNamespacedHelpers('second');
|
...
|
...
|
@@ -129,7 +136,9 @@ export default { |
|
|
name: 'ProductDetail',
|
|
|
mixins: [stateShortCutsMixins, trackingMixins],
|
|
|
components: {
|
|
|
DetailUseageTips,
|
|
|
SizeImage,
|
|
|
GrassArtilces,
|
|
|
// DetailUseageTips,
|
|
|
SizeSelectSheet,
|
|
|
ActivityListSheet,
|
|
|
SizeRequestSheet,
|
...
|
...
|
@@ -180,6 +189,7 @@ export default { |
|
|
POS_ID: 2,
|
|
|
},
|
|
|
recommendYasIndex: 0, // 推荐商品爆光顺序
|
|
|
articleData: {}, // 9宫格推荐文章
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -237,6 +247,11 @@ export default { |
|
|
}
|
|
|
|
|
|
return Math.min(...price);
|
|
|
},
|
|
|
brandId() {
|
|
|
let brandId = this.productDetail.brandId || 0;
|
|
|
|
|
|
return brandId;
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
...
|
...
|
@@ -311,6 +326,15 @@ export default { |
|
|
});
|
|
|
}
|
|
|
|
|
|
// 获取社区内容9宫格图片
|
|
|
this.fecthGrassAricles({
|
|
|
productSkn: this.productId
|
|
|
}).then(result => {
|
|
|
if (result && result.code === 200 && result.data && result.data.list && result.data.list.length > 2) {
|
|
|
this.articleData = result.data;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// yas
|
|
|
/**
|
|
|
* 商品详情页打开时
|
...
|
...
|
@@ -379,7 +403,7 @@ export default { |
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['fetchProductInfo', 'fetchBrandTop', 'fetchFav', 'setupInitialProductInfo',
|
|
|
'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment', 'resetSelectedSize']),
|
|
|
'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment', 'resetSelectedSize', 'fecthGrassAricles']),
|
|
|
...mapSecondActions(['fetchStorageCount']),
|
|
|
historyBackGuard() {
|
|
|
for (let key of Object.keys(this.actionSheetCloseMap)) {
|
...
|
...
|
|