feat(listing): 发布新增「是否解锁德穆兰」必填项,首页优先替换全英雄展示

This commit is contained in:
yml2213
2026-10-16 13:07:25 +08:00
parent b7b68abf6b
commit 703deb17d0
8 changed files with 73 additions and 2 deletions
@@ -20,6 +20,7 @@ export function defaultPublishForm(): PublishForm {
early_morning_response: '否',
can_change_game_name: '',
all_hero: '',
unlock_demulan: '',
next_season_pass: '',
ban_record: '',
common_regions: [],
@@ -320,6 +320,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),
unlock_demulan: stringValue(summary.unlock_demulan),
next_season_pass: stringValue(summary.next_season_pass),
ban_record: stringValue(summary.ban_record),
common_regions: stringArray(summary.common_regions),
@@ -733,6 +734,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.unlock_demulan) return '请选择是否解锁德穆兰'
if (nextSeasonPassEnabled.value && !form.next_season_pass) {
return '请选择下赛季是否购买通行证'
}
@@ -838,6 +840,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,
unlock_demulan: form.unlock_demulan,
next_season_pass: form.next_season_pass,
ban_record: form.ban_record,
common_regions: form.common_regions,
@@ -123,6 +123,7 @@ function selectRadio<T extends string>(value: T, setter: (value: T) => void) {
const canChangeGameNameOptions = ['是', '否']
const allHeroOptions = ['是', '否']
const demulanUnlockOptions = ['是', '否']
const nextSeasonPassOptions = ['购买', '不购买']
const earlyMorningResponseOptions = ['是', '否']
@@ -443,6 +444,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 demulanUnlockOptions"
:key="opt"
type="button"
class="radio-btn"
:class="{ active: form.unlock_demulan === opt }"
@click="selectRadio(opt, value => (form.unlock_demulan = value))"
>
{{ opt }}
</button>
</div>
</template>
</van-field>
<van-field
v-if="nextSeasonPassEnabled"
label="下赛季是否购买通行证"
@@ -122,6 +122,7 @@ const activeAgreementContent = computed(() => activeAgreement.value?.content ||
const canChangeGameNameOptions = ['是', '否']
const allHeroOptions = ['是', '否']
const demulanUnlockOptions = ['是', '否']
const nextSeasonPassOptions = ['购买', '不购买']
const earlyMorningResponseOptions = ['是', '否']
@@ -359,6 +360,15 @@ function selectDailyLoss(value: string | number) {
/>
</div>
<div class="field-row panel-field-row">
<label>是否解锁德穆兰<span>*</span></label>
<OptionChips
:options="demulanUnlockOptions"
:model-value="form.unlock_demulan"
@select="form.unlock_demulan = String($event)"
/>
</div>
<div v-if="nextSeasonPassEnabled" class="field-row panel-field-row">
<label>下赛季是否购买通行证<span>*</span></label>
<OptionChips