fix: index detail

This commit is contained in:
zzc
2026-02-26 15:18:15 +08:00
parent a883caf981
commit 916c383dd5

View File

@@ -219,7 +219,12 @@
<script setup>
import { ref, onMounted, computed } from "vue";
import { getStatusBarHeight } from "@/utils/system";
import { onShareAppMessage, onShareTimeline, onShow } from "@dcloudio/uni-app";
import {
onShareAppMessage,
onShareTimeline,
onShow,
onPullDownRefresh,
} from "@dcloudio/uni-app";
import { useUserStore } from "@/stores/user";
import {
getRankList,
@@ -359,9 +364,13 @@ onMounted(() => {
});
onShow(() => {
// if (userStore.userInfo) {
// // userInfo.value = userStore.userInfo; // 已改为 computed
// }
fetchHomeData();
fetchUserSingInfo();
});
onPullDownRefresh(() => {
fetchHomeData();
fetchUserSingInfo();
});
const fetchUserSingInfo = async () => {
@@ -386,6 +395,8 @@ const fetchHomeData = async () => {
}
} catch (e) {
console.error("fetchHomeData error", e);
} finally {
uni.stopPullDownRefresh();
}
};