【优化】新版分类中心onShow调整为onLoad,防止出现tab切换导致数据不断附加的问题。

This commit is contained in:
大灰灰
2022-09-28 21:15:35 +08:00
parent a0fedba7bb
commit 5efd1dea26

View File

@@ -162,6 +162,7 @@
skuMode: 1, skuMode: 1,
// 后端返回的商品信息 // 后端返回的商品信息
goodsSkuInfo: {}, goodsSkuInfo: {},
} }
}, },
computed: { computed: {
@@ -189,7 +190,7 @@
return this.$store.state.config.cateStyle ? this.$store.state.config.cateStyle : 3; return this.$store.state.config.cateStyle ? this.$store.state.config.cateStyle : 3;
} }
}, },
onShow() { onLoad() {
uni.getSystemInfo({ uni.getSystemInfo({
success: (e) => { success: (e) => {
// #ifndef MP // #ifndef MP
@@ -286,7 +287,7 @@
//console.log("监听 - 关闭sku组件"); //console.log("监听 - 关闭sku组件");
}, },
showGoodSkuModal(item) { showGoodSkuModal(item) {
console.log(item); //console.log(item);
if (item.id) { if (item.id) {
this.getGoodsDetail(item.id); this.getGoodsDetail(item.id);
} }