From 006f93a0e724886aa052abf802eca90537ba7df1 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Fri, 28 Aug 2026 18:23:14 +0800 Subject: [PATCH] feat: add next season pass publish option --- .../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 ++ 5 files changed, 34 insertions(+) diff --git a/frontend/src/features/seller/composables/usePublishDraft.ts b/frontend/src/features/seller/composables/usePublishDraft.ts index 08048de..42f5089 100644 --- a/frontend/src/features/seller/composables/usePublishDraft.ts +++ b/frontend/src/features/seller/composables/usePublishDraft.ts @@ -20,6 +20,7 @@ export function defaultPublishForm(): PublishForm { early_morning_response: '否', can_change_game_name: '', all_hero: '', + next_season_pass: '', ban_record: '', common_regions: [], depositAmountYuan: '', diff --git a/frontend/src/features/seller/composables/usePublishForm.ts b/frontend/src/features/seller/composables/usePublishForm.ts index 23dd391..788319a 100644 --- a/frontend/src/features/seller/composables/usePublishForm.ts +++ b/frontend/src/features/seller/composables/usePublishForm.ts @@ -311,6 +311,7 @@ export function usePublishForm(options: UsePublishFormOptions) { early_morning_response: stringValue(summary.early_morning_response) || '否', can_change_game_name: stringValue(summary.can_change_game_name), all_hero: stringValue(summary.all_hero), + next_season_pass: stringValue(summary.next_season_pass), ban_record: stringValue(summary.ban_record), common_regions: stringArray(summary.common_regions), depositAmountYuan: listing.deposit_amount_cent > 0 ? listing.deposit_amount_cent / 100 : '', @@ -723,6 +724,7 @@ export function usePublishForm(options: UsePublishFormOptions) { if (pricing.banRecordOptions.value.length && !form.ban_record) return '请选择封禁记录' if (!form.can_change_game_name) return '请选择是否可以修改游戏名' if (!form.all_hero) return '请选择是否有全英雄' + if (!form.next_season_pass) return '请选择下赛季是否购买通行证' if (form.depositAmountYuan === '' || Number(form.depositAmountYuan) < 0) return '请填写押金' if (!Number.isFinite(Number(form.depositAmountYuan))) return '押金格式不正确' if ( @@ -825,6 +827,7 @@ export function usePublishForm(options: UsePublishFormOptions) { early_morning_response: form.early_morning_response, can_change_game_name: form.can_change_game_name, all_hero: form.all_hero, + next_season_pass: form.next_season_pass, 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 b9bd082..4af2a98 100644 --- a/frontend/src/features/seller/views/MobileSellerListingCreateView.vue +++ b/frontend/src/features/seller/views/MobileSellerListingCreateView.vue @@ -121,6 +121,7 @@ function selectRadio(value: T, setter: (value: T) => void) { const canChangeGameNameOptions = ['是', '否'] const allHeroOptions = ['是', '否'] +const nextSeasonPassOptions = ['购买', '不购买'] const earlyMorningResponseOptions = ['是', '否'] // 在线时间:通栏自定义块 + 底部时间选择,避免 van-field 窄列截断原生 time @@ -440,6 +441,23 @@ const screenshotGuides: Record = { + + + +
diff --git a/frontend/src/features/seller/views/SellerListingCreateView.vue b/frontend/src/features/seller/views/SellerListingCreateView.vue index 6e77b8d..ffc5136 100644 --- a/frontend/src/features/seller/views/SellerListingCreateView.vue +++ b/frontend/src/features/seller/views/SellerListingCreateView.vue @@ -120,6 +120,7 @@ const activeAgreementContent = computed(() => activeAgreement.value?.content || const canChangeGameNameOptions = ['是', '否'] const allHeroOptions = ['是', '否'] +const nextSeasonPassOptions = ['购买', '不购买'] const earlyMorningResponseOptions = ['是', '否'] // 截图槽位的指导示例图(仅展示、点击放大,不占用上传数量) @@ -356,6 +357,15 @@ function selectDailyLoss(value: string | number) { />
+
+ + +
+
diff --git a/frontend/src/shared/types/publish.ts b/frontend/src/shared/types/publish.ts index 1399965..8821cea 100644 --- a/frontend/src/shared/types/publish.ts +++ b/frontend/src/shared/types/publish.ts @@ -21,6 +21,8 @@ export type PublishForm = { can_change_game_name: string /** 是否有全英雄(是/否) */ all_hero: string + /** 下赛季是否购买通行证(购买/不购买) */ + next_season_pass: string ban_record: string common_regions: string[] depositAmountYuan: number | ''