fix: user deduct point

This commit is contained in:
zzc
2026-03-10 11:41:05 +08:00
parent d8c5c3a919
commit 2d3cefa43e
10 changed files with 140 additions and 125 deletions

View File

@@ -563,12 +563,8 @@ import {
getCardTemplateTitleList,
getCardMusicList,
} from "@/api/make";
import {
abilityCheck,
getShareReward,
msgCheckApi,
watchAdReward,
} from "@/api/system";
import { getShareReward, msgCheckApi, watchAdReward } from "@/api/system";
import { checkAbilityAndHandle } from "@/utils/ability.js";
import {
onShareAppMessage,
onShareTimeline,
@@ -1505,24 +1501,9 @@ const preview = async () => {
loginPopupRef.value.open();
return;
}
const abilityRes = await abilityCheck("card_generate");
if (!abilityRes.canUse) {
if (
abilityRes?.blockType === "need_share" &&
abilityRes?.message === "分享可继续"
) {
uni.showToast({
title: "分享给好友可继续使用",
icon: "none",
});
return;
}
uni.showToast({
title: "您今日祝福卡下载次数已用完,直接分享给好友或者明日再试",
icon: "none",
});
return;
}
const canProceed = await checkAbilityAndHandle("card_generate");
if (!canProceed) return;
const tempPath = await saveByCanvas(true);
const id = createCard();
shareOrSave(id);