优化首页返回定位与发布在线时间表单
移动端首页用列表缓存和内部滚动恢复浏览位置;发布页在线时间改为全天+起止时间单行布局。
This commit is contained in:
@@ -10,7 +10,6 @@ import GuideImage from '@/components/GuideImage.vue'
|
||||
import tencentSecurityGuide from '@/assets/tencent-security-guide.webp'
|
||||
|
||||
const {
|
||||
commonOnlineTimes,
|
||||
dailyLossOptions,
|
||||
formatNumber,
|
||||
router,
|
||||
@@ -32,8 +31,6 @@ const {
|
||||
quantityValues,
|
||||
quantityModes,
|
||||
selectedSkins,
|
||||
disabledOnlineStartOptions,
|
||||
disabledOnlineEndOptions,
|
||||
serverOptions,
|
||||
faceOptions,
|
||||
rankOptions,
|
||||
@@ -73,11 +70,7 @@ const {
|
||||
canAddScreenshot,
|
||||
getScreenshotLimitHint,
|
||||
isAllDayOnline,
|
||||
isOnlineStartPresetActive,
|
||||
isOnlineEndPresetActive,
|
||||
selectAllDayOnline,
|
||||
selectOnlineStart,
|
||||
selectOnlineEnd,
|
||||
handleOnlineStartChange,
|
||||
handleOnlineEndChange,
|
||||
handleFireLevelInput,
|
||||
@@ -386,17 +379,9 @@ const screenshotGuides: Record<string, string> = {
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<div class="time-row">
|
||||
<div class="time-field-group">
|
||||
<van-field
|
||||
v-model="form.online_start"
|
||||
label="在线开始"
|
||||
required
|
||||
type="time"
|
||||
class="publish-field time-field"
|
||||
@update:model-value="handleOnlineStartChange"
|
||||
/>
|
||||
<div class="radio-group small time-preset-chips">
|
||||
<van-field label="在线时间" required class="publish-field online-time-field">
|
||||
<template #input>
|
||||
<div class="online-time-controls">
|
||||
<button
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
@@ -405,57 +390,26 @@ const screenshotGuides: Record<string, string> = {
|
||||
>
|
||||
全天
|
||||
</button>
|
||||
<button
|
||||
v-for="opt in commonOnlineTimes"
|
||||
:key="`start-${opt}`"
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{
|
||||
active: isOnlineStartPresetActive(opt),
|
||||
disabled: disabledOnlineStartOptions.includes(opt),
|
||||
}"
|
||||
:disabled="disabledOnlineStartOptions.includes(opt)"
|
||||
@click="selectOnlineStart(opt)"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
<div class="online-time-range">
|
||||
<input
|
||||
v-model="form.online_start"
|
||||
type="time"
|
||||
class="online-time-input"
|
||||
aria-label="在线开始时间"
|
||||
@change="handleOnlineStartChange(form.online_start)"
|
||||
/>
|
||||
<span class="online-time-sep">至</span>
|
||||
<input
|
||||
v-model="form.online_end"
|
||||
type="time"
|
||||
class="online-time-input"
|
||||
aria-label="在线结束时间"
|
||||
@change="handleOnlineEndChange(form.online_end)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="time-field-group">
|
||||
<van-field
|
||||
v-model="form.online_end"
|
||||
label="在线结束"
|
||||
required
|
||||
type="time"
|
||||
class="publish-field time-field"
|
||||
@update:model-value="handleOnlineEndChange"
|
||||
/>
|
||||
<div class="radio-group small time-preset-chips">
|
||||
<button
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{ active: isAllDayOnline() }"
|
||||
@click="selectAllDayOnline"
|
||||
>
|
||||
全天
|
||||
</button>
|
||||
<button
|
||||
v-for="opt in commonOnlineTimes"
|
||||
:key="`end-${opt}`"
|
||||
type="button"
|
||||
class="radio-btn"
|
||||
:class="{
|
||||
active: isOnlineEndPresetActive(opt),
|
||||
disabled: disabledOnlineEndOptions.includes(opt),
|
||||
}"
|
||||
:disabled="disabledOnlineEndOptions.includes(opt)"
|
||||
@click="selectOnlineEnd(opt)"
|
||||
>
|
||||
{{ opt }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-field>
|
||||
<p class="field-hint">
|
||||
此在线时间指的是百分百能够联系上您的时间,若是在此期间联系不上您导致无法上号会扣除您的部分订单金额或上架押金,在线时长太短可能无法上架,请预留充足时间用于扫码以及冻结人脸,请谨慎填写
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user