Commit 4e3f6fd6 by 李伟康

修复

1 parent 63fda8c7
...@@ -125,81 +125,67 @@ const getImageVersion = async () => { ...@@ -125,81 +125,67 @@ const getImageVersion = async () => {
return accountInfo?.version || Date.now() return accountInfo?.version || Date.now()
} }
/**获取素材配置 */ /**获取素材配置 */
const getSoureData = async (shopMerchantId, sceneType) => { const getSoureData = async (shopMerchantId, sceneType, params = {}) => {
try { try {
const { id } = await getEquityMaterialId({ const res = await getEquityMaterialId({
merchantId: shopMerchantId merchantId: shopMerchantId,
...params
}) })
if (id) { if (res && res.id) {
let data = await getEquityMaterialConfig({ let data = await getEquityMaterialConfig({
id id: res.id
}),
{ toolList, materialInfoList } = data,
storageName = `source_${sceneType}_${shopMerchantId}`
let moduleList = moduleList = await imgTransformBase64(materialInfoList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
data.moduleList = moduleList
uni.setStorageSync(storageName, {
moduleList,
toolList: data.toolList
}) })
return Promise.resolve(data) if (data) {
} let { toolList, materialInfoList } = data,
storageName = `source_${sceneType}_${shopMerchantId}`
if (params.brandId && params.subBrandId) storageName += `_${params.brandId}_${params.subBrandId}`
let hasEquity = materialInfoList.find(e => e.componentName == 'insurance')
if (hasEquity) {
let configList
try {
configList = await findReceptionpriproConfigList({})
uni.$storage.set('findReceptionpriproConfigList', configList)
} catch (error) {
configList = uni.$storage.get('findReceptionpriproConfigList')
}
const toolOtherList = configList.map(i => {
return {
id: hasEquity.id + 100 + i.id,
shortTitle: i.productName,
shortTitleUrl: i.procuctLog
}
})
toolList = toolList.concat(toolOtherList)
const moduleOtherList = configList.map(i => {
return {
id: hasEquity.id + 100 + i.id,
title: i.productName,
shortTitleUrl: i.procuctLog,
productPoster: i.productPoster,
showAlt: false,
componentName: 'CaseCenter',
receptionpriproCusCaseList: i.receptionpriproCusCaseList
}
})
materialInfoList = materialInfoList.concat(moduleOtherList)
}
data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
data.moduleList = await imgTransformBase64(materialInfoList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
uni.setStorageSync(storageName, {
moduleList: data.moduleList,
toolList: data.toolList
})
return Promise.resolve(data)
}
} else throw '该场景尚未配置素材,请联系总部人员'
} catch (error) { } catch (error) {
console.log(error) console.log(error)
uni.showToast({
title: error,
icon: 'none',
duration: 2000
})
} }
// return
// const getSoureData = async (channelType = 1, shopMerchantId, sceneType = 0) => {
// const sceneData = await http.uni_request({ url: appConfigUrl }),
// { brandIds, merchantIds, caseCenterIds } = sceneData[sceneType]
// let targetUrl,
// storageName = `source_${sceneType}_data_`
// if (merchantIds.hasOwnProperty(shopMerchantId)) {
// targetUrl = merchantIds[shopMerchantId]
// storageName += `merchantId_${shopMerchantId}`
// } else {
// targetUrl = brandIds[channelType]
// storageName += `channelType_${channelType}`
// }
// let data = await http.uni_request({ url: `${targetUrl}&env=${env}` }),
// { moduleList, toolList } = data
// /**全损无忧 */
// if (caseCenterIds.includes(channelType)) {
// let configList
// try {
// configList = await findReceptionpriproConfigList({})
// uni.$storage.set('findReceptionpriproConfigList', configList)
// } catch (error) {
// configList = uni.$storage.get('findReceptionpriproConfigList')
// }
// const toolOtherList = configList.map(i => {
// return {
// id: 10 + i.id,
// shortTitle: i.productName,
// shortTitleUrl: i.procuctLog
// }
// })
// toolList = toolList.concat(toolOtherList)
// const moduleOtherList = configList.map(i => {
// return {
// id: 10 + i.id,
// title: i.productName,
// shortTitleUrl: i.procuctLog,
// productPoster: i.productPoster,
// showAlt: false,
// componentName: 'CaseCenter',
// receptionpriproCusCaseList: i.receptionpriproCusCaseList
// }
// })
// moduleList = moduleList.concat(moduleOtherList)
// }
// data.moduleList = await imgTransformBase64(moduleList, ['thumbnail', 'receptionSourceDetailList', 'screenList'])
// data.toolList = await imgTransformBase64(toolList, ['shortTitleUrl'])
// uni.setStorageSync(storageName, {
// moduleList,
// toolList
// })
// return Promise.resolve(data)
} }
/**批量图片转base64 */ /**批量图片转base64 */
const imgTransformBase64 = async (imgList = [], keyList = []) => { const imgTransformBase64 = async (imgList = [], keyList = []) => {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
ref="carBoxVisible" ref="carBoxVisible"
position="bottom" position="bottom"
:isFooter="false" :isFooter="false"
title="请选择车型" title="请选择车系"
:maxHeight="1000" :maxHeight="1000"
back back
@close="closeCarBoxVisible" @close="closeCarBoxVisible"
...@@ -199,6 +199,7 @@ export default { ...@@ -199,6 +199,7 @@ export default {
this.$store.dispatch('setCustomerInfo', customerInfo) this.$store.dispatch('setCustomerInfo', customerInfo)
this.$refs.carBoxVisible?.close(); this.$refs.carBoxVisible?.close();
this.$store.dispatch('updateViewKey') this.$store.dispatch('updateViewKey')
this.$store.dispatch('setCurrentCarInfo', selectItem)
this.$emit('select', { this.$emit('select', {
...item, ...item,
...selectItem ...selectItem
......
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.scrollTop = 0 this.scrollTop = 0
}, 100); }, 100);
const { storageKey } = this, const storageKey = this.getStorageKey(),
insuranceList = uni.getStorageSync(storageKey) insuranceList = uni.getStorageSync(storageKey)
if (insuranceList) { if (insuranceList) {
insuranceList.map(e => e.cost = '') insuranceList.map(e => e.cost = '')
...@@ -160,10 +160,15 @@ export default { ...@@ -160,10 +160,15 @@ export default {
} }
}, },
mounted () { mounted () {
const { phone, shopMerchantId } = uni.$storage.get("userInfo") this.getStorageKey()
this.storageKey = `${shopMerchantId}_${phone}_insurance_list`
}, },
methods: { methods: {
getStorageKey () {
const { phone, shopMerchantId } = uni.$storage.get("userInfo"),
storageKey = `${shopMerchantId}_${phone}_insurance_list`
this.storageKey = storageKey
return storageKey
},
showRow (index) { showRow (index) {
let flag = true let flag = true
if (index == this.viewsTitle.length - 1 && !this.isPreview) flag = false if (index == this.viewsTitle.length - 1 && !this.isPreview) flag = false
......
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
* @LastEditTime: 2024-12-25 18:52:46 * @LastEditTime: 2024-12-25 18:52:46
--> -->
<template> <template>
<view <view class="detail-box">
class="detail-box"
>
<view <view
class="nav-bar" class="nav-bar"
:style="{ 'z-index': backZindex }" :style="{ 'z-index': backZindex }"
...@@ -24,7 +22,7 @@ ...@@ -24,7 +22,7 @@
></uni-icons> ></uni-icons>
</view> </view>
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in (useCarConfig ? moduleList :media)">
<view <view
:class="['view', { showView: id == item.id }, modeName]" :class="['view', { showView: id == item.id }, modeName]"
:key="index" :key="index"
...@@ -137,7 +135,9 @@ export default { ...@@ -137,7 +135,9 @@ export default {
showPayPage: false, showPayPage: false,
productModelStatus: false, productModelStatus: false,
modeName: '', modeName: '',
pageToolList: [] pageToolList: [],
moduleList: [],
useCarConfig: false
} }
}, },
computed: { computed: {
...@@ -145,6 +145,17 @@ export default { ...@@ -145,6 +145,17 @@ export default {
const { channelType } = uni.$storage.get('userInfo') const { channelType } = uni.$storage.get('userInfo')
return channelType return channelType
}, },
shopMerchantId () {
const { shopMerchantId } = uni.$storage.get('userInfo')
return shopMerchantId
},
sceneType () {
const { sceneType } = uni.$storage.get('userInfo')
return sceneType
},
currentCarInfo () {
return this.$store.state.user.currentCarInfo
},
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
...@@ -181,19 +192,21 @@ export default { ...@@ -181,19 +192,21 @@ export default {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
this.useCarConfig = false
if (newval) this.drawStatus = false if (newval) this.drawStatus = false
} }
}, },
viewKey: { viewKey: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
this.setPageToolList() if (this.id) this.setPageData()
} }
}, },
toolList: { toolList: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
this.setPageToolList() this.pageToolList = this.toolList
// this.setPageToolList()
} }
}, },
}, },
...@@ -290,14 +303,33 @@ export default { ...@@ -290,14 +303,33 @@ export default {
let { id } = this let { id } = this
this.scaleValueObject[id] = e this.scaleValueObject[id] = e
}, },
setPageToolList () { // setPageToolList () {
if (this.channelType == 1) { // if (this.channelType == 1) {
let { carModelId } = this.customerInfo // let { carModelId } = this.customerInfo
const isAito = this.aitoCarModelIds?.findIndex(e => e == carModelId) // const isAito = this.aitoCarModelIds?.findIndex(e => e == carModelId)
if (carModelId && isAito == -1) { // if (carModelId && 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
} else this.pageToolList = this.toolList // } else this.pageToolList = this.toolList
// },
async setPageData () {
const { shopMerchantId, sceneType, currentCarInfo } = this,
{ carBrandId, carChildsBrandId } = currentCarInfo,
params = {
brandId: carBrandId,
subBrandId: carChildsBrandId
}
let storageName = `source_${sceneType}_${shopMerchantId}_${carBrandId}_${carChildsBrandId}`
let data = uni.getStorageSync(storageName)
if (data) this.setViewInfo(data)
let requestData = await uni.$api.systemApi.getSoureData(shopMerchantId, sceneType, params)
if (requestData) this.setViewInfo(requestData)
},
setViewInfo (data) {
this.moduleList = data.moduleList
this.pageToolList = data.toolList
this.useCarConfig = true
} }
} }
} }
......
<template> <template>
<view> <view>
<home-frame @preview="preview" @start="start" ref="home" :id="id" @openStep="openStep" @backHome="backHome" @changeTab="changeTab"> <home-frame
<view class="module-box" slot="module"> @preview="preview"
@start="start"
ref="home"
:id="id"
@openStep="openStep"
@backHome="backHome"
@changeTab="changeTab"
>
<view
class="module-box"
slot="module"
>
<template v-for="(i, index) in moduleList"> <template v-for="(i, index) in moduleList">
<view :key="index" :class="['item landscape', i.class]" :style="i.style" @click="toDetail(i)" v-if="i.thumbnail"> <view
:key="index"
:class="['item landscape', i.class]"
:style="i.style"
@click="toDetail(i)"
v-if="i.thumbnail"
>
<template v-if="i.showAlt"> <template v-if="i.showAlt">
<view class="item-text flex">{{ i.title }}</view> <view class="item-text flex">{{ i.title }}</view>
</template> </template>
<template v-else> <template v-else>
<image class="item-img" :src="i.thumbnail" mode="scaleToFill" @error="errorImg(index)" /> <image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
@error="errorImg(index)"
/>
</template> </template>
</view> </view>
</template> </template>
</view> </view>
<template slot="detail"> <template slot="detail">
<detail :id.sync="id" :media="moduleList" :type.sync="type" :toolList="toolList" :aitoCarModelIds="aitoCarModelIds" @back="back" @done="done" ref="detail" /> <detail
:id.sync="id"
:media="moduleList"
:type.sync="type"
:toolList="toolList"
:aitoCarModelIds="aitoCarModelIds"
@back="back"
@done="done"
ref="detail"
/>
</template> </template>
<template slot="content"> <template slot="content">
<!-- <novice-guide <!-- <novice-guide
...@@ -42,7 +73,7 @@ import HomeFrame from '@/components/HomeFrame/index.vue' ...@@ -42,7 +73,7 @@ import HomeFrame from '@/components/HomeFrame/index.vue'
export default { export default {
// mixins: [storge], // mixins: [storge],
components: { HomeFrame, detail, NoviceGuide }, components: { HomeFrame, detail, NoviceGuide },
data() { data () {
return { return {
moduleList: [], moduleList: [],
toolList: [], toolList: [],
...@@ -55,20 +86,20 @@ export default { ...@@ -55,20 +86,20 @@ export default {
} }
}, },
computed: { computed: {
channelType() { channelType () {
const { channelType } = uni.$storage.get('userInfo') const { channelType } = uni.$storage.get('userInfo')
return channelType || 1 //默认问界 return channelType || 1 //默认问界
}, },
shopMerchantId() { shopMerchantId () {
const { shopMerchantId } = uni.$storage.get('userInfo') const { shopMerchantId } = uni.$storage.get('userInfo')
return shopMerchantId return shopMerchantId
}, },
sceneType() { sceneType () {
const { sceneType } = uni.$storage.get('userInfo') const { sceneType } = uni.$storage.get('userInfo')
return sceneType return sceneType
} }
}, },
onBackPress(options) { onBackPress (options) {
if (options.from === 'backbutton') { if (options.from === 'backbutton') {
// 物理返回按钮触发 // 物理返回按钮触发
// 阻止默认行为,即不执行页面返回 // 阻止默认行为,即不执行页面返回
...@@ -78,12 +109,11 @@ export default { ...@@ -78,12 +109,11 @@ export default {
// 其他情况允许正常返回 // 其他情况允许正常返回
return false return false
}, },
onLoad() { onLoad () {
uni.$api.systemApi.getMockData(true) //获取APP配置信息 uni.$api.systemApi.getMockData(true) //获取APP配置信息
this.getSoure()
this.get_Vehicle_Sales_Data() this.get_Vehicle_Sales_Data()
}, },
onShow() { onShow () {
const userInfo = uni.$storage.get('userInfo') const userInfo = uni.$storage.get('userInfo')
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) { if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm('userInfo') uni.$storage.rm('userInfo')
...@@ -97,70 +127,70 @@ export default { ...@@ -97,70 +127,70 @@ export default {
}, },
methods: { methods: {
...mapMutations('audio', ['setReceptionStatus']), ...mapMutations('audio', ['setReceptionStatus']),
init() { init () {
this.findPayInfo() this.findPayInfo()
}, },
/**获取车型&销售数据 */ /**获取车型&销售数据 */
get_Vehicle_Sales_Data() { get_Vehicle_Sales_Data () {
const userInfo = uni.$storage.get('userInfo'), const userInfo = uni.$storage.get('userInfo'),
storageCarBrandList = uni.$storage.get('carBrandList'), storageCarBrandList = uni.$storage.get('carBrandList'),
storageEmployeeList = uni.$storage.get('employeeList'), storageEmployeeList = uni.$storage.get('employeeList'),
{ shopMerchantId } = userInfo { shopMerchantId } = userInfo
if (storageCarBrandList) this.$store.dispatch('setCarBrandsList', storageCarBrandList) if (storageCarBrandList) this.$store.dispatch('setCarBrandsList', storageCarBrandList)
if (storageEmployeeList) this.$store.dispatch('setEmployeeList', storageEmployeeList) if (storageEmployeeList) this.$store.dispatch('setEmployeeList', storageEmployeeList)
/**获取销售人员 */
uni.$api.commonApi
.getEmployeeList({
merchantId: shopMerchantId
})
.then(res => {
this.$store.dispatch('setEmployeeList', res || [])
uni.$storage.set('employeeList', res || [])
})
/**获取品牌车型 */ /**获取品牌车型 */
uni.$api.commonApi.getMerchantCarBrandList([shopMerchantId]).then(({ data }) => { uni.$api.commonApi.getMerchantCarBrandList([shopMerchantId]).then(({ data }) => {
let list = data[0].carBrandList, let list = data[0].carBrandList,
carBrandList = [] carBrandList = [],
brandIdList = []
list?.map(e => { list?.map(e => {
e.childs.map(i => { e.childs.map(i => {
i.brandId = e.id i.brandId = e.id
carBrandList.push(i) carBrandList.push(i)
}) })
brandIdList.push(e.id)
}) })
this.getSoure(brandIdList)
this.$store.dispatch('setCarBrandsList', carBrandList) this.$store.dispatch('setCarBrandsList', carBrandList)
uni.$storage.set('carBrandList', carBrandList) uni.$storage.set('carBrandList', carBrandList)
if (carBrandList.length) { if (carBrandList.length) {
let index = 0 let index = 0
this.getCarBrandsList(carBrandList, index) this.getCarBrandsList(carBrandList, index)
} }
}) })
/**获取销售人员 */
uni.$api.commonApi.getEmployeeList({
merchantId: shopMerchantId
}).then(res => {
this.$store.dispatch('setEmployeeList', res || [])
uni.$storage.set('employeeList', res || [])
})
}, },
// 查询素材 // 查询素材
async getSoure(loadStorage = true) { async getSoure (brandIdList) {
const { channelType, shopMerchantId, sceneType } = this const { shopMerchantId, sceneType } = this
if (loadStorage) { let data = uni.getStorageSync(`source_${sceneType}_${shopMerchantId}`)
// let data = uni.getStorageSync(`source_${sceneType}_data_merchantId_${shopMerchantId}`) if (data) this.setViewInfo(data)
// if (!data) data = uni.getStorageSync(`source_${sceneType}_data_channelType_${channelType}`) let requestData = await uni.$api.systemApi.getSoureData(shopMerchantId, sceneType, {
let data = uni.getStorageSync(`source_${sceneType}_${shopMerchantId}`) brandIdList
if (!data) data = uni.getStorageSync(`source_${sceneType}_${channelType}`) })
if (data) this.setViewInfo(data) if (requestData) this.setViewInfo(requestData)
}
let requestData = await uni.$api.systemApi.getSoureData(shopMerchantId, sceneType)
console.log(requestData)
// let requestData = await uni.$api.systemApi.getSoureData(channelType, shopMerchantId, sceneType)
this.setViewInfo(requestData)
}, },
errorImg(index) { errorImg (index) {
this.moduleList[index].showAlt = true this.moduleList[index].showAlt = true
}, },
async start() { async start () {
if (!this.moduleList.length) return uni.showToast({
title: '该场景尚未配置素材,请联系总部人员',
icon: 'none'
})
if (this.recording) return if (this.recording) return
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
this.$refs.home.startAudio() this.$refs.home.startAudio()
this.getSoure(false)
this.clearHistory() this.clearHistory()
this.id = this.moduleList[0].id this.id = this.moduleList[0].id
this.type = 'edit' this.type = 'edit'
...@@ -169,14 +199,14 @@ export default { ...@@ -169,14 +199,14 @@ export default {
uni.hideLoading() uni.hideLoading()
}, 1e3) }, 1e3)
}, },
toDetail(item) { toDetail (item) {
this.chooseItem = item this.chooseItem = item
this.$refs.home.previewRef.open() this.$refs.home.previewRef.open()
}, },
cancel() { cancel () {
this.$refs.home.previewRef.close() this.$refs.home.previewRef.close()
}, },
preview() { preview () {
let { id, title } = this.chooseItem let { id, title } = this.chooseItem
this.type = 'preview' this.type = 'preview'
this.id = id this.id = id
...@@ -184,7 +214,7 @@ export default { ...@@ -184,7 +214,7 @@ export default {
this.cancel() this.cancel()
}, },
// 完成接待 // 完成接待
done(e) { done (e) {
this.$refs.home.finishRef.close() this.$refs.home.finishRef.close()
if (this.recording) this.$refs.home.stopAudio() if (this.recording) this.$refs.home.stopAudio()
this.recording = false this.recording = false
...@@ -196,14 +226,14 @@ export default { ...@@ -196,14 +226,14 @@ export default {
this.$store.dispatch('clearReceptionTrack') this.$store.dispatch('clearReceptionTrack')
}, 1500) }, 1500)
}, },
back() { back () {
const detailRef = this.$refs.detail const detailRef = this.$refs.detail
if (detailRef.showPayPage) return (detailRef.showPayPage = false) if (detailRef.showPayPage) return (detailRef.showPayPage = false)
if (!this.id) return uni.navigateBack() if (!this.id) return uni.navigateBack()
if (this.type != 'preview') return this.$refs.home.finishRef.open() if (this.type != 'preview') return this.$refs.home.finishRef.open()
this.backHome() this.backHome()
}, },
backHome() { backHome () {
if (this.recording) this.$refs.home.stopAudio(true) if (this.recording) this.$refs.home.stopAudio(true)
this.$refs.home.finishRef.close() this.$refs.home.finishRef.close()
this.id = '' this.id = ''
...@@ -213,23 +243,23 @@ export default { ...@@ -213,23 +243,23 @@ export default {
this.recording = false this.recording = false
this.$refs.home.$refs.leftBox.getMessageInfo() this.$refs.home.$refs.leftBox.getMessageInfo()
}, },
nextStep() { nextStep () {
let { id } = this.moduleList[0] let { id } = this.moduleList[0]
this.type = 'preview' this.type = 'preview'
this.id = id this.id = id
}, },
clearHistory() { clearHistory () {
this.$store.dispatch('clearCustomerInfo') this.$store.dispatch('clearCustomerInfo')
this.$store.dispatch('clearHistory') this.$store.dispatch('clearHistory')
this.$refs.home.setBooks([]) this.$refs.home.setBooks([])
this.$store.dispatch('clearReceptionTrack') this.$store.dispatch('clearReceptionTrack')
}, },
openStep() { openStep () {
this.$refs.home.finishRef.close() this.$refs.home.finishRef.close()
this.$refs.detail.open() this.$refs.detail.open()
}, },
// 查询门店支付配置 // 查询门店支付配置
async findPayInfo() { async findPayInfo () {
const { shopMerchantId } = uni.$storage.get('userInfo') const { shopMerchantId } = uni.$storage.get('userInfo')
const data = await uni.$api.commonApi.findPayInfo({ const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId merchantId: shopMerchantId
...@@ -253,13 +283,13 @@ export default { ...@@ -253,13 +283,13 @@ export default {
}) })
this.$store.dispatch('setPaymentType', paymentType) this.$store.dispatch('setPaymentType', paymentType)
}, },
changeTab(index) { changeTab (index) {
this.tabIndex = index this.tabIndex = index
if (index == 0) this.init() if (index == 0) this.init()
}, },
/**按序加载车型 */ /**按序加载车型 */
async getCarBrandsList(carBrandList, index) { async getCarBrandsList (carBrandList, index) {
const item = carBrandList[index] const item = carBrandList[index]
if (!item) return if (!item) return
const carList = uni.getStorageSync(`${item.id}_${item.brandId}_carlist`) const carList = uni.getStorageSync(`${item.id}_${item.brandId}_carlist`)
...@@ -276,31 +306,11 @@ export default { ...@@ -276,31 +306,11 @@ export default {
} }
}, },
/**素材内容 */ /**素材内容 */
setViewInfo(data) { setViewInfo (data) {
let { moduleList, toolList, aitoCarModelIds } = data let { moduleList, toolList, aitoCarModelIds } = data
if (this.channelType == 1) this.aitoCarModelIds = aitoCarModelIds || [] if (this.channelType == 1) this.aitoCarModelIds = aitoCarModelIds || []
this.moduleList = moduleList this.moduleList = moduleList
// if (this.moduleList) {
// this.moduleList.push({
// id: 333,
// thumbnail: 'https://img02.glsx.com.cn/weapp/resource/app-tape/home/byd-home-3.webp',
// title: '汽车保险告知书',
// class: 'vertical',
// style: 'width: calc(100vw * (712 / 2346));height: calc(100vmin * (1173 / 768) * (624 / 2346));',
// showAlt: false,
// componentName: 'insurance',
// detailTitle: '汽车保险告知书'
// })
// }
this.toolList = toolList this.toolList = toolList
// if (this.toolList) {
// this.toolList.push({
// id: 333,
// shortTitle: '车险告知书',
// shortTitleUrl: 'https://img02.glsx.com.cn/weapp/resource/app-tape/tool/default/5.png',
// title: '汽车保险告知书'
// })
// }
this.$store.state.user = { this.$store.state.user = {
...this.$store.state.user, ...this.$store.state.user,
...data ...data
......
...@@ -36,6 +36,7 @@ export default { ...@@ -36,6 +36,7 @@ export default {
receptionKey:Date.now(), //接待记录埋点KEY receptionKey:Date.now(), //接待记录埋点KEY
defaultCarId:'', defaultCarId:'',
customerKey:Date.now(), //客户信息KEY customerKey:Date.now(), //客户信息KEY
currentCarInfo:{},//当前选中的车品牌车系
}; };
}, },
mutations: { mutations: {
...@@ -48,6 +49,9 @@ export default { ...@@ -48,6 +49,9 @@ export default {
state.customerInfo = data state.customerInfo = data
state.customerKey = Date.now() state.customerKey = Date.now()
}, },
setCurrentCarInfo (state, data = {}) {
state.currentCarInfo = data;
},
clearCustomerInfo (state) { clearCustomerInfo (state) {
const info = { const info = {
customerName: "", customerName: "",
...@@ -97,6 +101,9 @@ export default { ...@@ -97,6 +101,9 @@ export default {
updateViewKey({ state }){ updateViewKey({ state }){
state.viewKey = Date.now(); state.viewKey = Date.now();
} },
setCurrentCarInfo ({ commit }, value) {
commit("setCurrentCarInfo", value);
},
}, },
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!