fix: point exp

This commit is contained in:
zzc
2026-02-24 23:30:36 +08:00
parent e5a8f3ca3f
commit 19c18b478f
4 changed files with 43 additions and 9 deletions

18
App.vue
View File

@@ -3,12 +3,18 @@ import { useUserStore } from "./stores/user";
import { userOpenApp } from "./api/auth";
const openApp = async () => {
const res = await userOpenApp();
if (res?.points && res.points > 0) {
uni.showToast({
title: `每日登录 +${res.points} 积分`,
icon: "none",
});
try {
const res = await userOpenApp();
if (res?.points && res.points > 0) {
uni.showToast({
title: `每日登录 +${res.points} 积分`,
icon: "none",
});
const userStore = useUserStore();
await userStore.fetchUserAssets();
}
} catch (e) {
console.error("userOpenApp error", e);
}
};