fix: load mall claimed counts from database

This commit is contained in:
richjohnrambo
2026-10-19 00:02:35 +08:00
parent 8b773a1a1f
commit 804318e5f5
3 changed files with 3 additions and 10 deletions
+1 -7
View File
@@ -18,7 +18,7 @@
<n-icon v-else :component="ImageOutline" />
</span>
<strong>{{ item.name }}</strong>
<small>已领取:{{ displayClaimedCount(item) }}</small>
<small>已领取:{{ item.claimed_count || 0 }}</small>
</button>
</div>
</AsyncState>
@@ -76,12 +76,6 @@
const product = ref<any>();
let listController: AbortController | undefined;
function displayClaimedCount(item: any) {
const claimedCount = Number(item?.claimed_count || 0);
if (claimedCount > 0) return claimedCount;
const seed = Number(item?.id || 1);
return 100 + ((seed * 137 + 83) % 401);
}
function openSupport() {
router.push({ name: 'MobileSupport' });
}