Explorar el Código

优化接口调用

zengy hace 7 horas
padre
commit
22bc62a216
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  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) {