Commit bcd29cc5 by 李伟康

fix(boutique): 修复接待页面SKU显示和活动数据处理问题

- 修复SKU组件显示条件的逻辑错误
- 移除调试用的console.log语句
- 添加活动数据长度检查避免空数据异常
- 优化CSS样式布局结构
1 parent 08fdb32b
...@@ -53,8 +53,9 @@ ...@@ -53,8 +53,9 @@
</template> </template>
<template v-else> <template v-else>
<view :class="['sku-box', isPreview ? 'preview' : '']"> <view :class="['sku-box', isPreview ? 'preview' : '']">
<sku-box :currentCar="currentCarId" :defaultTabId="tabId" :show="show && !showActivity && tabIndex != tabs.length - 1" <sku-box :currentCar="currentCarId" :defaultTabId="tabId"
@changePreView="changePreView" ref="sku" /> :show="show && !showActivity && (tabIndex != tabs.length - 1)" @changePreView="changePreView"
ref="sku" />
</view> </view>
</template> </template>
<view class="coupon-btn flex" v-if="!isPreview" @click="couponPopupRef.open(customerType, customerInfo)"> <view class="coupon-btn flex" v-if="!isPreview" @click="couponPopupRef.open(customerType, customerInfo)">
...@@ -156,7 +157,6 @@ export default { ...@@ -156,7 +157,6 @@ export default {
immediate: true, immediate: true,
async handler(newval) { async handler(newval) {
if (newval) { if (newval) {
console.log(this.activityData)
if (!this.activityData.length) { if (!this.activityData.length) {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo, { shopMerchantId } = userInfo,
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
merchantId: shopMerchantId merchantId: shopMerchantId
}) })
this.activityData = data this.activityData = data
this.currentItem = null if (data.length) this.currentItem = null
} }
this.isSelect = false this.isSelect = false
let index = 0 let index = 0
...@@ -239,7 +239,6 @@ export default { ...@@ -239,7 +239,6 @@ export default {
methods: { methods: {
changeCar(item) { changeCar(item) {
console.log(item)
if (this.change_disabled || this.currentCarId == item.carModelId) return uni.hideLoading() if (this.change_disabled || this.currentCarId == item.carModelId) return uni.hideLoading()
this.currentCarString = item.carModelName this.currentCarString = item.carModelName
this.currentCarId = item.carModelId this.currentCarId = item.carModelId
...@@ -642,6 +641,7 @@ export default { ...@@ -642,6 +641,7 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: -1; z-index: -1;
.icon { .icon {
width: 300rpx; width: 300rpx;
height: 236rpx; height: 236rpx;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!