From c624bc2d1d97beeaa60b62328256b63cc77cd417 Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Tue, 10 Mar 2026 11:47:19 +0800 Subject: [PATCH] fix: user deduct point --- pages/avatar/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pages/avatar/index.vue b/pages/avatar/index.vue index 21a58e2..6c84907 100644 --- a/pages/avatar/index.vue +++ b/pages/avatar/index.vue @@ -691,9 +691,14 @@ const saveAndUse = async () => { const tempPath = await saveByCanvas(true); const id = createAvatarId(); - await saveRecordRequest(tempPath, id, "avatar_download"); + saveRecordRequest(tempPath, id, "avatar_download"); completeCardInfo(id); - userStore.fetchUserAssets(); + + if (userStore?.userInfo?.points >= 20) { + userStore.userInfo.points -= 20; + } + // userStore.fetchUserAssets(); + return; // 调用avatarDownloadRecord API记录下载次数 // await avatarDownloadRecord({