fix: 兼容迁移自定义保险说明

This commit is contained in:
yml2213
2026-11-05 19:29:49 +08:00
parent d41445002e
commit 9d55b4510c
2 changed files with 3 additions and 3 deletions
@@ -12,8 +12,8 @@ const maxBannerHotspotHoverScale = 1.5
func migrateInsuranceBillingCopy(value string) string { func migrateInsuranceBillingCopy(value string) string {
value = strings.Replace( value = strings.Replace(
value, value,
"注:选择此方案,需额外抽取订单佣金的8.0%作为服务费:押金须达到推荐押金方可购买。", "注:选择此方案,需额外抽取订单佣金的8.0%作为服务费:",
"无忧保险服务费按实际纯币结算金额计算,额外物品不计入计费基数;具体费率以当前配置为准。押金须达到推荐押金方可购买。", "无忧保险服务费按实际纯币结算金额计算,额外物品不计入计费基数;具体费率以当前配置为准。",
1, 1,
) )
return strings.Replace( return strings.Replace(
@@ -180,7 +180,7 @@ func TestNormalizePublishOptionsValueDefaultsPremiumZoneTooltip(t *testing.T) {
func TestNormalizePublishOptionsValueMigratesInsuranceBillingBaseCopy(t *testing.T) { func TestNormalizePublishOptionsValueMigratesInsuranceBillingBaseCopy(t *testing.T) {
options := DefaultPublishOptions() options := DefaultPublishOptions()
options.PriceConfig.CompensationNote = "注:选择此方案,需额外抽取订单佣金的8.0%作为服务费:押金须达到推荐押金方可购买。" options.PriceConfig.CompensationNote = "注:选择此方案,需额外抽取订单佣金的8.0%作为服务费:押金须达到推荐押金以上方可购买。"
options.PriceConfig.PremiumZoneTooltip = "4. 保险服务:服务费率按当前配置执行,并从卖家实际到手租金中扣除。" options.PriceConfig.PremiumZoneTooltip = "4. 保险服务:服务费率按当前配置执行,并从卖家实际到手租金中扣除。"
raw, err := json.Marshal(options) raw, err := json.Marshal(options)
if err != nil { if err != nil {