Commit fe23f6a0 by 李伟康

commit 提交

1 parent 51f0e741
......@@ -75,15 +75,23 @@ export default {
},
carBrand () {
return this.$store.state.user.customerInfo.carBrand
},
boutiqueDefaultCarBrandId () {
return this.$store.state.user.boutiqueDefaultCarBrandId
}
},
mounted () {
},
methods: {
autoSelect (index = 0) {
const { carBrandList } = this
const { carBrandList, boutiqueDefaultCarBrandId } = this
let carIndex = 0
if (boutiqueDefaultCarBrandId) {
carIndex = carBrandList.findIndex(e => e.id == boutiqueDefaultCarBrandId)
if(carIndex < 0) carIndex = 0
}
if (index < 0) index = 0
if (carBrandList.length) this.selectCar(carBrandList[0], true, index)
if (carBrandList.length) this.selectCar(carBrandList[carIndex], true, index)
},
open () {
const userInfo = uni.$storage.get("userInfo"),
......
......@@ -167,7 +167,10 @@ export default {
this.setSecondList()
},
async setSecondList () {
let { list } = this.boutiqueMediaConfig[this.currentCar].find(e => e.tabId == this.tabId)
let secondList = this.boutiqueMediaConfig[this.currentCar],
index = secondList.findIndex(e => e.tabId == this.tabId)
if(index == -1) index = 0
let { list } = secondList[index]
this.secondList = list
this.secondClick(0, false)
},
......
......@@ -265,9 +265,10 @@ export default {
},
// 查询素材
async getSoure () {
let { moduleList, toolList } = await uni.$api.systemApi.getBoutiqueMockData(true)
let { moduleList, toolList, boutiqueDefaultCarBrandId } = await uni.$api.systemApi.getBoutiqueMockData(true)
this.moduleList = moduleList
this.toolList = toolList
this.$store.state.user.boutiqueDefaultCarBrandId = boutiqueDefaultCarBrandId
},
toDetail (item) {
this.chooseItem = item
......
......@@ -29,7 +29,8 @@ export default {
M7: [],
M9: []
},
receptionTrack: {} //接待记录埋点
receptionTrack: {}, //接待记录埋点
boutiqueDefaultCarBrandId: ''
};
},
mutations: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!