From 8d29cb777f863b35d183911c299ca0023642f456 Mon Sep 17 00:00:00 2001 From: linxi Date: Wed, 27 Nov 2024 10:54:48 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A2697=20=E3=80=90=E5=9C=B0=E6=A0=87?= =?UTF-8?q?=E5=A5=BD=E7=89=A9=E3=80=91=E6=89=AB=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=9B=B4=E6=8E=A5=E8=BF=9B=E5=85=A5=E7=9B=B8?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E7=9C=81=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/landMark.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pages/home/landMark.vue b/pages/home/landMark.vue index b958f56..3585d5b 100644 --- a/pages/home/landMark.vue +++ b/pages/home/landMark.vue @@ -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) }) },