fix: point exp
This commit is contained in:
39
App.vue
39
App.vue
@@ -1,21 +1,34 @@
|
|||||||
<script>
|
<script>
|
||||||
import { useUserStore } from './stores/user'
|
import { useUserStore } from "./stores/user";
|
||||||
|
import { userOpenApp } from "./api/auth";
|
||||||
export default {
|
|
||||||
onLaunch() {
|
const openApp = async () => {
|
||||||
const userStore = useUserStore()
|
const res = await userOpenApp();
|
||||||
userStore.loadFromStorage()
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import url("common/style/common-style.scss");
|
@import url("common/style/common-style.scss");
|
||||||
wx-swiper .wx-swiper-dot {
|
wx-swiper .wx-swiper-dot {
|
||||||
position: relative;
|
position: relative;
|
||||||
right: -260rpx;
|
right: -260rpx;
|
||||||
bottom: 110rpx;
|
bottom: 110rpx;
|
||||||
}
|
}
|
||||||
/* tabBar */
|
/* tabBar */
|
||||||
.customtabbar {
|
.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 () => {
|
export const reportPrivacy = async () => {
|
||||||
// return request({
|
// return request({
|
||||||
// url: "/api/common/privacy/report",
|
// url: "/api/common/privacy/report",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export const getAvatarSystemList = async (page = 1) => {
|
|||||||
|
|
||||||
export const getAvatarSystemCategoryList = async () => {
|
export const getAvatarSystemCategoryList = async () => {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/blessing/avatar/system/category/list`,
|
url: `/api/blessing/avatar/category/list`,
|
||||||
method: "GET",
|
method: "GET",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ onLoad((options) => {
|
|||||||
shareToken.value = options.shareToken;
|
shareToken.value = options.shareToken;
|
||||||
saveViewRequest(options.shareToken, "avatar_download");
|
saveViewRequest(options.shareToken, "avatar_download");
|
||||||
}
|
}
|
||||||
loadAvatars(true);
|
fetchCategories();
|
||||||
trackRecord({
|
trackRecord({
|
||||||
eventName: "avatar_download_page_visit",
|
eventName: "avatar_download_page_visit",
|
||||||
eventType: `visit`,
|
eventType: `visit`,
|
||||||
|
|||||||
Reference in New Issue
Block a user