Commit fcb60ece by 李伟康

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

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