fix: point exp
This commit is contained in:
18
App.vue
18
App.vue
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user