# idc-fe **Repository Path**: TimengHero/idc-fe ## Basic Information - **Project Name**: idc-fe - **Description**: No description available - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-12-27 - **Last Updated**: 2025-01-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 平台简介 - 本仓库为前端技术栈 [Vue3](https://v3.cn.vuejs.org) + [TS](https://www.typescriptlang.org/) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev) 版本。 - 成员项目: 基于 vben(ant-design-vue) 的前端项目 [ruoyi-plus-vben](https://gitee.com/dapppp/ruoyi-plus-vben) - 配套后端代码仓库地址 - [tj-zzlb-be](ssh://git@10.18.34.55:16822/ZWFZYJS/TJ-OT-PROJECT/SourceCode/tj-zzlb-fe.git) ## 前端运行 ```bash # 克隆项目 git clone ssh://git@127.0.0.1/idc-fe.git # 安装依赖 npm install --registry=https://registry.npmmirror.com # 启动服务 npm run dev # 构建生产环境 npm run build:prod # 前端访问地址 http://localhost:80/idc/ ``` ## 前端部署 - 若要变更应用上下文(idcfe),只需改变 .env.production 文件中 VITE_APP_CONTEXT_PATH = '/idcfe/' 的属性值即可 - 将打包后生成的部署资源文件(idcfe目录下的所有文件)拷贝至 nginx 对应静态资源文件夹 html 目录下 - 修改 nginx 配置文件,新增如下配置 ``` server { listen 80; server_name localhost; # 新增idcfe begin location /idcfe { alias /usr/share/nginx/html/idcfe; # docker映射路径 不允许更改 try_files $uri $uri/ /idcfe/index.html; index index.html index.htm; } location /prod-api/ { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header REMOTE-HOST $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # websocket参数 proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_pass http://tomcat8082Stream/; } # 新增idcfe end } ```