소스 검색

切换接口

lex-xin 10 달 전
부모
커밋
b5e8aaf490
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      src/views/accompany/index.tsx

+ 6 - 4
src/views/accompany/index.tsx

@@ -20,11 +20,13 @@ export default defineComponent({
     })
     const getTree = async () => {
       try {
-        const res: any = await request.get(
-          state.platformApi + '/musicSheetCategories/queryTree?enable=true'
+        const res: any = await request.post(
+          state.platformApi + '/musicSheetCategories/page'
         )
-        if (Array.isArray(res?.data)) {
-          data.svgs = res.data.map((n: any, index: number) => {
+        console.log(res, 'res')
+        const result = res.data.rows || []
+        if (Array.isArray(result)) {
+          data.svgs = result.map((n: any, index: number) => {
             return {
               ...n,
               id: n.id,