Commit fcb60ece by 李伟康

fix(boutique): 修复商品展示组件数据获取和渲染问题

- 修复 GoodsBox 组件中活动数据获取逻辑
- 优化 Reception 组件中 goods-box 的显示条件控制
- 添加 sku 引用检查避免访问未定义对象
- 调整标签栏位置样式从 156rpx 到 160rpx
- 更新文字样式为 26rpx 字号和 #999EA8 颜色
1 parent d39f90e3
......@@ -85,13 +85,12 @@ export default {
},
methods: {
init() {
// this.setGoodsList(this.activityData[this.tabIndex].productList)
this.changeCar(this.currentCar)
},
changeCar(newval) {
this.goodsList = []
let { activityData, tabIndex } = this,
{ carSeriesList } = activityData[tabIndex],
let { activityData, tabIndex } = this
let carSeriesList = activityData[tabIndex].carSeriesList,
data = carSeriesList.find(e => e.carSeriesId == newval)
if (data) {
this.setGoodsList(data.productList)
......
......@@ -46,9 +46,9 @@
<view class="right-content">
<template v-if="showActivity">
<view class="sku-box">
<goods-box :currentCar="currentCarId" :activityData="activityData" :show="show"
@changePreView="changePreView" ref="goodsBox" :tabIndex="tabIndex"
@noActivity="noActivity = $event" />
<goods-box :currentCar="currentCarId" :activityData="activityData"
:show="show && [0, 1].includes(tabIndex)" @changePreView="changePreView" ref="goodsBox"
:tabIndex="tabIndex" @noActivity="noActivity = $event" />
</view>
</template>
<template v-else>
......@@ -313,7 +313,7 @@ export default {
this.$store.dispatch("setReceptionTrack", { key, value })
},
clearSkuState() {
this.$refs.sku.requested = false
if (this.$refs.sku) this.$refs.sku.requested = false
},
clearCanvas() {
this.$refs.receptionCanvas.clearBoard()
......@@ -569,7 +569,7 @@ export default {
.tabs-box {
position: absolute;
top: toRpx(156);
top: toRpx(160);
left: toRpx(80);
// width: toRpx(212);
height: toRpx(80);
......@@ -649,9 +649,9 @@ export default {
}
.text {
font-size: 24rpx;
font-size: 26rpx;
line-height: 28rpx;
color: #999;
color: #999EA8;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!