...
|
...
|
@@ -53,12 +53,12 @@ |
|
|
</div>
|
|
|
|
|
|
<!-- 视频资源位 -->
|
|
|
<a
|
|
|
class="banner video-resource"
|
|
|
ref="videoResourceImg"
|
|
|
<a
|
|
|
class="banner video-resource"
|
|
|
ref="videoResourceImg"
|
|
|
v-if="videoResource.src">
|
|
|
<div
|
|
|
class="video-mask"
|
|
|
<div
|
|
|
class="video-mask"
|
|
|
@click="onVideoPlay"></div>
|
|
|
<VideoPlayer
|
|
|
ref="videoPlayer"
|
...
|
...
|
@@ -116,9 +116,10 @@ import stateShortCutsMixins from './mixins'; |
|
|
import trackingMixins from './tracking-mixins';
|
|
|
import DetailUseageTips from './components/detail-useage-tips';
|
|
|
|
|
|
import VideoPlayer from "@/components/video-player";
|
|
|
import VideoPlayer from '@/components/video-player';
|
|
|
|
|
|
const { mapActions, mapState } = createNamespacedHelpers('product');
|
|
|
const { mapActions: mapSecondActions } = createNamespacedHelpers('second');
|
|
|
|
|
|
export default {
|
|
|
name: 'ProductDetail',
|
...
|
...
|
@@ -355,6 +356,7 @@ export default { |
|
|
methods: {
|
|
|
...mapActions(['fetchProductInfo', 'fetchBrandTop', 'fetchFav', 'setupInitialProductInfo',
|
|
|
'toggleFav', 'updateTradeInfo', 'getSelectedTradeProduct', 'payment', 'resetSelectedSize']),
|
|
|
...mapSecondActions(['fetchStorageCount']),
|
|
|
historyBackGuard() {
|
|
|
for (let key of Object.keys(this.actionSheetCloseMap)) {
|
|
|
if (this[key]) {
|
...
|
...
|
@@ -622,8 +624,11 @@ export default { |
|
|
* 2.PRD_SKU:商品SKU;
|
|
|
* 3.PRD_SIZE:尺码;
|
|
|
* 新增字段:
|
|
|
* 4.ORD_TYPE:订单类型;1-出售,2-购买,3-求购,4-变现;
|
|
|
* 4.ORD_TYPE:订单类型;1-出售,2-购买,3-求购,4-变现, 5-二手
|
|
|
*/
|
|
|
|
|
|
const isSecond = tradeProduct.type === 'second';
|
|
|
|
|
|
this.$store.dispatch('reportYas', {
|
|
|
params: {
|
|
|
appop: 'XY_UFO_PRD_DT_BUY_SEL_C',
|
...
|
...
|
@@ -631,7 +636,7 @@ export default { |
|
|
PRD_ID: tradeProduct.productId,
|
|
|
PRD_SKU: tradeProduct.skup,
|
|
|
PRD_SIZE: tradeProduct.size_id,
|
|
|
ORD_TYPE: this.selectSizeConfig.type === 'buy' ? 2 : 1
|
|
|
ORD_TYPE: this.selectSizeConfig.type === 'buy' ? (isSecond ? 5 : 2) : 1
|
|
|
},
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -683,10 +688,35 @@ export default { |
|
|
|
|
|
this.showSizeSelectSheet = false;
|
|
|
|
|
|
this.$router.push({
|
|
|
name: this.selectSizeConfig.dest,
|
|
|
query: tradeProduct
|
|
|
});
|
|
|
if (isSecond) {
|
|
|
const { data: count } = await this.fetchStorageCount({ storageId: tradeProduct.storageId });
|
|
|
|
|
|
if (count === 1) {
|
|
|
// 跳转详情
|
|
|
this.$router.push({
|
|
|
name: 'SecondProductDetail',
|
|
|
params: {
|
|
|
skup: tradeProduct.skup
|
|
|
}
|
|
|
});
|
|
|
} else if (count > 1) {
|
|
|
// 跳转列表
|
|
|
this.$router.push({
|
|
|
name: 'SecondSellList',
|
|
|
params: {
|
|
|
id: tradeProduct.storageId,
|
|
|
},
|
|
|
query: {
|
|
|
pid: tradeProduct.productId
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
this.$router.push({
|
|
|
name: this.selectSizeConfig.dest,
|
|
|
query: tradeProduct
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
// 添加尺寸
|
...
|
...
|
@@ -815,10 +845,10 @@ export default { |
|
|
}, yasReportHandler);
|
|
|
},
|
|
|
onVideoPlay() {
|
|
|
this.$refs.videoPlayer.parentHandleclick()
|
|
|
this.$refs.videoPlayer.parentHandleclick();
|
|
|
}
|
|
|
},
|
|
|
|
|
|
|
|
|
};
|
|
|
</script>
|
|
|
|
...
|
...
|
|