| 1 |
- import{a as m}from"./index-CICGD0yG.js";const g=t=>{const s="/api/user/menus",n={};return"search"in t&&t.search&&(n.keyword=t.search),new Promise((o,i)=>{m({url:s,method:"get",params:n}).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 a=c[d];r.push({name:a.name,icon:a.icon,img:a.img,description:a.desc,id:a.id,agentType:a.agent_type,menuId:a.menuId})}}o({code:e.code,data:r,msg:e.msg})}else o(e)}).catch(i)})},l=t=>{const s="/api/label/list",n={};return"search"in t&&t.search&&(n.keyword=t.search),new Promise((o,i)=>{m({url:s,method:"get",params:n}).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};
|