From fa74612c99459a8b4e94121d2d3bfcc42915208b Mon Sep 17 00:00:00 2001 From: tj <1378534974@qq.com> Date: 星期二, 27 五月 2025 16:08:20 +0800 Subject: [PATCH] loading,wechatLogin --- components/tabbar/top-tab-bar.vue | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/tabbar/top-tab-bar.vue b/components/tabbar/top-tab-bar.vue index 0ba089b..82f73e1 100644 --- a/components/tabbar/top-tab-bar.vue +++ b/components/tabbar/top-tab-bar.vue @@ -21,7 +21,7 @@ <!-- 右侧按钮 --> <view class="right"> - <view class="login-view" @click="goLogin"> + <view class="login-view" @click="goLogin" v-if="!isLoggedIn"> <up-icon name="/static/images/tabbar/user.png" size="30rpx" /> <text class="login-text">登录</text> </view> @@ -33,10 +33,12 @@ </template> <script setup lang="ts"> -import { ref, onMounted } from 'vue' - -const CustomBar = ref<number>(uni.getStorageSync('CustomBar') || 0) -const StatusBar = ref<number>(uni.getStorageSync('StatusBar') || 0) +import { ref, onMounted ,computed} from 'vue' +import { useUserStore } from '@/store/user' +const userStore = useUserStore() +const isLoggedIn = computed(() => userStore.hasLogin) +console.log("登录状态") +console.log(isLoggedIn.value) // 可选:自动获取系统信息进行替代 onMounted(() => { -- Gitblit v1.9.3