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