Commit cda111e2 by 李伟康

commit 提交

1 parent 44550f94
...@@ -32,15 +32,27 @@ export default { ...@@ -32,15 +32,27 @@ export default {
}, },
watch: { watch: {
watchStatus: { watchStatus: {
},
watchCarModel: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
let index = {
'问界M5': 0,
'问界M7': 1,
'问界M9': 2
}[newval]
return this.viewIndex = index || 0
}
} }
},
}, },
computed: { computed: {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
watchCarModel () {
return this.$store.state.user.customerInfo.carModel
}
}, },
mounted () { mounted () {
}, },
......
...@@ -120,22 +120,14 @@ export default { ...@@ -120,22 +120,14 @@ export default {
}, },
// 查询素材 // 查询素材
async getSoure () { async getSoure () {
try {
uni.showLoading({
mask: true
})
let { moduleList, toolList } = await uni.$api.systemApi.getMockData(); let { moduleList, toolList } = await uni.$api.systemApi.getMockData();
await moduleList.map(async e => { await moduleList.map(async e => {
if (e.receptionSourceDetailList) e.receptionSourceDetailList = await uni.$api.systemApi.imgToBase64(e.receptionSourceDetailList, 'detailUrl') if (e.receptionSourceDetailList) e.receptionSourceDetailList = await uni.$api.systemApi.imgToBase64(e.receptionSourceDetailList, 'detailUrl')
if (e.carTypeList) e.carTypeList = await uni.$api.systemApi.imgToBase64(e.carTypeList) if (e.carTypeList) e.carTypeList = await uni.$api.systemApi.imgToBase64(e.carTypeList)
}) })
uni.hideLoading()
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList this.toolList = toolList
uni.$api.systemApi.updateMockData(moduleList, 'moduleList') uni.$api.systemApi.updateMockData(moduleList, 'moduleList')
} catch (error) {
uni.hideLoading()
}
}, },
errorImg (index) { errorImg (index) {
this.moduleList[index].showAlt = true this.moduleList[index].showAlt = true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!