diff --git a/nginx-https.conf b/nginx-https.conf index 30b8a69..3ba7ea4 100644 --- a/nginx-https.conf +++ b/nginx-https.conf @@ -1,3 +1,9 @@ +# WebSocket连接升级映射(必须在server块之前定义) +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +} + # 80端口:仅处理HTTP请求,自动重定向到HTTPS server { @@ -46,21 +52,33 @@ server { # 注意:这里的路径需要与前端 VUE_APP_BASE_API 配置一致 location /dev-api/ { proxy_pass http://127.0.0.1:30313/; # 后端服务地址 + + # 请求头设置 proxy_set_header Host $host; 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 X-Forwarded-Host $server_name; - # WebSocket支持(如果需要) + # 请求体相关配置(重要:支持POST请求) + proxy_set_header Content-Type $content_type; + proxy_set_header Content-Length $content_length; + proxy_pass_request_headers on; + proxy_pass_request_body on; + + # HTTP版本和WebSocket支持 proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_set_header Connection $connection_upgrade; # 超时设置 proxy_connect_timeout 600s; proxy_send_timeout 600s; proxy_read_timeout 600s; + + # 请求缓冲设置(对大文件上传有用) + proxy_request_buffering on;1 + client_max_body_size 100M; } diff --git a/src/api/system/jdorder.js b/src/api/system/jdorder.js index 9a62719..259003a 100644 --- a/src/api/system/jdorder.js +++ b/src/api/system/jdorder.js @@ -165,4 +165,13 @@ export function delJDOrder(ids) { url: `/system/jdorder/${idPath}`, method: 'delete' }) +} + +// 手动获取物流信息(用于调试) +export function fetchLogisticsManually(data) { + return request({ + url: '/jarvis/jdorder/fetchLogisticsManually', + method: 'post', + data + }) } \ No newline at end of file diff --git a/src/views/public/tendoc-callback.vue b/src/views/public/tendoc-callback.vue new file mode 100644 index 0000000..e6d0c7c --- /dev/null +++ b/src/views/public/tendoc-callback.vue @@ -0,0 +1,169 @@ + + + + + + diff --git a/src/views/system/jdorder/orderList.vue b/src/views/system/jdorder/orderList.vue index 8aa54aa..1e3e1b7 100644 --- a/src/views/system/jdorder/orderList.vue +++ b/src/views/system/jdorder/orderList.vue @@ -134,11 +134,21 @@ - + + + +
+ + + + + + + {{ fetchLogisticsResult.orderId }} + + + {{ fetchLogisticsResult.orderNo }} + + + {{ fetchLogisticsResult.distributionMark }} + + + + + + + + + + + + + + +
+ 正在获取物流信息... +
+
+ +
+