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