no message

This commit is contained in:
A1300399510
2024-01-24 17:20:53 +08:00
parent 809d1d317a
commit 89020a40b7
7 changed files with 283 additions and 190 deletions

21
app.vue
View File

@@ -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)