优化发布截图上传与押金提示

This commit is contained in:
yml2213
2026-06-07 21:40:36 +08:00
parent eebd2d3b04
commit a8b3d3813b
16 changed files with 308 additions and 53 deletions
@@ -31,6 +31,7 @@ export interface PublishScreenshotSlot {
export interface PublishPriceConfig {
deposit_placeholder: string
deposit_hint: string
price_placeholder: string
ratio_description: string
}
@@ -132,6 +133,7 @@ export const emptyListingPublishOptions: ListingPublishOptions = {
fire_level_min: 38,
price_config: {
deposit_placeholder: '',
deposit_hint: '租客缴纳,封号必赔付',
price_placeholder: '',
ratio_description: '',
},
@@ -287,6 +289,10 @@ function normalizePriceConfig(value?: unknown): PublishPriceConfig {
const row = isRecord(value) ? value : {}
return {
deposit_placeholder: typeof row.deposit_placeholder === 'string' ? row.deposit_placeholder.trim() : '',
deposit_hint:
typeof row.deposit_hint === 'string' && row.deposit_hint.trim()
? row.deposit_hint.trim()
: emptyListingPublishOptions.price_config.deposit_hint,
price_placeholder: typeof row.price_placeholder === 'string' ? row.price_placeholder.trim() : '',
ratio_description: typeof row.ratio_description === 'string' ? row.ratio_description.trim() : '',
}