页面布局优化
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user