From 147941d0c5584d434d18a1e1ca6d1da8484cf6ec Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Tue, 25 Oct 2022 17:51:29 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=90=BD=E5=9C=B0=E9=A1=B5?= =?UTF-8?q?=E6=B8=85=E9=99=A4localStorage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/index.html b/index.html index 15b2d6b..404d9f5 100644 --- a/index.html +++ b/index.html @@ -17,11 +17,12 @@ @@ -45,14 +46,14 @@
- - - - { if (res.code == 200) { @@ -175,7 +176,7 @@ self.ftcolor = res.data[keyName].land.font_color; self.topImg = res.data[keyName].land.top_image; self.middleImg = res.data[keyName].land.middle_image; - if(this.pageType==8){ + if (this.pageType == 8) { self.middleImg = res.data[keyName].land.white_image; } self.describe = res.data[keyName].land.describe; @@ -191,11 +192,12 @@ center.style.height = img.clientHeight + "px"; } }) + localStorage.clear() }, - computed:{ - bindInputStyle() { + computed: { + bindInputStyle () { return { - '--placeholderColor': this.ftcolor, + '--placeholderColor': this.ftcolor, } }, }, @@ -246,7 +248,7 @@ "key": this.key, "code": this.code, "code_unique_str": sessionStorage.getItem('unique_str'), - "theme_type":this.pageType + "theme_type": this.pageType } req.axiosPost('/key/login', data).then(res => { setTimeout(() => { @@ -292,7 +294,7 @@ let data = { "code_unique_str": res.headers['unique-str'], "key": item, - "theme_type":this.pageType + "theme_type": this.pageType } let wait = await req.axiosPost('/key/loginFromMobileKey', data).then(res => { if (res.code == 200) { @@ -313,12 +315,12 @@ this.openDialog('正在加载商品...'); localStorage.setItem('entryLink', window.location.href);//存储起始页链接 setTimeout(() => { - if (this.pageType === 4 || this.pageType === 8) { - window.location.href = './coupon/couponCollection.html'; - } else { - window.location.href = './homepage.html'; - } - }, 1000); + if (this.pageType === 4 || this.pageType === 8) { + window.location.href = './coupon/couponCollection.html'; + } else { + window.location.href = './homepage.html'; + } + }, 1000); } else { self.openErrorDialog(self.tiptext); } @@ -353,7 +355,7 @@ }, watch: { key (val) { - this.disabled = Boolean(!([1,8].includes(this.pageType)&& val.length == 11)); + this.disabled = Boolean(!([1, 8].includes(this.pageType) && val.length == 11)); } } });