Browse Source

非登录不可以聊

master
453530270@qq.com 2 years ago
parent
commit
0b4fe8e65d
  1. 10
      src/components/CommonFooter.vue

10
src/components/CommonFooter.vue

@ -364,6 +364,7 @@ export default {
...mapState({ ...mapState({
appConfig: "appConfig", appConfig: "appConfig",
}), }),
// check login or not ?
isLogin() { isLogin() {
return Boolean(localStorage.token); return Boolean(localStorage.token);
}, },
@ -436,8 +437,15 @@ export default {
}, },
// scbox // scbox
scbox(e){ scbox(e){
// under login
if (this.isLogin) {
this.ispopup = ! this.ispopup this.ispopup = ! this.ispopup
console.log("dd",this.ispopup) }else{
//
console.log("login fisrt!!")
this.$router.push({ path: '/sign-in' });
}
}, },
// close // close
closebox(){ closebox(){

Loading…
Cancel
Save