页面布局优化

This commit is contained in:
kron
2026-01-09 18:12:27 +08:00
parent 937fce1a35
commit 155f2986c7
16 changed files with 140 additions and 195 deletions
+6 -9
View File
@@ -26,10 +26,7 @@ const store = useStore();
const { updateUser } = store;
const { user } = storeToRefs(store);
const isIOS = computed(() => {
const systemInfo = uni.getDeviceInfo();
return systemInfo.osName === "ios";
});
const isIOS = uni.getDeviceInfo().osName === "ios";
const loadImage = ref(false);
const showModal = ref(false);
@@ -97,11 +94,6 @@ const closeHint = () => {
};
const loadData = async () => {
const result = await getPointBookRankListAPI(1);
list.value = result.list.slice(0, 3);
if (list.value.every((item) => item.id !== user.value.id)) {
list.value = [result.my, ...result.list.slice(0, 3)];
}
const result2 = await getPointBookStatisticsAPI();
data.value = result2;
strength.value = Math.min(10, (5 / 60) * result2.todayTotalArrow);
@@ -173,6 +165,11 @@ watch(
onShow(async () => {
uni.removeStorageSync("point-book");
if (user.value.id) loadData();
const result = await getPointBookRankListAPI(1);
list.value = result.list.slice(0, 3);
if (user.value.id && list.value.every((item) => item.id !== user.value.id)) {
list.value = [result.my, ...result.list.slice(0, 3)];
}
});
onMounted(async () => {