增加账号凌晨响应标记

This commit is contained in:
yml2213
2026-08-18 20:39:13 +08:00
parent 1f204f17ad
commit c4507caf37
13 changed files with 79 additions and 70 deletions
@@ -136,7 +136,7 @@ const zoneOptions = computed(() => [
{
key: 'night',
label: '夜间专区',
hint: '0-8点可上号',
hint: '0-2点可响应上号',
count: zoneCount('night'),
},
{
@@ -104,7 +104,7 @@ const zoneOptions = [
{ key: 'all', label: '全部', hint: '当前可租' },
{ key: 'sale', label: '特惠', hint: '价格更划算' },
{ key: 'gift', label: '赠送', hint: '含赠送物品' },
{ key: 'night', label: '夜间', hint: '0-8点可上号' },
{ key: 'night', label: '夜间', hint: '0-2点可响应上号' },
{ key: 'password', label: '账密', hint: '交接更快' },
{ key: 'highCoin', label: '高币', hint: '100M以上' },
]
@@ -17,6 +17,7 @@ export function defaultPublishForm(): PublishForm {
login_method: '',
online_start: '',
online_end: '',
early_morning_response: '否',
can_change_game_name: '',
all_hero: '',
ban_record: '',
@@ -308,6 +308,7 @@ export function usePublishForm(options: UsePublishFormOptions) {
login_method: listing.login_platform || '',
online_start: stringValue(onlineTime.start),
online_end: stringValue(onlineTime.end),
early_morning_response: stringValue(summary.early_morning_response) || '否',
can_change_game_name: stringValue(summary.can_change_game_name),
all_hero: stringValue(summary.all_hero),
ban_record: stringValue(summary.ban_record),
@@ -700,6 +701,9 @@ export function usePublishForm(options: UsePublishFormOptions) {
if (!dailyLossOptions.includes(pricing.dailyLossMAmount.value)) return '请选择每日损耗'
const onlineTimeError = validateOnlineTime()
if (onlineTimeError) return onlineTimeError
if (form.early_morning_response !== '是' && form.early_morning_response !== '否') {
return '请选择凌晨0-2点是否可响应上号'
}
if (pricing.hasAcceleratedSaleRatioInput()) {
const ratio = Number(form.accelerated_sale_ratio)
if (!Number.isFinite(ratio) || ratio <= 0) return '加速出售比例格式不正确'
@@ -818,6 +822,7 @@ export function usePublishForm(options: UsePublishFormOptions) {
start: form.online_start,
end: form.online_end,
},
early_morning_response: form.early_morning_response,
can_change_game_name: form.can_change_game_name,
all_hero: form.all_hero,
ban_record: form.ban_record,
@@ -88,6 +88,10 @@
font-size: 16px;
}
.early-morning-response-field :deep(.van-field__label) {
width: 128px;
}
.hint-label,
.backend-hint-target.has-hint,
.upload-title.has-hint {
@@ -121,6 +121,7 @@ function selectRadio<T extends string>(value: T, setter: (value: T) => void) {
const canChangeGameNameOptions = ['是', '否']
const allHeroOptions = ['是', '否']
const earlyMorningResponseOptions = ['是', '否']
// 在线时间:通栏自定义块 + 底部时间选择,避免 van-field 窄列截断原生 time
const onlineTimePickerVisible = ref(false)
@@ -481,6 +482,27 @@ const screenshotGuides: Record<string, string> = {
请填写能百分百联系上您的时间该时段联系不上可能影响上架或扣款请预留扫码与冻结人脸时间
</p>
<van-field
label="凌晨0-2点可响应上号"
required
class="publish-field early-morning-response-field"
>
<template #input>
<div class="radio-group">
<button
v-for="opt in earlyMorningResponseOptions"
:key="opt"
type="button"
class="radio-btn"
:class="{ active: form.early_morning_response === opt }"
@click="selectRadio(opt, value => (form.early_morning_response = value))"
>
{{ opt }}
</button>
</div>
</template>
</van-field>
<van-popup v-model:show="onlineTimePickerVisible" position="bottom" round teleport="body">
<van-time-picker
v-model="onlineTimePickerValue"
@@ -376,6 +376,10 @@
align-items: start;
}
.early-morning-response-row {
grid-template-columns: 150px minmax(0, 1fr);
}
.online-time-body {
display: flex;
flex-direction: column;
@@ -120,6 +120,7 @@ const activeAgreementContent = computed(() => activeAgreement.value?.content ||
const canChangeGameNameOptions = ['是', '否']
const allHeroOptions = ['是', '否']
const earlyMorningResponseOptions = ['是', '否']
// 截图槽位的指导示例图(仅展示、点击放大,不占用上传数量)
const screenshotGuides: Record<string, string> = {
@@ -396,6 +397,15 @@ function selectDailyLoss(value: string | number) {
</div>
</div>
<div class="field-row panel-field-row early-morning-response-row">
<label>凌晨0-2点可响应上号<span>*</span></label>
<OptionChips
:options="earlyMorningResponseOptions"
:model-value="form.early_morning_response"
@select="form.early_morning_response = String($event)"
/>
</div>
<div v-if="banRecordOptions.length" class="field-row panel-field-row">
<label>封禁记录<span>*</span></label>
<OptionChips
+2
View File
@@ -15,6 +15,8 @@ export type PublishForm = {
login_method: string
online_start: string
online_end: string
/** 是否可在凌晨 0-2 点响应上号(是/否) */
early_morning_response: string
/** 是否可以修改游戏名(是/否) */
can_change_game_name: string
/** 是否有全英雄(是/否) */