From 4ff3eee77b41466d08117970970d01be6e48ffe1 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 28 Mar 2025 19:02:30 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/drone/pilot-h5

---
 src/api/http/request.ts |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/api/http/request.ts b/src/api/http/request.ts
index 1bdf3a5..153b0a9 100644
--- a/src/api/http/request.ts
+++ b/src/api/http/request.ts
@@ -67,10 +67,8 @@
     url: string
     authorization: boolean
   }) => {
-    if(config.url.includes('h5')) {
-      config.url = '/drone-h5' + config.url
-    } else if (!config.url.includes('/blade-') && !config.url.includes('https://') && !config.url.includes('http://')) {
-      config.url = '/drone-yw' + config.url
+    if (!config.url.includes('/blade-') && !config.url.includes('https://') && !config.url.includes('http://')) {
+      config.url = '/drone-device-core' + config.url
     }
     const authorization = config.authorization === false
     if (!authorization) {
@@ -81,6 +79,9 @@
     const isToken = meta.isToken === false
     if (getToken() && !isToken) {
       config.headers[website.tokenHeader] = 'bearer ' + getToken()
+    } else {
+      // 为了兼容分享页面
+      config.headers[website.tokenHeader] = 'bearer ' + getAuthToken()
     }
     if (meta.noCookie) {
       delete config.headers.cookie

--
Gitblit v1.9.3