Fix:2697 【地标好物】扫二维码需要直接进入相应的省份
This commit is contained in:
+11
-3
@@ -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)
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user