From 02245366b2a50109ad9a8cf051a26d21ab9bbeac Mon Sep 17 00:00:00 2001 From: liulujian Date: Tue, 12 May 2026 10:10:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8A=E7=BA=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devops/README.md | 8 + devops/web/nginx.conf | 182 +++++++++++++++++- txw-mhzc-web/public/docs/carbon-guide.md | 6 + .../src/pages/index/components/nav/index2.vue | 17 +- .../src/pages/index/views/glxtSy/glxtSy.vue | 56 +++++- .../src/pages/index/views/login/login.vue | 2 +- .../service/impl/TxwMhzcQyxxbServiceImpl.java | 2 +- .../txw/sso/pojo/vo/DidBindPhoneReqVO.java | 2 +- 8 files changed, 256 insertions(+), 19 deletions(-) diff --git a/devops/README.md b/devops/README.md index 54a3b52..4bb647e 100644 --- a/devops/README.md +++ b/devops/README.md @@ -230,3 +230,11 @@ docker network inspect devops_txw-network curl http://localhost:8848/nacos/v1/ns/operator/metrics docker exec txw-redis redis-cli -a redis_password ping ``` + + +## 参考指令 + +``` +// 清理缓存 +docker buildx prune +``` \ No newline at end of file diff --git a/devops/web/nginx.conf b/devops/web/nginx.conf index 52f70f6..7320d59 100644 --- a/devops/web/nginx.conf +++ b/devops/web/nginx.conf @@ -50,7 +50,187 @@ http { default_type application/octet-stream; # ============================================= - # 主 Server 块 + # HTTP → HTTPS 重定向 + # ============================================= + server { + listen 80; + server_name www.cciw.com.cn; + + return 301 https://$host$request_uri; + } + + # ============================================= + # HTTPS Server 块 + # ============================================= + server { + listen 443 ssl; + server_name www.cciw.com.cn; + + # SSL 证书 + ssl_certificate /etc/nginx/ssl/www.cciw.com.cn.crt; + ssl_certificate_key /etc/nginx/ssl/www.cciw.com.cn.key; + + # SSL 安全配置 + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384; + ssl_prefer_server_ciphers off; + ssl_session_cache shared:SSL:10m; + ssl_session_timeout 1d; + ssl_session_tickets off; + + # Gzip 压缩 + gzip_min_length 1024; + gzip_types text/plain text/css application/json application/javascript + application/x-javascript text/xml application/xml + application/xml+rss text/javascript image/svg+xml; + + if ($request_method = OPTIONS) { + return 403; + } + + # 健康检查 + location /healthcheck { + access_log off; + return 200 'OK'; + add_header Content-Type text/plain; + } + + # Ping 接口 + location /ping { + return 200 "ok"; + } + + # API 代理(网关) + location ~ ^/(mhzc|gxzx|sso|yygl) { + include proxy-common.conf; + proxy_pass http://txw-gateway:9300; + } + + location ~ ^/nacos(/.*)$ { + include proxy-common.conf; + proxy_pass http://txw-nacos:8080$1; + } + + location ^~ /admin/ { + proxy_pass http://172.21.79.119:18777/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $host; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_cache off; + proxy_connect_timeout 60s; + proxy_send_timeout 60s; + proxy_read_timeout 600s; + } + + location ^~ /web/ { + proxy_pass http://172.21.79.119:18778/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $host; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_cache off; + proxy_connect_timeout 60s; + proxy_send_timeout 60s; + proxy_read_timeout 600s; + } + + location ^~ /h5/ { + proxy_pass http://172.21.79.119:18779/; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $host; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_cache off; + proxy_connect_timeout 60s; + proxy_send_timeout 60s; + proxy_read_timeout 600s; + } + + # 百度验证 + location = /baidu_verify_codeva-5rH3psCeMQ.html { + alias /etc/nginx/verify/baidu_verify_codeva-5rH3psCeMQ.html; + } + + location = /baidu_verify_codeva-eE1giHswVL.html { + return 200 "2c7cc0bcf0ecd060ab8f7fe919acc078"; + add_header Content-Type text/html; + } + + # -------------------------------------------------------- + # 运营支撑前端(mhzc) + # -------------------------------------------------------- + location /view/mhzc { + return 301 /view/mhzc/; + } + + location /view/mhzc/ { + alias /usr/share/nginx/html/txw-mhzc-web/; + + location ~* \.(gif|jpg|jpeg|png|css|js|ico|eot|svg|ttf|woff|woff2)$ { + expires 90d; + add_header Cache-Control "public"; + try_files $uri =404; + } + + expires 1h; + add_header Cache-Control "public"; + + try_files $uri $uri/ /view/mhzc/index.html; + } + + # -------------------------------------------------------- + # 运营管理前端(yygl) + # -------------------------------------------------------- + location /view/yygl { + return 301 /view/yygl/; + } + + location /view/yygl/ { + alias /usr/share/nginx/html/txw-yygl-web/; + + location ~* \.(gif|jpg|jpeg|png|css|js|ico|eot|svg|ttf|woff|woff2)$ { + expires 90d; + add_header Cache-Control "public"; + try_files $uri =404; + } + + expires 1h; + add_header Cache-Control "public"; + + try_files $uri $uri/ /view/yygl/index.html; + } + + # -------------------------------------------------------- + # 默认首页重定向 + # -------------------------------------------------------- + location / { + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + add_header Expires 0; + return 301 /view/mhzc/; + } + + error_page 404 /404.html; + location = /404.html { + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + } + } + + # ============================================= + # 主 Server 块(保留非 HTTPS 请求处理) # ============================================= server { listen 80 default_server; diff --git a/txw-mhzc-web/public/docs/carbon-guide.md b/txw-mhzc-web/public/docs/carbon-guide.md index ed70dc8..63807db 100644 --- a/txw-mhzc-web/public/docs/carbon-guide.md +++ b/txw-mhzc-web/public/docs/carbon-guide.md @@ -45,4 +45,10 @@ | 4 | 接口联调 | 调用接口实现碳数据上链、VC 签发/验证等功能 | | 5 | 上线验证 | 联调通过后,即可正式上线 | + +## 技术联系 + +> 联系人: 谢老师 +> 联系电话: 15601721332 +> 联系邮箱: pjsl_service@chainable.com.cn --- diff --git a/txw-mhzc-web/src/pages/index/components/nav/index2.vue b/txw-mhzc-web/src/pages/index/components/nav/index2.vue index 1edc034..3525aef 100644 --- a/txw-mhzc-web/src/pages/index/components/nav/index2.vue +++ b/txw-mhzc-web/src/pages/index/components/nav/index2.vue @@ -1,6 +1,6 @@