fix: point exp
This commit is contained in:
39
App.vue
39
App.vue
@@ -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 {
|
||||
|
||||
14
api/auth.js
14
api/auth.js
@@ -23,6 +23,20 @@ export const updateUserInfo = async (body) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const userOpenApp = async () => {
|
||||
return request({
|
||||
url: "/api/user/open-app",
|
||||
method: "POST",
|
||||
});
|
||||
};
|
||||
|
||||
export const getUserAsset = async () => {
|
||||
return request({
|
||||
url: "/api/user/asset",
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
export const reportPrivacy = async () => {
|
||||
// return request({
|
||||
// url: "/api/common/privacy/report",
|
||||
|
||||
@@ -9,7 +9,7 @@ export const getAvatarSystemList = async (page = 1) => {
|
||||
|
||||
export const getAvatarSystemCategoryList = async () => {
|
||||
return request({
|
||||
url: `/api/blessing/avatar/system/category/list`,
|
||||
url: `/api/blessing/avatar/category/list`,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
@@ -181,7 +181,7 @@ onLoad((options) => {
|
||||
shareToken.value = options.shareToken;
|
||||
saveViewRequest(options.shareToken, "avatar_download");
|
||||
}
|
||||
loadAvatars(true);
|
||||
fetchCategories();
|
||||
trackRecord({
|
||||
eventName: "avatar_download_page_visit",
|
||||
eventType: `visit`,
|
||||
|
||||
Reference in New Issue
Block a user