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 51f0ea4..660be35 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) {