去除打印
This commit is contained in:
17
app.vue
17
app.vue
@@ -33,7 +33,6 @@ onMounted(() => {
|
||||
|
||||
determineIsLogin()
|
||||
|
||||
|
||||
// if (true) determineIsLogin()
|
||||
// else isNeedLogin.value = false
|
||||
// window["userInfoWin"] = {
|
||||
@@ -53,15 +52,9 @@ let isNeedLogin = ref(true) // 是否需要登录状态
|
||||
const determineIsLogin = () => {
|
||||
let count = 0
|
||||
let timer = setInterval(() => {
|
||||
console.log("44");
|
||||
if (Object.keys(window["userInfoWin"]).length !== 0) {
|
||||
clearInterval(timer)
|
||||
if (window["userInfoWin"]["uid"]) {
|
||||
isNeedLogin.value = false
|
||||
if (window["userInfoWin"]["uid"] == 256624) {
|
||||
console.log("登录了")
|
||||
}
|
||||
}
|
||||
if (window["userInfoWin"]["uid"]) isNeedLogin.value = false
|
||||
}
|
||||
count++
|
||||
if (count >= 30) clearInterval(timer)
|
||||
@@ -72,12 +65,8 @@ const determineIsLogin = () => {
|
||||
const goLogin = () => {
|
||||
if (typeof window === "undefined") return
|
||||
if (Object.keys(window["userInfoWin"]).length !== 0) {
|
||||
if (window["userInfoWin"]["uid"]) {
|
||||
isNeedLogin.value = false
|
||||
if (window["userInfoWin"]["uid"] == 256624) {
|
||||
console.log("登录了")
|
||||
}
|
||||
} else ajax_login()
|
||||
if (window["userInfoWin"]["uid"]) isNeedLogin.value = false
|
||||
else ajax_login()
|
||||
} else ajax_login()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user