fix: production deployment improvements and configuration fixes

## 主要改动

### 1. 修复二维码地址硬编码问题
- 将 MainDisplay.vue 中硬编码的移动端 URL 改为环境变量配置
- 添加 VITE_MOBILE_URL 环境变量支持
- 支持通过 .env 文件动态配置移动端地址

### 2. 修复音频文件路径问题
- 修正 display.ts 中音频文件路径,添加 /screen 前缀
- 修复 BGM、抽奖音效、胜利音效的加载路径

### 3. 修复 Docker 构建问题
- 添加中国 npm 镜像配置,解决构建超时问题
- 修复缺失的 tsconfig.base.json 文件拷贝
- 修复 Redis 环境变量配置(REDIS_HOST/REDIS_PORT)
- 添加 Lua 脚本文件拷贝到生产容器

### 4. 修复前端路由和资源加载
- 添加 Vite base path 配置 (/screen/)
- 修复 Vue Router base path 配置
- 修正 Caddyfile 路由顺序,确保 /screen 路径优先匹配

### 5. 修复 TypeScript 编译错误
- LuckyDrawView.vue: 添加 round 属性类型定义
- ProgramCard.vue: 添加非空断言处理

### 6. 修复 SCSS 变量问题
- 替换未定义的 SCSS 变量为硬编码颜色值
- 修复 VoteView、ConnectionStatus、HomeView、ScanLoginView 中的样式问题

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-26 16:59:02 +08:00
parent 4d621b5901
commit 371f117064
16 changed files with 68 additions and 39 deletions

View File

@@ -66,7 +66,7 @@ const statusText = computed(() => {
}
.latency {
color: $color-text-muted;
color: #999;
font-size: $font-size-xs;
}

View File

@@ -162,7 +162,7 @@ function delay(ms: number): Promise<void> {
<Postmark
v-if="hasStamp && stampInfo"
:award-name="stampInfo.name"
:award-icon-key="stampedWith"
:award-icon-key="stampedWith!"
:user-name="connectionStore.userName || ''"
color="gold"
class="applied-stamp"

View File

@@ -289,7 +289,7 @@ async function handleEnter() {
.footer {
text-align: center;
padding: $spacing-md;
color: $color-text-muted;
color: #999;
font-size: $font-size-xs;
}
</style>

View File

@@ -263,7 +263,7 @@ async function handleSubmit() {
.footer {
text-align: center;
padding: 16px;
color: $color-text-muted;
color: #999;
font-size: 12px;
}
</style>

View File

@@ -173,7 +173,7 @@ onMounted(() => {
}
.logout-btn {
color: $color-text-muted;
color: #999;
cursor: pointer;
padding: 2px 6px;
border-radius: 4px;
@@ -181,7 +181,7 @@ onMounted(() => {
&:active {
background: rgba(255, 255, 255, 0.1);
color: $color-text-light;
color: #fff;
}
}