fix: load mall claimed counts from database
This commit is contained in:
@@ -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' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user