xinfeng 5 年 前
コミット
5a7e51058e
1 ファイル変更3 行追加8 行削除
  1. 3 8
      components/header.vue

+ 3 - 8
components/header.vue

@@ -230,7 +230,8 @@ export default {
       keywork: "",
       // 消息数量
       messageCount: {},
-      WhiteLogo
+      WhiteLogo,
+      loginUrl: ''
     };
   },
   computed: {
@@ -293,13 +294,6 @@ export default {
           return "";
       }
     },
-    loginUrl() {
-      if (process.server) {
-        return this.baseUrl+'/?loginbox=show'
-      } else {
-        return this.baseUrl+'/?loginbox=show&next=' + encodeURIComponent(location.href)
-      }
-    }
   },
   mounted() {
     if (this.myInfo && this.myInfo.nickname) {
@@ -330,6 +324,7 @@ export default {
   created() {
     this.baseUrl = this.$store.state.domainConfig.siteUrl;
     this.jishuBaseUrl = this.$store.state.domainConfig.jishuinUrl;
+    this.loginUrl = this.baseUrl+'/?loginbox=show&next=' + encodeURIComponent(location.href)
   }
 };
 </script>