import request from "@/utils/httpRequest";
import { SYS_PATH as prefix } from "../AppPath";

export default {
	save: function (inputForm) {
		return request({
			url: prefix + "/sys/menu/save",
			method: "post",
			data: inputForm,
		});
	},

	drag: function (inputForm) {
		return request({
			url: prefix + "/sys/menu/drag",
			method: "post",
			data: inputForm,
		});
	},

	delete: function (ids) {
		return request({
			url: prefix + "/sys/menu/delete",
			method: "delete",
			params: { ids: ids },
		});
	},

	queryById: function (id) {
		return request({
			url: prefix + "/sys/menu/queryById",
			method: "get",
			params: { id: id },
		});
	},

	treeData: function (params) {
		return request({
			url: prefix + "/sys/menu/treeData",
			method: "get",
			params: params,
		});
	},
};
