From db53037fa9fb22ec35b1a5f403115a4174008135 Mon Sep 17 00:00:00 2001 From: asd Date: Tue, 3 Dec 2019 09:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/indexfindhead.vue | 10 ++++++++-- src/components/indexhead.vue | 14 ++++++++++++-- src/login.vue | 4 ++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/components/indexfindhead.vue b/src/components/indexfindhead.vue index 3bbe99b..a6b28e6 100644 --- a/src/components/indexfindhead.vue +++ b/src/components/indexfindhead.vue @@ -5,7 +5,7 @@
首页
我的主页
-
退出登录
+
{{menu3}}
@@ -98,11 +98,17 @@ export default { data() { return { show: false, - serch:"" + serch:"", + menu3:"" }; }, mounted(){ this.serch=this.$route.query.word + if (localStorage.getItem("token") == ""){ + this.menu3="登录" + }else{ + this.menu3="退出登录" + } }, methods: { isshow() { diff --git a/src/components/indexhead.vue b/src/components/indexhead.vue index cdac6f7..fc17c00 100644 --- a/src/components/indexhead.vue +++ b/src/components/indexhead.vue @@ -11,7 +11,7 @@ 我的主页
- 退出登录
+ {{token==''?'登录':'退出登录'}}
@@ -107,9 +107,19 @@ export default { data() { return { show: false, - serch: "" + serch: "", + token:"" }; }, + mounted(){ + window.console.log(localStorage.getItem("token")=='',465) + this.token=localStorage.getItem("token") + // if (localStorage.getItem("token") == ""){ + // this.menu3="登录" + // }else{ + // this.menu3="退出登录" + // } + }, methods: { isshow() { this.show = !this.show; diff --git a/src/login.vue b/src/login.vue index 76711a0..ad2aa47 100644 --- a/src/login.vue +++ b/src/login.vue @@ -74,6 +74,9 @@ export default { miao: 60 }; }, + mounted(){ + window.localStorage.setItem('token','') + }, methods: { open() { this.ifshow = true; @@ -124,6 +127,7 @@ export default { } }, sub() { + let t = this; window.console.log(t.ifsign, 4859); if (t.ifsign) {