diff --git a/.env.development b/.env.development index d5af85a..5cc0ba1 100644 --- a/.env.development +++ b/.env.development @@ -1,11 +1,14 @@ # 开发环境配置 ENV = 'development' +# 服务路径 +VUE_APP_BASE_URL = / + # 开发环境 # VUE_APP_BASE_API = 'http://192.168.1.113:8081/data-admin/' # VUE_APP_BASE_API = 'http://192.168.1.20:19084/data-admin/' -VUE_APP_BASE_API = '/thinking' +VUE_APP_BASE_API = /thinking VUE_APP_FAST_BASE_URL = 'http://192.168.1.20:9080/' diff --git a/.env.production b/.env.production index eddcd02..d39f936 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,9 @@ # 生产环境配置 ENV = 'admin' +# 服务路径 +VUE_APP_BASE_URL = /sgcyy-slgcyxgl + # 若依管理系统/生产环境 -VUE_APP_BASE_API = '/sgcyy-slgcyxgl/thinking' -VUE_APP_FAST_BASE_URL = 'http://192.168.1.20:9080/' +VUE_APP_BASE_API = ${VUE_APP_BASE_URL}/thinking +VUE_APP_FAST_BASE_URL = http://192.168.1.20:9080/ diff --git a/deploy/Dockerfile b/deploy/Dockerfile index c142182..352fa1a 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -6,15 +6,16 @@ COPY . /root # yum install -y devtoolset-8-gcc devtoolset-8-gcc-c++ && \ # source /opt/rh/devtoolset-8/enable && \ RUN yarn config set strict-peer-dependencies false && \ -yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass && \ -yarn config set registry http://172.16.32.57:8931/repository/npm-group/ && \ -yarn cache clean && \ -yarn install --verbose && \ -yarn run build + yarn config set ignore-engines true && \ + yarn config set sass_binary_site https://npmmirror.com/mirrors/node-sass && \ + yarn config set registry http://172.16.32.57:8931/repository/npm-group/ && \ + yarn cache clean && \ + yarn install --verbose && \ + yarn run build # Second stage: minimal runtime environment FROM registry.datameta.com:8180/public/nginx:1.25-alpine - + COPY --from=builder /root/dist /usr/share/nginx/html WORKDIR / diff --git a/deploy/nginx.conf.tmpl b/deploy/nginx.conf.tmpl index fc498be..a48848f 100644 --- a/deploy/nginx.conf.tmpl +++ b/deploy/nginx.conf.tmpl @@ -47,9 +47,14 @@ http { charset utf-8; client_max_body_size ${NGINX_MAX_BODY_SIZE}; + location /mobileH5 { + return 301 http://shuili-h5.product.dev.com:30115?$args; + } + location / { root /usr/share/nginx/html; index index.html index.htm; + try_files $uri $uri/ /index.html; } error_page 500 502 503 504 /50x.html; @@ -67,10 +72,17 @@ http { location /thinking { - rewrite ^/thinking/(.*)$ /tianhui-admin-web/$1 break; + rewrite ^/thinking/(.*)$ /tianhui-admin-web/$1 break; + proxy_pass ${API_SERVER}; + } + location /sgcyy-slgcyxgl/api { + rewrite ^/sgcyy-slgcyxgl/api/(.*)$ /tianhui-admin-web/$1 break; + proxy_pass ${API_SERVER}; + } + location /sgcyy-slgcyxgl/thinking { + rewrite ^/sgcyy-slgcyxgl/thinking/(.*)$ /tianhui-admin-web/$1 break; proxy_pass ${API_SERVER}; } - } } diff --git a/src/views/aiSupervision/fourPredictions/warnInfo/index.vue b/src/views/aiSupervision/fourPredictions/warnInfo/index.vue index a2eae7f..8cd5415 100644 --- a/src/views/aiSupervision/fourPredictions/warnInfo/index.vue +++ b/src/views/aiSupervision/fourPredictions/warnInfo/index.vue @@ -1,4 +1,3 @@ - + diff --git a/src/views/dike/runManage/supervisionInspetion/statisticAnalysis/index.vue b/src/views/dike/runManage/supervisionInspetion/statisticAnalysis/index.vue index 7a738e7..d2def08 100644 --- a/src/views/dike/runManage/supervisionInspetion/statisticAnalysis/index.vue +++ b/src/views/dike/runManage/supervisionInspetion/statisticAnalysis/index.vue @@ -5,7 +5,7 @@ import { getSuperviseStatisticTotal, } from "@/api/dike"; import { getAreasData } from "@/api/areas"; -// import Pie from "./components/Pie.vue"; +import Pie from "./components/Pie.vue"; import { cascaderLazyLoad } from "@/utils/elUtils"; export default { diff --git a/src/views/reservoir/safeOperation/index.vue b/src/views/reservoir/safeOperation/index.vue index 0e23691..10bf566 100644 --- a/src/views/reservoir/safeOperation/index.vue +++ b/src/views/reservoir/safeOperation/index.vue @@ -41,7 +41,7 @@ >