Browse Source

切换接口

lex-xin 10 months ago
parent
commit
b5e8aaf490
1 changed files with 6 additions and 4 deletions
  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 () => {
     const getTree = async () => {
       try {
       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 {
             return {
               ...n,
               ...n,
               id: n.id,
               id: n.id,