From bdc6d8733ae6eeb3a9762e77dbabe21441336474 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Thu, 13 Mar 2025 17:20:36 +0800
Subject: [PATCH] 更新分享
---
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