fix: point exp

This commit is contained in:
zzc
2026-02-24 22:49:56 +08:00
parent 90e7f000c8
commit e5a8f3ca3f
4 changed files with 42 additions and 15 deletions

39
App.vue
View File

@@ -1,21 +1,34 @@
<script>
import { useUserStore } from './stores/user'
export default {
onLaunch() {
const userStore = useUserStore()
userStore.loadFromStorage()
}
}
<script>
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",
});
}
};
export default {
onLaunch() {
const userStore = useUserStore();
userStore.loadFromStorage();
if (userStore.userInfo.id) {
openApp();
}
},
};
</script>
<style lang="scss">
@import url("common/style/common-style.scss");
wx-swiper .wx-swiper-dot {
position: relative;
right: -260rpx;
bottom: 110rpx;
position: relative;
right: -260rpx;
bottom: 110rpx;
}
/* tabBar */
.customtabbar {