Commit fe23f6a0 by 李伟康

commit 提交

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