From 096121a8cd3cff5840b800aebf06b6ebf41de0ad Mon Sep 17 00:00:00 2001 From: yml2213 Date: Sat, 15 Aug 2026 13:32:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(seller):=20=E5=8F=91=E5=B8=83=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7=E6=96=B0=E5=A2=9E=E6=98=AF=E5=90=A6=E6=9C=89=E5=85=A8?= =?UTF-8?q?=E8=8B=B1=E9=9B=84=E5=BF=85=E5=A1=AB=E5=AD=97=E6=AE=B5=EF=BC=8C?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seller/composables/usePublishDraft.ts | 1 + .../seller/composables/usePublishForm.ts | 3 +++ .../views/MobileSellerListingCreateView.vue | 18 ++++++++++++++++++ .../seller/views/SellerListingCreateView.vue | 10 ++++++++++ frontend/src/shared/types/publish.ts | 2 ++ frontend/src/shared/utils/listingDisplay.ts | 4 ++++ 6 files changed, 38 insertions(+) diff --git a/frontend/src/features/seller/composables/usePublishDraft.ts b/frontend/src/features/seller/composables/usePublishDraft.ts index e085099..6803037 100644 --- a/frontend/src/features/seller/composables/usePublishDraft.ts +++ b/frontend/src/features/seller/composables/usePublishDraft.ts @@ -18,6 +18,7 @@ export function defaultPublishForm(): PublishForm { online_start: '', online_end: '', unlock_said: '', + all_hero: '', ban_record: '', common_regions: [], depositAmountYuan: '', diff --git a/frontend/src/features/seller/composables/usePublishForm.ts b/frontend/src/features/seller/composables/usePublishForm.ts index eb858ae..dcad6bd 100644 --- a/frontend/src/features/seller/composables/usePublishForm.ts +++ b/frontend/src/features/seller/composables/usePublishForm.ts @@ -309,6 +309,7 @@ export function usePublishForm(options: UsePublishFormOptions) { online_start: stringValue(onlineTime.start), online_end: stringValue(onlineTime.end), unlock_said: stringValue(summary.unlock_said), + all_hero: stringValue(summary.all_hero), ban_record: stringValue(summary.ban_record), common_regions: stringArray(summary.common_regions), depositAmountYuan: listing.deposit_amount_cent > 0 ? listing.deposit_amount_cent / 100 : '', @@ -717,6 +718,7 @@ export function usePublishForm(options: UsePublishFormOptions) { } if (pricing.banRecordOptions.value.length && !form.ban_record) return '请选择封禁记录' if (!form.unlock_said) return '请选择是否解锁赛伊德' + if (!form.all_hero) return '请选择是否有全英雄' if (form.depositAmountYuan === '' || Number(form.depositAmountYuan) < 0) return '请填写押金' if (!Number.isFinite(Number(form.depositAmountYuan))) return '押金格式不正确' if ( @@ -817,6 +819,7 @@ export function usePublishForm(options: UsePublishFormOptions) { end: form.online_end, }, unlock_said: form.unlock_said, + all_hero: form.all_hero, ban_record: form.ban_record, common_regions: form.common_regions, remark: form.remark, diff --git a/frontend/src/features/seller/views/MobileSellerListingCreateView.vue b/frontend/src/features/seller/views/MobileSellerListingCreateView.vue index 5374001..2d96bc1 100644 --- a/frontend/src/features/seller/views/MobileSellerListingCreateView.vue +++ b/frontend/src/features/seller/views/MobileSellerListingCreateView.vue @@ -120,6 +120,7 @@ function selectRadio(value: T, setter: (value: T) => void) { } const unlockSaidOptions = ['是', '否'] +const allHeroOptions = ['是', '否'] // 在线时间:通栏自定义块 + 底部时间选择,避免 van-field 窄列截断原生 time const onlineTimePickerVisible = ref(false) @@ -421,6 +422,23 @@ const screenshotGuides: Record = { + + + +
diff --git a/frontend/src/features/seller/views/SellerListingCreateView.vue b/frontend/src/features/seller/views/SellerListingCreateView.vue index e99b299..49decb9 100644 --- a/frontend/src/features/seller/views/SellerListingCreateView.vue +++ b/frontend/src/features/seller/views/SellerListingCreateView.vue @@ -119,6 +119,7 @@ const activeAgreementTitle = computed(() => activeAgreement.value?.title || '协 const activeAgreementContent = computed(() => activeAgreement.value?.content || '') const unlockSaidOptions = ['是', '否'] +const allHeroOptions = ['是', '否'] // 截图槽位的指导示例图(仅展示、点击放大,不占用上传数量) const screenshotGuides: Record = { @@ -345,6 +346,15 @@ function selectDailyLoss(value: string | number) { />
+
+ + +
+
diff --git a/frontend/src/shared/types/publish.ts b/frontend/src/shared/types/publish.ts index 5e6513d..9bf8dae 100644 --- a/frontend/src/shared/types/publish.ts +++ b/frontend/src/shared/types/publish.ts @@ -16,6 +16,8 @@ export type PublishForm = { online_start: string online_end: string unlock_said: string + /** 是否有全英雄(是/否) */ + all_hero: string ban_record: string common_regions: string[] depositAmountYuan: number | '' diff --git a/frontend/src/shared/utils/listingDisplay.ts b/frontend/src/shared/utils/listingDisplay.ts index e43de71..140ec9b 100644 --- a/frontend/src/shared/utils/listingDisplay.ts +++ b/frontend/src/shared/utils/listingDisplay.ts @@ -154,6 +154,10 @@ export function getListingChips(item: Listing): ListingDisplayChip[] { if (readAssetString(item, 'unlock_said') === '是') { chips.push({ label: '解锁赛伊德', value: '是' }) } + // 全英雄为必选项,仅在号主勾选「是」时展示 + if (readAssetString(item, 'all_hero') === '是') { + chips.push({ label: '全英雄', value: '是' }) + } return chips.filter(chip => chip.value) }