From 98279466b023683d02533fd666a043cb56ab5d9b Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Sat, 22 Jan 2022 18:26:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 71963ab..0c7c4e5 100644 --- a/index.html +++ b/index.html @@ -123,7 +123,11 @@ maskshow: false } }, + beforeDestroy(){ + console.log('本页面销毁'); + }, created() { + console.log('跳转页面',window.location.href); let self = this; //获取链接携带的参数 let linkId = this.getQueryString('id'); @@ -135,9 +139,13 @@ linkId = parmasResult.length > 0 ? parmasResult[0] : null; //链接携带落地页渲染id keyCode = parmasResult.length > 1 ? parmasResult[1] : null; //链接携带key } - req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => { + if(linkId.length>12){ + req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => { + window.location.href=res.data; + }) + }else{ + req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => { if (res.code == 200) { - if(res.data.id){ //内置页顶图 document.title = res.data.title; self.plan_id=res.data.plan_id @@ -151,10 +159,6 @@ sessionStorage.setItem('product_detail', JSON.stringify(res.data['access_conf'].product_detail)); } sessionStorage.setItem('linkId', linkId); - }else{//跳转链接 - setTimeout(()=>{ - window.location.href=res.data; - },3000); } //是否携带token if (keyCode) { @@ -198,7 +202,9 @@ } }).catch(err => {}); - }, + } + }, + mounted() { this.$nextTick(() => {