diff --git a/pages/index/aiStore.vue b/pages/index/aiStore.vue index 2686a2f..cddc21f 100644 --- a/pages/index/aiStore.vue +++ b/pages/index/aiStore.vue @@ -141,7 +141,6 @@ [], }, - totalEarnings: { - type: [Number, String], - default: 0, - }, source: { type: Number, default: 1, @@ -70,10 +66,10 @@ const renderList = computed(() => (Array.isArray(props.list) ? props.list : [])); const calcProgressPercent = (item) => { - const total = Number(props.totalEarnings) || 0; - const cur = Number(item?.earnings) || 0; - if (total <= 0 || cur <= 0) return 0; - const pct = (cur / total) * 100; + const totalRevenue = Number(item?.totalRevenue ?? item?.earnings) || 0; + const userPayPrice = Number(item?.userPayPrice) || 0; + if (userPayPrice <= 0 || totalRevenue <= 0) return 0; + const pct = (totalRevenue / userPayPrice) * 100; if (!Number.isFinite(pct)) return 0; return Math.max(0, Math.min(100, pct)); };