Commit b7956572 by Lin

Merge branch 'saas+v5.8.3' of http://192.168.3.233:8090/glsx/gl_tape into saas+v5.8.3

2 parents fe312452 1a4d6c96
...@@ -4,3 +4,5 @@ ...@@ -4,3 +4,5 @@
/.DS_Store /.DS_Store
/.hbuilderx /.hbuilderx
node_modules node_modules
assets/images/sprite.png
assets/css/sprite.scss
...@@ -54,8 +54,7 @@ ...@@ -54,8 +54,7 @@
<template v-else> <template v-else>
<view :class="['sku-box', isPreview ? 'preview' : '']"> <view :class="['sku-box', isPreview ? 'preview' : '']">
<sku-box :currentCar="currentCarId" :defaultTabId="tabId" <sku-box :currentCar="currentCarId" :defaultTabId="tabId"
:show="show && !showActivity && (tabIndex != tabs.length - 1)" @changePreView="changePreView" :show="show && (tabIndex != tabs.length - 1)" @changePreView="changePreView" ref="sku" />
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)">
...@@ -287,6 +286,7 @@ export default { ...@@ -287,6 +286,7 @@ export default {
this.isSelect = false this.isSelect = false
this.updateViewKey = Date.now() this.updateViewKey = Date.now()
this.clearCanvas() this.clearCanvas()
if (this.tabIndex == 0 && !this.$refs.sku && !this.hasBeforeActivity && !this.hasAfterActivity) this.changeTab(0, true, false)
}, },
changePreView(e, leave = true, clearBoard = true) { changePreView(e, leave = true, clearBoard = true) {
let { currentItem } = this, let { currentItem } = this,
...@@ -365,13 +365,15 @@ export default { ...@@ -365,13 +365,15 @@ export default {
let skuIndex = 0 let skuIndex = 0
if (this.hasBeforeActivity || this.hasAfterActivity) skuIndex = 1 if (this.hasBeforeActivity || this.hasAfterActivity) skuIndex = 1
if (this.hasBeforeActivity && this.hasAfterActivity) skuIndex = 2 if (this.hasBeforeActivity && this.hasAfterActivity) skuIndex = 2
if (this.tabIndex == skuIndex && this.currentItem.carModelName) this.previewLeave(this.currentItem) if (this.tabIndex == skuIndex && this.currentItem && this.currentItem.carModelName) this.previewLeave(this.currentItem)
let goods = this.$refs.goodsBox let goods = this.$refs.goodsBox
let skuRef = this.$refs.sku
this.tabIndex = index this.tabIndex = index
this.currentItem = null this.currentItem = null
this.tabListId = this.tabs[index].id this.tabListId = this.tabs[index].id
setTimeout(() => { setTimeout(() => {
if (changeCar && goods && [0, 1].includes(this.tabListId)) goods.changeCar(this.currentCarId) if (changeCar && goods && [0, 1].includes(this.tabListId)) goods.changeCar(this.currentCarId)
if (skuRef && skuIndex == index) skuRef.changeCar(this.currentCarId)
this.clearCanvas() this.clearCanvas()
}, 100) }, 100)
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!