diff --git a/.vuepress/login-manager.js b/.vuepress/login-manager.js index c5a4497..92f9bf7 100644 --- a/.vuepress/login-manager.js +++ b/.vuepress/login-manager.js @@ -3,7 +3,7 @@ import Cookies from 'js-cookie' let TOKEN_KEY = 'kb-user-center-token' -let domain = location.hostname +let domain = window.location.hostname if (domain.indexOf('kuboard.cn') >= 0) { domain = 'kuboard.cn' } diff --git a/.vuepress/theme/components/OnlineChat.vue b/.vuepress/theme/components/OnlineChat.vue index 54ea0b9..60a2a67 100644 --- a/.vuepress/theme/components/OnlineChat.vue +++ b/.vuepress/theme/components/OnlineChat.vue @@ -36,10 +36,10 @@ export default { props: { }, data() { - console.log(location.search, 'search') + console.log(window.location.search, 'search') return { showLogout: false, - isdebugging: location.search === '?showLogin=true' + isdebugging: window.location.search === '?showLogin=true' } }, computed: {