替换游戏名修改属性
This commit is contained in:
@@ -98,7 +98,7 @@ const primaryRows = computed(() => {
|
|||||||
{ label: '方便上号时段', value: formatOnlineTime(a.online_time) },
|
{ label: '方便上号时段', value: formatOnlineTime(a.online_time) },
|
||||||
{ label: '常用登录地', value: regions.length ? regions.join('、') : '--' },
|
{ label: '常用登录地', value: regions.length ? regions.join('、') : '--' },
|
||||||
{ label: '人脸归属', value: formatScalar(a.face_owner) },
|
{ label: '人脸归属', value: formatScalar(a.face_owner) },
|
||||||
{ label: '是否解锁赛季', value: formatScalar(a.unlock_said) },
|
{ label: '是否可以修改游戏名', value: formatScalar(a.can_change_game_name) },
|
||||||
{
|
{
|
||||||
label: '封禁记录',
|
label: '封禁记录',
|
||||||
value: formatScalar(a.ban_record) === '--' ? '无' : formatScalar(a.ban_record),
|
value: formatScalar(a.ban_record) === '--' ? '无' : formatScalar(a.ban_record),
|
||||||
@@ -141,6 +141,7 @@ const extraRows = computed(() => {
|
|||||||
'skin_groups',
|
'skin_groups',
|
||||||
'screenshot_groups',
|
'screenshot_groups',
|
||||||
'online_time',
|
'online_time',
|
||||||
|
'can_change_game_name',
|
||||||
'unlock_said',
|
'unlock_said',
|
||||||
'ban_record',
|
'ban_record',
|
||||||
'common_regions',
|
'common_regions',
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function defaultPublishForm(): PublishForm {
|
|||||||
login_method: '',
|
login_method: '',
|
||||||
online_start: '',
|
online_start: '',
|
||||||
online_end: '',
|
online_end: '',
|
||||||
unlock_said: '',
|
can_change_game_name: '',
|
||||||
all_hero: '',
|
all_hero: '',
|
||||||
ban_record: '',
|
ban_record: '',
|
||||||
common_regions: [],
|
common_regions: [],
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ export function usePublishForm(options: UsePublishFormOptions) {
|
|||||||
login_method: listing.login_platform || '',
|
login_method: listing.login_platform || '',
|
||||||
online_start: stringValue(onlineTime.start),
|
online_start: stringValue(onlineTime.start),
|
||||||
online_end: stringValue(onlineTime.end),
|
online_end: stringValue(onlineTime.end),
|
||||||
unlock_said: stringValue(summary.unlock_said),
|
can_change_game_name: stringValue(summary.can_change_game_name),
|
||||||
all_hero: stringValue(summary.all_hero),
|
all_hero: stringValue(summary.all_hero),
|
||||||
ban_record: stringValue(summary.ban_record),
|
ban_record: stringValue(summary.ban_record),
|
||||||
common_regions: stringArray(summary.common_regions),
|
common_regions: stringArray(summary.common_regions),
|
||||||
@@ -717,7 +717,7 @@ export function usePublishForm(options: UsePublishFormOptions) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pricing.banRecordOptions.value.length && !form.ban_record) return '请选择封禁记录'
|
if (pricing.banRecordOptions.value.length && !form.ban_record) return '请选择封禁记录'
|
||||||
if (!form.unlock_said) return '请选择是否解锁赛伊德'
|
if (!form.can_change_game_name) return '请选择是否可以修改游戏名'
|
||||||
if (!form.all_hero) return '请选择是否有全英雄'
|
if (!form.all_hero) return '请选择是否有全英雄'
|
||||||
if (form.depositAmountYuan === '' || Number(form.depositAmountYuan) < 0) return '请填写押金'
|
if (form.depositAmountYuan === '' || Number(form.depositAmountYuan) < 0) return '请填写押金'
|
||||||
if (!Number.isFinite(Number(form.depositAmountYuan))) return '押金格式不正确'
|
if (!Number.isFinite(Number(form.depositAmountYuan))) return '押金格式不正确'
|
||||||
@@ -818,7 +818,7 @@ export function usePublishForm(options: UsePublishFormOptions) {
|
|||||||
start: form.online_start,
|
start: form.online_start,
|
||||||
end: form.online_end,
|
end: form.online_end,
|
||||||
},
|
},
|
||||||
unlock_said: form.unlock_said,
|
can_change_game_name: form.can_change_game_name,
|
||||||
all_hero: form.all_hero,
|
all_hero: form.all_hero,
|
||||||
ban_record: form.ban_record,
|
ban_record: form.ban_record,
|
||||||
common_regions: form.common_regions,
|
common_regions: form.common_regions,
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ function selectRadio<T extends string>(value: T, setter: (value: T) => void) {
|
|||||||
setter(value)
|
setter(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
const unlockSaidOptions = ['是', '否']
|
const canChangeGameNameOptions = ['是', '否']
|
||||||
const allHeroOptions = ['是', '否']
|
const allHeroOptions = ['是', '否']
|
||||||
|
|
||||||
// 在线时间:通栏自定义块 + 底部时间选择,避免 van-field 窄列截断原生 time
|
// 在线时间:通栏自定义块 + 底部时间选择,避免 van-field 窄列截断原生 time
|
||||||
@@ -405,16 +405,16 @@ const screenshotGuides: Record<string, string> = {
|
|||||||
}}
|
}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<van-field label="解锁赛伊德" required class="publish-field">
|
<van-field label="是否可以修改游戏名" required class="publish-field">
|
||||||
<template #input>
|
<template #input>
|
||||||
<div class="radio-group">
|
<div class="radio-group">
|
||||||
<button
|
<button
|
||||||
v-for="opt in unlockSaidOptions"
|
v-for="opt in canChangeGameNameOptions"
|
||||||
:key="opt"
|
:key="opt"
|
||||||
type="button"
|
type="button"
|
||||||
class="radio-btn"
|
class="radio-btn"
|
||||||
:class="{ active: form.unlock_said === opt }"
|
:class="{ active: form.can_change_game_name === opt }"
|
||||||
@click="selectRadio(opt, value => (form.unlock_said = value))"
|
@click="selectRadio(opt, value => (form.can_change_game_name = value))"
|
||||||
>
|
>
|
||||||
{{ opt }}
|
{{ opt }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -102,6 +102,10 @@
|
|||||||
color: var(--color-danger);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.can-change-game-name-row > label {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.field-hint {
|
.field-hint {
|
||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ const activeAgreement = ref<AgreementContent | null>(null)
|
|||||||
const activeAgreementTitle = computed(() => activeAgreement.value?.title || '协议内容')
|
const activeAgreementTitle = computed(() => activeAgreement.value?.title || '协议内容')
|
||||||
const activeAgreementContent = computed(() => activeAgreement.value?.content || '')
|
const activeAgreementContent = computed(() => activeAgreement.value?.content || '')
|
||||||
|
|
||||||
const unlockSaidOptions = ['是', '否']
|
const canChangeGameNameOptions = ['是', '否']
|
||||||
const allHeroOptions = ['是', '否']
|
const allHeroOptions = ['是', '否']
|
||||||
|
|
||||||
// 截图槽位的指导示例图(仅展示、点击放大,不占用上传数量)
|
// 截图槽位的指导示例图(仅展示、点击放大,不占用上传数量)
|
||||||
@@ -337,12 +337,12 @@ function selectDailyLoss(value: string | number) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-row panel-field-row">
|
<div class="field-row panel-field-row can-change-game-name-row">
|
||||||
<label>解锁赛伊德<span>*</span></label>
|
<label>是否可以修改游戏名<span>*</span></label>
|
||||||
<OptionChips
|
<OptionChips
|
||||||
:options="unlockSaidOptions"
|
:options="canChangeGameNameOptions"
|
||||||
:model-value="form.unlock_said"
|
:model-value="form.can_change_game_name"
|
||||||
@select="form.unlock_said = String($event)"
|
@select="form.can_change_game_name = String($event)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ export type PublishForm = {
|
|||||||
login_method: string
|
login_method: string
|
||||||
online_start: string
|
online_start: string
|
||||||
online_end: string
|
online_end: string
|
||||||
unlock_said: string
|
/** 是否可以修改游戏名(是/否) */
|
||||||
|
can_change_game_name: string
|
||||||
/** 是否有全英雄(是/否) */
|
/** 是否有全英雄(是/否) */
|
||||||
all_hero: string
|
all_hero: string
|
||||||
ban_record: string
|
ban_record: string
|
||||||
|
|||||||
@@ -150,9 +150,9 @@ export function getListingChips(item: Listing): ListingDisplayChip[] {
|
|||||||
if (online) {
|
if (online) {
|
||||||
chips.push({ label: '方便上号', value: online })
|
chips.push({ label: '方便上号', value: online })
|
||||||
}
|
}
|
||||||
// 解锁赛伊德为必选项,仅在号主勾选「是」时展示
|
// 仅在号主确认可修改游戏名时展示。
|
||||||
if (readAssetString(item, 'unlock_said') === '是') {
|
if (readAssetString(item, 'can_change_game_name') === '是') {
|
||||||
chips.push({ label: '解锁赛伊德', value: '是' })
|
chips.push({ label: '可修改游戏名', value: '是' })
|
||||||
}
|
}
|
||||||
// 全英雄为必选项,仅在号主勾选「是」时展示
|
// 全英雄为必选项,仅在号主勾选「是」时展示
|
||||||
if (readAssetString(item, 'all_hero') === '是') {
|
if (readAssetString(item, 'all_hero') === '是') {
|
||||||
|
|||||||
Reference in New Issue
Block a user