Эх сурвалжийг харах

chore(api): 适配“获取大屏数据”接口

ccnnde 2 сар өмнө
parent
commit
2e15f41642
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      src/services/api.ts

+ 4 - 1
src/services/api.ts

@@ -56,11 +56,14 @@ export async function getCollectionList(
 }
 
 export async function getLe5leV(id: string, projection?: any, historyId?: string) {
-  return await axios.post('/api/data/v/get', {
+  const res = await axios.post('/api/data/v/get', {
     id,
     projection,
     historyId
   });
+
+  res.data = JSON.parse(res.data);
+  return res;
 }
 
 export async function getComponents(id: string) {