From 5bb151c352a6bfdea50877d7710dfdcac1ffc252 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 23 May 2025 09:36:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 186 ------------------------------ src/views/login/login.vue | 235 ++++++++++++++++++++------------------ 2 files changed, 123 insertions(+), 298 deletions(-) delete mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 479a0c4..0000000 --- a/nginx.conf +++ /dev/null @@ -1,186 +0,0 @@ - -user nginx; -worker_processes auto; - -error_log /var/log/nginx/error.log notice; -pid /var/run/nginx.pid; - - -events { - worker_connections 1024; -} - -http { -include mime.types; -default_type application/octet-stream; -server_tokens off; - -log_format main '$remote_addr - $remote_user [$time_local] "$request" ' -'$status $body_bytes_sent "$http_referer" ' -'"$http_user_agent" "$http_x_forwarded_for"'; - -#access_log logs/access.log main; -sendfile on; -#tcp_nopush on; - -#keepalive_timeout 0; -keepalive_timeout 65; -client_max_body_size 100M; -client_body_buffer_size 100M; -fastcgi_buffer_size 128k; -fastcgi_buffers 8 128k; -fastcgi_busy_buffers_size 128k; -fastcgi_temp_file_write_size 128k; -#gzip on; - - -server { -listen 80; -server_name localhost; -charset utf-8; - - -location /nxdt { - # 网站根目录,此处使用容器内的路径 - alias /usr/local/www/nxdt; - # 默认首页 - index index.html; - # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html - try_files $uri $uri/ /nxdt/index.html; - } -location /option { - # 网站根目录,此处使用容器内的路径 - alias /usr/local/www/option; - # 默认首页 - index index.html; - # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html - try_files $uri $uri/ /option/index.html; - } -location /search-tool { - # 网站根目录,此处使用容器内的路径 - alias /usr/local/www/search-tool; - # 默认首页 - index index.html; - # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html - try_files $uri $uri/ /search-tool/index.html; - } - -location /zhgd-ht { - # 网站根目录,此处使用容器内的路径 - alias /usr/local/www/zhgd-ht; - # 默认首页 - index index.html; - # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html - try_files $uri $uri/ /zhgd-ht/index.html; - } -location /zhgd-web { - # 网站根目录,此处使用容器内的路径 - alias /usr/local/www/zhgd-web; - # 默认首页 - index index.html; - # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html - try_files $uri $uri/ /zhgd-web/sg_login.html; - } - -location /smartSiteScreen { - # 网站根目录,此处使用容器内的路径 - alias /usr/local/www/smartSiteScreen; - # 默认首页 - index index.html; - # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html - try_files $uri $uri/ /smartSiteScreen/index.html; - } -location /output { - # 网站根目录,此处使用容器内的路径 - alias /usr/local/www/output; - # 默认首页 - index index.html; - # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html - try_files $uri $uri/ /output/index.html; - } -#location / { -# # 网站根目录,此处使用容器内的路径 -# root /usr/local/www/; -# # 默认首页 -# index index.html; -# # 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html -# try_files $uri $uri/ /index.html; -# } - -location /file/ { - rewrite ^/file/(.*)$ /$1 break; #必须的写这个,使用nginx的rewrite对uri进行重写 下面这行也要改为api - proxy_pass http://192.168.0.14:19300/; #跨域转发路由地址 - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } -location /dev-api/ { - rewrite ^/dev-api/(.*)$ /$1 break; #必须的写这个,使用nginx的rewrite对uri进行重写 下面这行也要改为api - proxy_pass http://192.168.0.14:28080/; #跨域转发路由地址 - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } -location /nxdt-api/ { - rewrite ^/dev-api/(.*)$ /$1 break; #必须的写这个,使用nginx的rewrite对uri进行重写 下面这行也要改为api - proxy_pass http://192.168.0.14:18080/; #跨域转发路由地址 - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } -location /zhgd/ { - rewrite ^/dev-api/(.*)$ /$1 break; #必须的写这个,使用nginx的rewrite对uri进行重写 下面这行也要改为api - proxy_pass http://192.168.0.14:13030/zhgd/; #跨域转发路由地址 - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -} - -location /prod-api/ { - rewrite ^/dev-api/(.*)$ /$1 break; #必须的写这个,使用nginx的rewrite对uri进行重写 下面这行也要改为api - proxy_pass http://192.168.0.14:18080/; #跨域转发路由地址 - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - location /option-api/ { - rewrite ^/option-api/(.*)$ /$1 break; #必须的写这个,使用nginx的rewrite对uri进行重写 下面这行也要改为api - proxy_pass http://192.168.0.14:21666/; #跨域转发路由地址 - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } -location /screen/ { - #rewrite ^.+api/?(.*)$ /$1 break; #这样写有问题,在网上看有人这样写,发现有问题 - rewrite ^/screen/(.*)$ /$1 break; #必须的写这个,使用nginx的rewrite对uri进行重写 下面这行也要改为api - proxy_pass http://192.168.0.14:28080/; #跨域转发路由地址 - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } -location /search-tool-api/ { - #rewrite ^.+api/?(.*)$ /$1 break; #这样写有问题,在网上看有人这样写,发现有问题 - rewrite ^/screen/(.*)$ /$1 break; #必须的写这个,使用nginx的rewrite对uri进行重写 下面这行也要改为api - proxy_pass http://192.168.0.14:58089/; #跨域转发路由地址 - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } -#location ~* \.pdf$ { - # add_header Content-Type application/pdf; -#} - - -} - - -} - diff --git a/src/views/login/login.vue b/src/views/login/login.vue index b2c9ae0..8b78703 100644 --- a/src/views/login/login.vue +++ b/src/views/login/login.vue @@ -1,69 +1,84 @@ - - - - - - - - - - + + + + + + + + - - 登录 - - - + + 登录 + + + - \ No newline at end of file