Bladeren bron

fix: 解决灯的问题

珍珍 3 maanden geleden
bovenliggende
commit
26854a49a0
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 1 1
      src/apis/envmonitor.ts
  2. 2 1
      src/utils/https.ts

+ 1 - 1
src/apis/envmonitor.ts

@@ -48,7 +48,7 @@ export const changeTempHttp = (params: any) => {
 // 查询灯的状态(优先查采集的状态)
 export const getLampHttp = (params: any) => {
   // { timeout: 2000 }
-  return https({ timeout: 150000 }).request<RootObject<any>>(`${duoduoenvService}light/status/query?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
+  return https({ timeout: 150000,isComParams:true }).request<RootObject<any>>(`${duoduoenvService}light/status/query?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
   // return https({ timeout: 20000 }).request<RootObject<any>>(`${testApi}light/status/query?spaceId=${params.spaceId}`, Method.GET, undefined, ContentType.json)
 }
 

+ 2 - 1
src/utils/https.ts

@@ -26,7 +26,8 @@ export const https = (configobj: any = { timeout: '',isComParams:true }) => {
     let comInfo = getUserInfo()
     // comInfo.projectId="Pj1101080255"
     console.log("configobj.isComParams==",configobj.isComParams)
-    const comParams: string = configobj.isComParams?setQueryConfig(comInfo):''
+    // const comParams: string = configobj.isComParams?setQueryConfig(comInfo):''
+    const comParams: string=setQueryConfig(comInfo);
     let url: any = request.url
     if (url.indexOf("?") != -1) {
       request.url = request.url + "&" + comParams