feat: 优化刷新逻辑,移除不必要的加载状态,简化数据获取流程

This commit is contained in:
2026-01-11 00:57:06 +07:00
parent 4c8b68e67d
commit 739430693e

View File

@@ -5,15 +5,13 @@ import { client, safeClient } from "@/api";
const { t } = useI18n(); const { t } = useI18n();
const { vibrate } = useHaptics(); const { vibrate } = useHaptics();
const loading = ref(true); const { data, execute } = safeClient(client.api.earnings.pending.get());
const { data } = safeClient(client.api.earnings.pending.get());
async function handleRefresh(event: RefresherCustomEvent) { async function handleRefresh(event: RefresherCustomEvent) {
vibrate(); vibrate();
useTimeoutFn(() => { await execute().finally(() => {
event.target.complete(); event.target.complete();
}, 800); });
} }
function getStatusColor(status?: string) { function getStatusColor(status?: string) {