From e75a91fc99c94c82f84066dd4134c54d4ead6b10 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Wed, 6 Nov 2024 07:08:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 6 ++--- .env.hella13 | 14 ------------ .env.hella14 | 14 ------------ .env.hella15 | 14 ------------ .env.hella16 | 14 ------------ .env.hella8 | 15 ------------- .env.hella9 | 14 ------------ .env.production | 11 +++++----- .env.test | 12 +++++----- .env.test-dev | 15 +++++++++++++ Dockerfile_prod | 7 ------ nginx.conf | 21 ++++++++++++++++++ nginx_prod.conf | 57 ------------------------------------------------ package.json | 19 ++++++---------- 14 files changed, 58 insertions(+), 175 deletions(-) delete mode 100644 .env.hella13 delete mode 100644 .env.hella14 delete mode 100644 .env.hella15 delete mode 100644 .env.hella16 delete mode 100644 .env.hella8 delete mode 100644 .env.hella9 create mode 100644 .env.test-dev delete mode 100644 Dockerfile_prod delete mode 100644 nginx_prod.conf diff --git a/.env.development b/.env.development index faacbb33..4e262404 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ -# VITE_BASE_URL=http://localhost:12080/admin-api -VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api -VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api +VITE_BASE_URL=http://localhost:12080/admin-api +# VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api +# VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api # 租户配置 VITE_TENANT='[{"text":"英泰","value":1},{"text":"长春2379","value":3}]' diff --git a/.env.hella13 b/.env.hella13 deleted file mode 100644 index 97e83b15..00000000 --- a/.env.hella13 +++ /dev/null @@ -1,14 +0,0 @@ -VITE_BASE_URL=http://172.21.32.13:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1}]' - -# 是否是测试环境 -VITE_isDevelopment=false - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' - -# 项目管理模式 批次货/包装 -VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella14 b/.env.hella14 deleted file mode 100644 index 441178e5..00000000 --- a/.env.hella14 +++ /dev/null @@ -1,14 +0,0 @@ -VITE_BASE_URL=http://172.21.32.14:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1}]' - -# 是否是测试环境 -VITE_isDevelopment=true - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' - -# 项目管理模式 批次货/包装 -VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella15 b/.env.hella15 deleted file mode 100644 index f7c9ff07..00000000 --- a/.env.hella15 +++ /dev/null @@ -1,14 +0,0 @@ -VITE_BASE_URL=https://scp.faway-hella.com:81/api/admin-api -VITE_BASE_URL_IMAGE=https://scp.faway-hella.com:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1}]' - -# 是否是测试环境 -VITE_isDevelopment=true - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com' - -# 项目管理模式 批次货/包装 -VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella16 b/.env.hella16 deleted file mode 100644 index c84efd8f..00000000 --- a/.env.hella16 +++ /dev/null @@ -1,14 +0,0 @@ -VITE_BASE_URL=https://scptest.faway-hella.com:81/api/admin-api -VITE_BASE_URL_IMAGE=https://scptest.faway-hella.com:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' - -# 是否是测试环境 -VITE_isDevelopment=true - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com' - -# 项目管理模式 批次货/包装 -VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella8 b/.env.hella8 deleted file mode 100644 index 8851bd7c..00000000 --- a/.env.hella8 +++ /dev/null @@ -1,15 +0,0 @@ -VITE_BASE_URL=http://172.22.32.8:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' - -# 是否是测试环境 -VITE_isDevelopment=false - - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' - -# 项目管理模式 批次货/包装 -VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.hella9 b/.env.hella9 deleted file mode 100644 index 36f3d239..00000000 --- a/.env.hella9 +++ /dev/null @@ -1,14 +0,0 @@ -VITE_BASE_URL=http://172.22.32.9:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api - -# 租户配置 -VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' - -# 是否是测试环境 -VITE_isDevelopment=true - -# 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' - -# 项目管理模式 批次货/包装 -VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.production b/.env.production index 49336718..a3d9c20b 100644 --- a/.env.production +++ b/.env.production @@ -1,15 +1,14 @@ -VITE_BASE_URL=http://172.22.32.8:81/api/admin-api -VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api +VITE_BASE_URL=http://192.168.120.34:81/api/admin-api +VITE_BASE_URL_IMAGE=http://192.168.120.34:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' +VITE_TENANT='[{"text":"英泰","value":1}]' # 是否是测试环境 -VITE_isDevelopment=false - +VITE_isDevelopment=true # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' +VITE_JMREPORT_BASE_URL='http://192.168.120.34:81/api' # 项目管理模式 批次货/包装 VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.test b/.env.test index 16293197..b3c1ab1b 100644 --- a/.env.test +++ b/.env.test @@ -1,12 +1,14 @@ - -VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api -VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api +VITE_BASE_URL=http://192.168.120.35:81/api/admin-api +VITE_BASE_URL_IMAGE=http://192.168.120.35:81/admin-api # 租户配置 -VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' +VITE_TENANT='[{"text":"英泰","value":1}]' # 是否是测试环境 VITE_isDevelopment=true # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' +VITE_JMREPORT_BASE_URL='http://192.168.120.35:81/api' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/.env.test-dev b/.env.test-dev new file mode 100644 index 00000000..024ae336 --- /dev/null +++ b/.env.test-dev @@ -0,0 +1,15 @@ +VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api +VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:28051/admin-api + +# 租户配置 +VITE_TENANT='[{"text":"英泰","value":1}]' + +# 是否是测试环境 +VITE_isDevelopment=false + + +# 积木报表请求路径 +VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:28051' + +# 项目管理模式 批次货/包装 +VITE_MANAGE_MODEL="BY_BATCH" \ No newline at end of file diff --git a/Dockerfile_prod b/Dockerfile_prod deleted file mode 100644 index 116cbdac..00000000 --- a/Dockerfile_prod +++ /dev/null @@ -1,7 +0,0 @@ -# 设置基础镜像 -FROM win-nginx - -WORKDIR /opt/sfms3.0-uniapp -COPY nginx_prod.conf /usr/local/nginx/conf/nginx.conf -# 将dist/build/h5/文件中的内容复制到 /opt/sfms3.0-uniapp 这个目录下面 -COPY dist/build/h5/ /opt/sfms3.0-uniapp diff --git a/nginx.conf b/nginx.conf index 2b8d1e32..02896bfc 100644 --- a/nginx.conf +++ b/nginx.conf @@ -41,6 +41,27 @@ http { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $http_x_forwarded_for; } + location ^~ /jmreport/ { + proxy_pass http://localhost:100/jmreport/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location ^~ /magic/ { + proxy_pass http://localhost:100/magic/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location /profile/ { + proxy_cache my_zone; + proxy_cache_valid 200 304 12h; + proxy_cache_key $host$uri$is_args$args; + alias /opt/profile/; + index index.html index.htm; + } location / { proxy_cache my_zone; proxy_cache_valid 200 304 12h; diff --git a/nginx_prod.conf b/nginx_prod.conf deleted file mode 100644 index 2f9b3691..00000000 --- a/nginx_prod.conf +++ /dev/null @@ -1,57 +0,0 @@ -user root; -worker_processes 2; - -events { - worker_connections 1024; -} - -http { - include mime.types; - charset utf-8,gbk; - default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"'; - - proxy_cache_path /opt/nginx_cache/ levels=1:2 keys_zone=my_zone:10m inactive=300s max_size=5g; - access_log logs/access.log main; - sendfile on; - #tcp_nopush on; - keepalive_timeout 600s; - client_max_body_size 200m; - gzip on; - gzip_min_length 10k; - gzip_comp_level 9; - gzip_buffers 4 16k; - gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png; - gzip_vary on; - gzip_disable "MSIE [1-6]\."; - upstream sfms3.0 { - server localhost:90 weight=10 max_fails=3 fail_timeout=10s; - } - server { - listen 81; - server_name_in_redirect off; - server_name _; - location /api/ { - proxy_pass http://sfms3.0/; - proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; - proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $http_x_forwarded_for; - } - location /profile/ { - alias /opt/profile/; - index index.html index.htm; - } - location / { - proxy_cache my_zone; - proxy_cache_valid 200 304 12h; - proxy_cache_key $host$uri$is_args$args; - try_files $uri $uri/ /index.html; - root /opt/sfms3.0-uniapp; - index index.html index.htm; - } - } -} \ No newline at end of file diff --git a/package.json b/package.json index 0d932a24..c4d16606 100644 --- a/package.json +++ b/package.json @@ -8,19 +8,14 @@ "dev": "uni", "dev:h5:ssr": "uni --ssr", "dev:mp-weixin": "uni -p mp-weixin", - "hella8:app": "uni build -p app --mode hella8", - "hella8:app-android": "uni build -p app-android --mode hella8", - "hella8:app-ios": "uni build -p app-ios --mode hella8", - "hella8:h5:ssr": "uni build --ssr --mode hella8", - "hella8:mp-weixin": "uni build -p mp-weixin --mode hella8", - "prod": "uni build --mode production", + "test:app": "uni build -p app --mode test", + "test:app-android": "uni build -p app-android --mode test", + "test:app-ios": "uni build -p app-ios --mode test", + "test:h5:ssr": "uni build --ssr --mode test", + "test:mp-weixin": "uni build -p mp-weixin --mode test", + "prod": "uni build --mode production", "test": "uni build --mode test", - "hella8": "uni build --mode hella8", - "hella9": "uni build --mode hella9", - "hella13": "uni build --mode hella13", - "hella14": "uni build --mode hella14", - "hella15": "uni build --mode hella15", - "hella16": "uni build --mode hella16" + "test-dev": "uni build --mode test-dev" }, "dependencies": { "@dcloudio/uni-app": "3.0.0-3090920231225001",