| 1 |
- import{B as m}from"./index-CRr91q2n.js";const g=t=>{const s="/api/user/menus",a={};return"search"in t&&t.search&&(a.keyword=t.search),new Promise((o,i)=>{m({url:s,method:"get",params:a}).then(e=>{if(e.code/1===200){const c=e.data,r=[];if(c&&Array.isArray(c)){const h=c.length;for(let d=0;d<h;d++){const n=c[d];r.push({name:n.name,icon:n.icon,img:n.img,description:n.desc,id:n.id,agentType:n.agent_type,menuId:n.menuId})}}o({code:e.code,data:r,msg:e.msg})}else o(e)}).catch(i)})},l=t=>{const s="/api/label/list",a={};return"search"in t&&t.search&&(a.keyword=t.search),new Promise((o,i)=>{m({url:s,method:"get",params:a}).then(e=>{e.code/1===200?o({code:e.code,data:e.data.rows,msg:e.msg}):o(e)}).catch(i)})};export{g as a,l as c};
|