Fix:2697 【地标好物】扫二维码需要直接进入相应的省份

This commit is contained in:
linxi
2024-11-27 10:54:48 +08:00
parent a302f11b95
commit 8d29cb777f
+11 -3
View File
@@ -117,7 +117,8 @@ export default {
goods: [], goods: [],
isCompleteLoadGood: false, isCompleteLoadGood: false,
pageKeyId: Object.freeze('landmarkGoodsIndex'), pageKeyId: Object.freeze('landmarkGoodsIndex'),
posterImageStatus: false posterImageStatus: false,
sceneId: null
} }
}, },
computed: { computed: {
@@ -126,8 +127,11 @@ export default {
} }
}, },
onLoad(opts) { onLoad(opts) {
if(opts && opts.id) { console.log('进入地标页');
this.navIndex = navList.map(e => +e.id).indexOf(+opts.id) console.log(opts, '地标opts');
if(opts && opts.scene) {
console.log(opts.scene, 'opts.scene');
this.sceneId = decodeURIComponent(opts.scene).split('&')[0].split('=')[1]
} }
this.getNavList() this.getNavList()
}, },
@@ -151,6 +155,10 @@ export default {
getNavList() { getNavList() {
getProvinceList().then(({data}) => { getProvinceList().then(({data}) => {
this.navList = data this.navList = data
if(this.sceneId) {
this.navIndex = this.navList.map(e => +e.id).indexOf(+this.sceneId)
console.log(this.navIndex, 'navIndex');
}
this.changeNav(this.navIndex) this.changeNav(this.navIndex)
}) })
}, },