feat(auth): 实现自动登录功能并优化API请求配置

- 在App.vue中添加onMounted钩子自动执行autoLogin函数
- 新增auth.js工具模块实现自动登录逻辑
- 配置API请求优先从localStorage获取Token
- 添加对localStorage和Cookie中Token的兼容性处理
- 集成echarts-china-map依赖包
- 移除测试用硬编码Token和调试日志
- 统一API基础路径为/api
- 添加Docker部署配置文件和nginx反向代理设置
This commit is contained in:
2026-06-11 14:32:28 +08:00
parent 6114d989bc
commit ab43fa2457
8 changed files with 131 additions and 32 deletions

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# ============================================
# Docker 部署 - 数据大屏管理系统
# 使用 Nginx 托管前端 + 反向代理 API
# ============================================
FROM nginx:alpine
# 将构建好的前端静态文件复制到 Nginx
COPY dist/ /usr/share/nginx/html/
# 替换 Nginx 配置
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 18800
CMD ["nginx", "-g", "daemon off;"]