Compare commits
2 Commits
d15012841c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
210f913aed | ||
|
|
516063bb14 |
4
App.vue
4
App.vue
@@ -10,9 +10,9 @@ const openApp = async () => {
|
||||
title: `每日登录 +${res.points} 积分`,
|
||||
icon: "none",
|
||||
});
|
||||
const userStore = useUserStore();
|
||||
await userStore.fetchUserAssets();
|
||||
}
|
||||
const userStore = useUserStore();
|
||||
await userStore.fetchUserAssets();
|
||||
} catch (e) {
|
||||
console.error("userOpenApp error", e);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export const getPageDetail = async (shareToken) => {
|
||||
|
||||
export const getShareReward = async (data) => {
|
||||
return request({
|
||||
url: "/api/blessing/share/reward",
|
||||
url: "/api/reward/share",
|
||||
method: "POST",
|
||||
data,
|
||||
});
|
||||
|
||||
@@ -57,6 +57,7 @@ export const useUserStore = defineStore("user", {
|
||||
},
|
||||
async fetchUserAssets() {
|
||||
try {
|
||||
if (!this?.userInfo?.id) return;
|
||||
const res = await getUserAsset();
|
||||
if (res) {
|
||||
const newInfo = { ...this.userInfo, ...res };
|
||||
|
||||
@@ -54,6 +54,21 @@ export const checkAbilityAndHandle = async (scene, rewardAdRef) => {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (abilityRes?.blockType === "need_vip") {
|
||||
uni.showModal({
|
||||
title: "会员激活",
|
||||
content: "会员激活即可继续使用该功能,是否前往开通?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/mine/vip",
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
uni.showToast({
|
||||
title: "您今日下载次数已用完,明日再试",
|
||||
icon: "none",
|
||||
|
||||
Reference in New Issue
Block a user