import { get, Result } from "../base";

/**
 * 当前用户的路由信息
 * @returns .
 */
export function menuList(): Promise<any> {
  return  [
    {
      component: "order/index",
      meta: {
        icon: "fa-solid:th-list",
        keepAlive: false,
        showLink: true,
        showParent: false,
        title: "订单管理"
      },
      name: "order",
      path: "/order"
    },
    {
      component: "channel/index",
      meta: {
        icon: "fa-solid:align-justify",
        keepAlive: false,
        showLink: true,
        showParent: false,
        title: "通道管理"
      },
      name: "channel",
      path: "/channel"
    },
    {
      component: "merchant/index",
      meta: {
        icon: "ep:avatar",
        keepAlive: false,
        showLink: true,
        showParent: true,
        title: "商户管理"
      },
      name: "merchant",
      path: "/merchant"
    },
    {
      component: "ordertotal/index",
      meta: {
        icon: "ep:avatar",
        keepAlive: false,
        showLink: true,
        showParent: true,
        title: "订单统计"
      },
      name: "ordertotal",
      path: "/ordertotal"
    }
  ]
}
export function getRoutes(): Promise<Result<any>> {
  return get<any, Result<any>>("/sys/permission/routes", {});
}
