Просмотр исходного кода

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

ccnnde 2 месяцев назад
Родитель
Сommit
473581e8fe
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      src/services/api.ts

+ 4 - 1
src/services/api.ts

@@ -67,9 +67,12 @@ export async function getLe5leV(id: string, projection?: any, historyId?: string
 }
 
 export async function getComponents(id: string) {
-  return await axios.post(`/api/data/v.component/get`, {
+  const res = await axios.post(`/api/data/v.component/get`, {
     id,
   });
+
+  res.data = JSON.parse(res.data);
+  return res;
 }
 
 export async function getComponentsList(data: any, config: any) {