feat: add next season pass publish option

This commit is contained in:
yml2213
2026-08-28 18:23:14 +08:00
parent cdab2d8157
commit 006f93a0e7
5 changed files with 34 additions and 0 deletions
@@ -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: '',
@@ -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,
@@ -121,6 +121,7 @@ function selectRadio<T extends string>(value: T, setter: (value: T) => void) {
const canChangeGameNameOptions = ['是', '否']
const allHeroOptions = ['是', '否']
const nextSeasonPassOptions = ['购买', '不购买']
const earlyMorningResponseOptions = ['是', '否']
// 在线时间:通栏自定义块 + 底部时间选择,避免 van-field 窄列截断原生 time
@@ -440,6 +441,23 @@ const screenshotGuides: Record<string, string> = {
</template>
</van-field>
<van-field label="下赛季是否购买通行证" required class="publish-field">
<template #input>
<div class="radio-group">
<button
v-for="opt in nextSeasonPassOptions"
:key="opt"
type="button"
class="radio-btn"
:class="{ active: form.next_season_pass === opt }"
@click="selectRadio(opt, value => (form.next_season_pass = value))"
>
{{ opt }}
</button>
</div>
</template>
</van-field>
<div class="online-time-block">
<div class="online-time-head">
<div class="online-time-title">
@@ -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) {
/>
</div>
<div class="field-row panel-field-row">
<label>下赛季是否购买通行证<span>*</span></label>
<OptionChips
:options="nextSeasonPassOptions"
:model-value="form.next_season_pass"
@select="form.next_season_pass = String($event)"
/>
</div>
<div class="field-row panel-field-row online-time-row">
<label>在线时间<span>*</span></label>
<div class="online-time-body">
+2
View File
@@ -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 | ''