feat: C端展示区改为单张居中无缝轮播并接入PhotoSwipe图片视频查看器,轮播间隔支持后台配置
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -307,6 +307,8 @@
|
||||
"appName": "Platform Name",
|
||||
"logRetentionDays": "Log Retention (days)",
|
||||
"watermarkText": "Certificate Watermark",
|
||||
"carouselInterval": "H5 Carousel Interval (s)",
|
||||
"carouselIntervalHint": "Seconds each media stays; decimals allowed. 0 disables auto-advance (manual loop still works).",
|
||||
"saved": "Settings saved"
|
||||
},
|
||||
"profile": {
|
||||
|
||||
@@ -307,6 +307,8 @@
|
||||
"appName": "平台名称",
|
||||
"logRetentionDays": "日志保留天数",
|
||||
"watermarkText": "证书水印文案",
|
||||
"carouselInterval": "C 端轮播间隔(秒)",
|
||||
"carouselIntervalHint": "每张媒体停留秒数,支持小数;填 0 则不自动切换(仍可手动循环切换)",
|
||||
"saved": "设置已保存"
|
||||
},
|
||||
"profile": {
|
||||
|
||||
@@ -11,6 +11,19 @@
|
||||
<n-form-item :label="t('pages.settings.watermarkText')">
|
||||
<n-input v-model:value="form.watermarkText" />
|
||||
</n-form-item>
|
||||
<n-form-item :label="t('pages.settings.carouselInterval')">
|
||||
<div style="display: flex; flex-direction: column; gap: 4px">
|
||||
<n-input-number
|
||||
v-model:value="form.carouselInterval"
|
||||
:min="0"
|
||||
:max="30"
|
||||
:step="0.5"
|
||||
:precision="1"
|
||||
style="width: 220px"
|
||||
/>
|
||||
<span style="font-size: 12px; color: #999">{{ t('pages.settings.carouselIntervalHint') }}</span>
|
||||
</div>
|
||||
</n-form-item>
|
||||
<n-button type="primary" :loading="saving" @click="save">{{ t('common.action.save') }}</n-button>
|
||||
</n-form>
|
||||
</n-card>
|
||||
@@ -25,10 +38,16 @@ import { message } from '@/utils/feedback';
|
||||
|
||||
const { t } = useI18n();
|
||||
const saving = ref(false);
|
||||
const form = reactive<{ appName: string; logRetentionDays: number; watermarkText: string }>({
|
||||
const form = reactive<{
|
||||
appName: string;
|
||||
logRetentionDays: number;
|
||||
watermarkText: string;
|
||||
carouselInterval: number;
|
||||
}>({
|
||||
appName: '',
|
||||
logRetentionDays: 365,
|
||||
watermarkText: '',
|
||||
carouselInterval: 3,
|
||||
});
|
||||
|
||||
async function load() {
|
||||
@@ -36,6 +55,7 @@ async function load() {
|
||||
form.appName = s.appName || '';
|
||||
form.logRetentionDays = Number(s.logRetentionDays || 365);
|
||||
form.watermarkText = s.watermarkText || '';
|
||||
form.carouselInterval = Number(s.carouselInterval ?? 3);
|
||||
}
|
||||
async function save() {
|
||||
saving.value = true;
|
||||
@@ -44,6 +64,7 @@ async function save() {
|
||||
appName: form.appName,
|
||||
logRetentionDays: String(form.logRetentionDays),
|
||||
watermarkText: form.watermarkText,
|
||||
carouselInterval: String(form.carouselInterval),
|
||||
});
|
||||
message.success(t('pages.settings.saved'));
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user