no message
This commit is contained in:
21
app.vue
21
app.vue
@@ -15,12 +15,28 @@ const isProduction = process.env.NODE_ENV === "production"
|
||||
// console.log(process.env.NODE_ENV, "NODE_ENV")
|
||||
onMounted(() => {
|
||||
// isNeedLogin.value = false
|
||||
if (!isProduction) isNeedLogin.value = false
|
||||
else determineIsLogin()
|
||||
// if (!isProduction) isNeedLogin.value = false
|
||||
// else determineIsLogin()
|
||||
|
||||
window["userInfoWin"] = {
|
||||
"username": "",
|
||||
"uid": 256624,
|
||||
"uin": 4171117,
|
||||
"avatar": "https://oss.gter.net/avatar/97KwEWQHYuMQGDnFqkimXF9SHKuGwVV5zW-tYWFjYQ~~?istype=1&random=HHfurzyTXnzb",
|
||||
"messagenum": 0,
|
||||
"newprompt": 0,
|
||||
"todaysigned": 0,
|
||||
}
|
||||
|
||||
determineIsLogin()
|
||||
})
|
||||
|
||||
let isNeedLogin = ref(true) // 是否需要登录状态
|
||||
|
||||
let userInfoWin = ref({})
|
||||
|
||||
provide("userInfoWin", userInfoWin)
|
||||
|
||||
// 判断是否登录状态
|
||||
const determineIsLogin = () => {
|
||||
let count = 0
|
||||
@@ -28,6 +44,7 @@ const determineIsLogin = () => {
|
||||
if (Object.keys(window["userInfoWin"]).length !== 0) {
|
||||
clearInterval(timer)
|
||||
if (window["userInfoWin"]["uid"]) isNeedLogin.value = false
|
||||
userInfoWin.value = window["userInfoWin"]
|
||||
}
|
||||
count++
|
||||
if (count >= 10) clearInterval(timer)
|
||||
|
||||
Reference in New Issue
Block a user