Commit b107158c by 李伟康

commit 提交

1 parent 0b6e387d
No preview for this file type
No preview for this file type
......@@ -195,6 +195,7 @@ export default {
customerInfo.carBrand = selectItem.carChildsBrandName
this.$store.dispatch('setCustomerInfo', customerInfo)
this.$refs.carBoxVisible?.close();
this.$store.dispatch('updateViewKey')
this.$emit('select', {
...item,
...selectItem
......
......@@ -160,6 +160,7 @@ export default {
} else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
this.customerInfo.carModelId = item.id
}
this.resetFocusIndex()
this.$store.dispatch('setCustomerInfo', this.customerInfo)
......
......@@ -180,12 +180,6 @@ export default {
this.scrollTop = 0
}, 100)
},
watchCustomerInfo: {
immediate: true,
handler (newval) {
if (newval) this.customerInfo = newval
}
},
}
},
computed: {
......@@ -202,6 +196,7 @@ export default {
methods: {
init () {
this.customerInfo = this.watchCustomerInfo
if (!this.customerInfo.carModel && !this.isByd) this.$refs.carBrandListVisible.autoSelect()
else this.search()
},
......
......@@ -16,6 +16,7 @@
/>
<template v-if="hasCarBrand">
<image
:key="viewKey"
class="content"
:src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')"
/>
......@@ -63,6 +64,9 @@ export default {
customerInfo () {
return this.$store.state.user.customerInfo
},
viewKey(){
return this.$store.state.user.viewKey
}
},
mounted () {
},
......
......@@ -11,7 +11,7 @@
</view>
<car-brands
ref="carBrandListVisible"
@select="handleSelect($event,'carBrandListVisible')"
@select="handleSelect($event)"
/>
</view>
</template>
......@@ -61,8 +61,7 @@ export default {
mounted () {
},
methods: {
handleSelect (item, popkey) {
this.$refs[popkey].close()
handleSelect (item) {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
this.customerInfo.carModelId = item.id
......
......@@ -71,6 +71,10 @@
class="content-image"
:src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')"
/>
<image
class="content-bg"
:src="receptionBg(customerInfo.carModelId)"
/>
</template>
</view>
</view>
......@@ -95,6 +99,7 @@ export default {
title: String,
views: [Array, Object],
isByd: Boolean,
aitoCarModelIds: Array
},
name: 'Reception',
data () {
......@@ -180,6 +185,12 @@ export default {
carModel: e.brandModel
}
this.inputCustomer()
},
receptionBg (carModelId) {
const isAito = this.aitoCarModelIds.findIndex(e => e == carModelId)
let bgUrl = require('@/assets/images/common/aito-bg.webp')
if (isAito == -1) bgUrl = require('@/assets/images/common/zj-xj-bg.webp')
return bgUrl
}
}
}
......@@ -284,7 +295,7 @@ export default {
height: 100%;
z-index: 1;
}
.bg {
&-bg {
width: 100vw;
height: 100vh;
position: fixed;
......@@ -296,7 +307,4 @@ export default {
.byd-layout {
background-image: url('@/assets/images/media/byd-reception-bg.webp') !important;
}
.aito-layout {
background-image: url('@/assets/images/media/reception-bg.webp');
}
</style>
......@@ -49,6 +49,7 @@
:isPreview="isPreview"
:isByd="isByd"
:hasCarBrand="item.hasCarBrand"
:aitoCarModelIds="aitoCarModelIds"
/>
</view>
</template>
......@@ -170,9 +171,12 @@ export default {
isPreview () {
return this.type == 'preview'
},
CarModelId () {
return this.$store.state.user.customerInfo.carModelId
customerInfo () {
return this.$store.state.user.customerInfo
},
viewKey(){
return this.$store.state.user.viewKey
}
},
watch: {
watchStatus: {
......@@ -181,11 +185,12 @@ export default {
if (newval) this.drawStatus = false
}
},
CarModelId: {
viewKey: {
immediate: true,
handler (newval) {
if (this.channelType == 1) {
const isAito = this.aitoCarModelIds.findIndex(e => e == newval)
let { carModelId } = this.customerInfo
const isAito = this.aitoCarModelIds.findIndex(e => e == carModelId)
if (isAito == -1) {
this.pageToolList = this.toolList.filter(e => !e.isAito)
} else this.pageToolList = this.toolList
......
......@@ -240,7 +240,6 @@ export default {
['moduleList', 'toolList']
)
this.$store.state.user.boutiqueDefaultCarBrandId = boutiqueDefaultCarBrandId
console.log(moduleList, toolList, 999)
this.setViewInfo(moduleList, toolList)
}
}
......@@ -254,9 +253,9 @@ export default {
uni.showLoading({
mask: true
})
this.$refs.home.startAudio()
this.getSoure()
this.clearHistory()
this.$refs.home.startAudio()
this.id = this.moduleList[0].id
this.type = 'edit'
this.recording = true
......
......@@ -7,6 +7,7 @@
*/
// import { setToken, getToken, removeToken } from '@/utils/token';;
export default {
state () {
return {
......@@ -17,7 +18,8 @@ export default {
phoneNumber: "",
salesUuid: "",
staffName: "",
newCarFare: ''
newCarFare: '',
carModelId: ''
},
historyStatus: Date.now(),
carBrands: [],
......@@ -30,7 +32,8 @@ export default {
M9: []
},
receptionTrack: {}, //接待记录埋点
boutiqueDefaultCarBrandId: ''
boutiqueDefaultCarBrandId: '',
viewKey: Date.now()
};
},
mutations: {
......@@ -85,5 +88,9 @@ export default {
clearReceptionTrack ({ state }) {
state.receptionTrack = {}
},
updateViewKey({ state }){
state.viewKey = Date.now();
}
},
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!