融易诚
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.6 KiB

2 days ago
# jf_202506
#### 介绍
202506小程序交付
#### 软件架构
taro react
### 依赖工具
+ **开发框架**:[tarojs@4.1.2](https://docs.taro.zone/docs/)
+ **基础架构**:[react@18.0](https://reactjs.org/)
+ **ui框架**:[antd-mobile@5.39](https://mobile.ant.design/zh)
### 项目启动
1. node > ver.18
2. 安装yarn@1.22.19,执行`yarn install`
3. 执行`npm run dev:h5`,本地启动
4. 执行`npm run build:h5`,打包编译
### 项目部署
1. 本地构建
```bash
// 1. git 操作拉取项目,此处省略...
// 2. 进入到项目根目录
yarn install
// 3. 编译构建
npm run build:h5
```
2. 登录宝塔平台
3. 网站/HTML项目 下 添加HTML项目
![image-20250708103317051](.\docs\image-20250708103317051.png)
4. 修改nginx配置文件
![image-20250708103453330](.\docs\image-20250708103453330.png)
```nginx
location ^~/api {
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;
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 86400s;
send_timeout 86400s;
client_max_body_size 50m;
# 这里改成 [对应的域名 + /api]
proxy_pass https://he.lehuonianhua.com/api;
}
```
5. 上传生产包
![image-20250708104053513](.\docs\image-20250708104053513.png)
6. 重启nginx
![image-20250708104244826](.\docs\image-20250708104244826.png)
## 讨论
联系人:jinech 13478707150@163.com