فهرست منبع

优化接口调用

zengy 7 ساعت پیش
والد
کامیت
22bc62a216
1فایلهای تغییر یافته به همراه1 افزوده شده و 3 حذف شده
  1. 1 3
      src/modules/cockpit/services/cockpitApi.js

+ 1 - 3
src/modules/cockpit/services/cockpitApi.js

@@ -198,9 +198,7 @@ export async function requestCockpitJson(path, options = {}) {
     }
 
     try {
-        const requestOptions = { headers: plan.headers, cache: 'no-store' }
-        if (options.signal) requestOptions.signal = options.signal
-        const response = await doFetch(plan.url, requestOptions)
+        const response = await doFetch(plan.url, { headers: plan.headers, cache: 'no-store' })
 
         // 401/403 = 凭据类失败:只回原因,绝不把用户送去登录页。
         if (response.status === 401 || response.status === 403) {