import request from "@/utils/request";
import constant from "@/utils/constant";

// 获取目录数据
const getMenuData = (params) => {
    if (!params.parentId) {
        return new Promise((resolve, reject) => {resolve({})});
    }
    return request.postForm(constant.dtbserverProxy + '/menu/getMenuDataList', params)
}

// 新增类别
const addMenuData = (params) => {
    return request.postForm(constant.dtbserverProxy + '/menu/addMenuData', params)
}

export default {
    getMenuData,
    addMenuData,
}