feat: C端展示区改为单张居中无缝轮播并接入PhotoSwipe图片视频查看器,轮播间隔支持后台配置

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Nixevol
2026-06-30 19:09:13 +08:00
co-authored by Cursor
parent f8430bda90
commit 6141086ecf
11 changed files with 539 additions and 404 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ export class SettingsController {
@ApiOperation({ summary: '获取公开设置(应用名等)' })
async getPublic() {
const all = await this.settingsService.getAll();
return { appName: all.appName };
return { appName: all.appName, carouselInterval: all.carouselInterval };
}
@ApiBearerAuth()
+3 -1
View File
@@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PrismaService } from '../prisma/prisma.service';
const EDITABLE_KEYS = ['appName', 'logRetentionDays', 'watermarkText'];
const EDITABLE_KEYS = ['appName', 'logRetentionDays', 'watermarkText', 'carouselInterval'];
@Injectable()
export class SettingsService {
@@ -17,6 +17,8 @@ export class SettingsService {
appName: this.config.get<string>('appName') || '',
logRetentionDays: String(this.config.get<number>('logRetentionDays') || 365),
watermarkText: this.config.get<string>('watermarkText') || '仅供溯源核验使用',
// C 端顶部媒体轮播:单张停留秒数(支持小数),0 表示不自动切换
carouselInterval: '3',
};
for (const r of rows) map[r.key] = r.value;
return map;