Appearance
概述
PC 电脑端前端源码位于 view/pc/ 目录。基于 Vue 2 构建,构建产物输出至 public/home/ 目录下。
环境准备
- Node.js:推荐 Node.js
14.x或16.x - 包管理器:
npm/yarn
本地开发与调试
- 进入 PC 端目录:bash
cd view/pc - 安装依赖:bash
npm install - 启动开发服务:bash
npm run serve
生产打包与部署
- 执行打包命令:bash
npm run build - 打包完成后产物位于
view/pc/dist/。 - 将
dist目录内的所有文件复制到后端站点的public/home/目录下。
Nginx 配置参考
nginx
location /home {
try_files $uri $uri/ /home/index.html;
}