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: [],
isCompleteLoadGood: false,
pageKeyId: Object.freeze('landmarkGoodsIndex'),
posterImageStatus: false
posterImageStatus: false,
sceneId: null
}
},
computed: {
@@ -126,8 +127,11 @@ export default {
}
},
onLoad(opts) {
if(opts && opts.id) {
this.navIndex = navList.map(e => +e.id).indexOf(+opts.id)
console.log('进入地标页');
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()
},
@@ -151,6 +155,10 @@ export default {
getNavList() {
getProvinceList().then(({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)
})
},