fix: index detail
This commit is contained in:
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user