From b665c9576674863297bb0707fc6f8069a0f1a6b1 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Sat, 22 Jan 2022 18:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=9C=B0=E5=9D=80=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index ba33827..e1a032c 100644 --- a/index.html +++ b/index.html @@ -134,6 +134,7 @@ let parmasResult = parmas.filter(n => n); linkId = parmasResult.length > 0 ? parmasResult[0] : null; //链接携带落地页渲染id keyCode = parmasResult.length > 1 ? parmasResult[1] : null; //链接携带key + linkId='AAAAWW9smfXGjug0'; } req.axiosGetplan('/plan/plan_theme/' + linkId).then(res => { if (res.code == 200) { @@ -152,32 +153,41 @@ } sessionStorage.setItem('linkId', linkId); }else{//跳转链接 - window.location.href=res.data; + sessionStorage.setItem('tourl',true); + setTimeout(()=>{ + window.location.href=res.data; + },3000); + + } //是否携带token if (keyCode) { let data = { key: keyCode } - req.axiosPostTogppds('/key/loginFromLink', data).then(res => { - if (res.code == 200) { - sessionStorage.setItem('key', keyCode); - sessionStorage.setItem('token', res.data.token); - sessionStorage.setItem('haskey', keyCode); - this.promttip = '正在加载商品...'; - this.openDialog(); - window.location.replace("./homepage.html"); - } else { + if(keyCode.includes('html')){ + return + }else{ + req.axiosPostTogppds('/key/loginFromLink', data).then(res => { + if (res.code == 200) { + sessionStorage.setItem('key', keyCode); + sessionStorage.setItem('token', res.data.token); + sessionStorage.setItem('haskey', keyCode); + this.promttip = '正在加载商品...'; + this.openDialog(); + window.location.replace("./homepage.html"); + } else { + self.maskshow = true; + self.tiptext = res.message; + self.popboxshow = true; + + } + }).catch(err => { self.maskshow = true; self.tiptext = res.message; self.popboxshow = true; - - } - }).catch(err => { - self.maskshow = true; - self.tiptext = res.message; - self.popboxshow = true; - }); + }); + } } else { let keyName; if(this.pageType==3){