fix: youhua
This commit is contained in:
@@ -118,7 +118,7 @@ const userInfo = computed(() => ({
|
||||
isVip: userStore.userInfo.isVip || false,
|
||||
}));
|
||||
|
||||
const isLoggedIn = computed(() => !!userStore.userInfo.nickName);
|
||||
const isLoggedIn = computed(() => !!userStore.token || !!userStore.userInfo.nickName);
|
||||
|
||||
// User Stats
|
||||
const userStats = ref({
|
||||
@@ -129,7 +129,15 @@ const userStats = ref({
|
||||
});
|
||||
|
||||
const loadUserStats = async () => {
|
||||
if (!isLoggedIn.value) return;
|
||||
if (!isLoggedIn.value) {
|
||||
userStats.value = {
|
||||
participant: 0,
|
||||
comment: 0,
|
||||
liked: 0,
|
||||
label: []
|
||||
};
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const res = await fetchUserNums();
|
||||
const data = res?.data || res || {};
|
||||
|
||||
Reference in New Issue
Block a user