diff --git a/frontend/src/features/seller/views/SellerListingCreateView.vue b/frontend/src/features/seller/views/SellerListingCreateView.vue
index 790cf9b0..c08dc9c9 100644
--- a/frontend/src/features/seller/views/SellerListingCreateView.vue
+++ b/frontend/src/features/seller/views/SellerListingCreateView.vue
@@ -772,7 +772,7 @@ function selectDailyLoss(value: string | number) {
选择赔付方案
- 服务费按号主实际到手租金计算,结算时自动扣除
+ 保险服务费按实际纯币结算金额计算,额外物品不计入基数
- 无忧租号保险({{ insuranceFeePercent.toFixed(1) }}%)
+ 无忧租号保险({{ insuranceFeePercent.toFixed(1) }}% · 纯币计费)
普通赔付
@@ -873,7 +873,7 @@ function selectDailyLoss(value: string | number) {
¥{{ formatMoney(calculatedConsumablePrice) }}
- 无忧租号保险({{ insuranceFeePercent.toFixed(1) }}%)
+ 无忧租号保险({{ insuranceFeePercent.toFixed(1) }}% · 纯币计费)
-¥{{ formatMoney(calculatedInsuranceFee) }}
diff --git a/frontend/src/shared/utils/__tests__/pricing.spec.ts b/frontend/src/shared/utils/__tests__/pricing.spec.ts
index 39bb1c9a..4329ea27 100644
--- a/frontend/src/shared/utils/__tests__/pricing.spec.ts
+++ b/frontend/src/shared/utils/__tests__/pricing.spec.ts
@@ -15,7 +15,11 @@ describe('calculateInsuranceFeeAmount', () => {
expect(calculateInsuranceFeeAmount(238.1, 400)).toBe(9.52)
})
- it('保险服务费不超过卖家租金', () => {
+ it('按纯币价格计算保险服务费', () => {
+ expect(calculateInsuranceFeeAmount(250, 800)).toBe(20)
+ })
+
+ it('保险服务费不超过纯币金额', () => {
expect(calculateInsuranceFeeAmount(1, 10_000)).toBe(1)
})
})
diff --git a/frontend/src/shared/utils/pricing.ts b/frontend/src/shared/utils/pricing.ts
index f4a4e17a..307adeba 100644
--- a/frontend/src/shared/utils/pricing.ts
+++ b/frontend/src/shared/utils/pricing.ts
@@ -26,11 +26,11 @@ export function roundMoney(value: number) {
return Math.round(value * 10) / 10
}
-export function calculateInsuranceFeeAmount(ownerIncomeYuan: number, feeBps: number) {
- const ownerIncomeCent = Math.max(Math.round(Number(ownerIncomeYuan || 0) * 100), 0)
+export function calculateInsuranceFeeAmount(pureCoinAmountYuan: number, feeBps: number) {
+ const pureCoinAmountCent = Math.max(Math.round(Number(pureCoinAmountYuan || 0) * 100), 0)
const safeFeeBps = Math.max(Math.round(Number(feeBps || 0)), 0)
- if (ownerIncomeCent <= 0 || safeFeeBps <= 0) return 0
- return Math.min(Math.round((ownerIncomeCent * safeFeeBps) / 10_000), ownerIncomeCent) / 100
+ if (pureCoinAmountCent <= 0 || safeFeeBps <= 0) return 0
+ return Math.min(Math.round((pureCoinAmountCent * safeFeeBps) / 10_000), pureCoinAmountCent) / 100
}
/**