feat(listing): 增加赔付方案说明配置
This commit is contained in:
@@ -344,6 +344,14 @@ async function handleSave() {
|
||||
placeholder="支持换行,发布页点击或悬停押金旁的说明图标时展示"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="赔付方案说明">
|
||||
<el-input
|
||||
v-model="publishOptionsDraft.price_config.compensation_note"
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
placeholder="支持换行,发布页选择赔付方案后展示"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格提示">
|
||||
<el-input
|
||||
v-model="publishOptionsDraft.price_config.price_placeholder"
|
||||
|
||||
@@ -24,4 +24,19 @@ describe('mergeListingPublishOptions', () => {
|
||||
|
||||
expect(options.price_config.deposit_tooltip).toBe('自定义押金说明')
|
||||
})
|
||||
|
||||
it('读取后台配置的赔付方案说明', () => {
|
||||
const options = mergeListingPublishOptions({
|
||||
price_config: {
|
||||
deposit_placeholder: '',
|
||||
deposit_hint: '',
|
||||
deposit_tooltip: '',
|
||||
compensation_note: '自定义赔付方案说明',
|
||||
price_placeholder: '',
|
||||
ratio_description: '',
|
||||
},
|
||||
})
|
||||
|
||||
expect(options.price_config.compensation_note).toBe('自定义赔付方案说明')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -33,6 +33,7 @@ export interface PublishPriceConfig {
|
||||
deposit_placeholder: string
|
||||
deposit_hint: string
|
||||
deposit_tooltip: string
|
||||
compensation_note: string
|
||||
price_placeholder: string
|
||||
ratio_description: string
|
||||
}
|
||||
@@ -168,6 +169,8 @@ export const emptyListingPublishOptions: ListingPublishOptions = {
|
||||
deposit_placeholder: '',
|
||||
deposit_hint: '租客缴纳,封号必赔付',
|
||||
deposit_tooltip: defaultDepositTooltip,
|
||||
compensation_note:
|
||||
'普通赔付方案如下:账号在租期内或祖期外出现封禁,追回、洗号等情况,最高可获赔全款相金+押金\n\n无忧保险赔付方案:按账号市场价值进行赔付(可参照螃蟹,盼之等主流交易平台)。注:选择此方案,需额外抽取订单佣金的8.0%作为服务费:押金须达到推荐押金方可购买。',
|
||||
price_placeholder: '',
|
||||
ratio_description: '',
|
||||
},
|
||||
@@ -357,6 +360,10 @@ function normalizePriceConfig(value?: unknown): PublishPriceConfig {
|
||||
typeof row.deposit_tooltip === 'string' && row.deposit_tooltip.trim()
|
||||
? row.deposit_tooltip.trim()
|
||||
: emptyListingPublishOptions.price_config.deposit_tooltip,
|
||||
compensation_note:
|
||||
typeof row.compensation_note === 'string' && row.compensation_note.trim()
|
||||
? row.compensation_note.trim()
|
||||
: emptyListingPublishOptions.price_config.compensation_note,
|
||||
price_placeholder:
|
||||
typeof row.price_placeholder === 'string' ? row.price_placeholder.trim() : '',
|
||||
ratio_description:
|
||||
|
||||
@@ -1180,6 +1180,7 @@
|
||||
color: #858c96;
|
||||
font-size: 10px;
|
||||
line-height: 1.55;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.publish-agreement-card {
|
||||
|
||||
@@ -987,7 +987,7 @@ const screenshotGuides: Record<string, string> = {
|
||||
</div>
|
||||
</div>
|
||||
<p class="coverage-note">
|
||||
无忧租号保险在普通赔付基础上增加账号市场价值保障,服务费按实际到手租金扣除。
|
||||
{{ priceConfig.compensation_note }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1354,6 +1354,7 @@
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 1.7;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
@media (max-width: 1120px) {
|
||||
|
||||
@@ -812,7 +812,7 @@ function selectDailyLoss(value: string | number) {
|
||||
</div>
|
||||
</div>
|
||||
<p class="coverage-note">
|
||||
普通赔付覆盖封禁、追回、洗号等情况;无忧租号保险在此基础上增加账号市场价值保障。
|
||||
{{ priceConfig.compensation_note }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user