import { post } from "@/utils/request";
import menu from "@/store/modules/menu";

export const getMenu = () => {
  post<{ tree: IMenu[] }>("/goods/type/treeData").then(
    ([err, { tree }]) => err || menu.setList(tree)
  );
  return [] as IMenu[];
};
