no message

This commit is contained in:
A1300399510
2024-01-09 18:49:37 +08:00
parent 9958609ae6
commit f90cd62cc2
7 changed files with 74 additions and 37 deletions

12
app.vue
View File

@@ -12,7 +12,9 @@
<script setup>
const route = useRoute()
// 是否是 生产环境
// const isProduction = import.meta.env.NODE_ENV === "production"
const isProduction = process.env.NODE_ENV === "production"
// console.log(isProduction, "isProduction")
// watchEffect(() => {
// if (typeof window !== "undefined" && route.path) {
@@ -29,10 +31,10 @@ const route = useRoute()
onMounted(() => {
// console.log("isProduction", isProduction)
// if (!isProduction) isNeedLogin.value = false
// else determineIsLogin()
if (true) determineIsLogin()
else isNeedLogin.value = false
if (!isProduction) isNeedLogin.value = false
else determineIsLogin()
// if (true) determineIsLogin()
// else isNeedLogin.value = false
})
let isNeedLogin = ref(true) // 是否需要登录状态