import http from "@/utils/request"

export default {
	account: {
		list: async function (data = {}) {
			return await http.get("account/list", data);
		},
		add: async function (data = {}) {
			return await http.post("account/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("account/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("account/del", data);
		},
	},
	menu: {
		list: async function (data = {}) {
			return await http.get("menu/list", data);
		},
		add: async function (data = {}) {
			return await http.post("menu/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("menu/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("menu/del", data);
		},
		option: async function (data = {}) {
			return await http.get("menu/option", data);
		},
		quick: async function (data = {}) {
			return await http.post("menu/quick", data);
		},
	},
	dept: {
		list: async function (data = {}) {
			return await http.get("dept/list", data);
		},
		add: async function (data = {}) {
			return await http.post("dept/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("dept/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("dept/del", data);
		},
		option: async function (data = {}) {
			return await http.get("dept/option", data);
		},
	},
	role: {
		list: async function (data = {}) {
			return await http.get("role/list", data);
		},
		add: async function (data = {}) {
			return await http.post("role/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("role/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("role/del", data);
		},
		option: async function (data = {}) {
			return await http.get("role/option", data);
		},
	},
	post: {
		list: async function (data = {}) {
			return await http.get("post/list", data);
		},
		add: async function (data = {}) {
			return await http.post("post/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("post/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("post/del", data);
		},
		option: async function (data = {}) {
			return await http.get("post/option", data);
		},
		import: async function (data = {}) {
			return await http.post("post/import", data);
		},
	},
	upload: async function (data, config = {}) {
		return await http.post("upload", data, config);
	},
	asset_category: {
		list: async function (data = {}) {
			return await http.get("asset_category/list", data);
		},
		add: async function (data = {}) {
			return await http.post("asset_category/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("asset_category/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("asset_category/del", data);
		},
	},
	asset: {
		list: async function (data = {}) {
			return await http.get("asset/list", data);
		},
		move: async function (data = {}) {
			return await http.put("asset/move", data);
		},
		del: async function (data = {}) {
			return await http.delete("asset/del", data);
		},
		upload: async function (data, config = {}) {
			return await http.post("asset/upload", data, config);
		},
	},
	monitor: {
		server: async function (data, config = {}) {
			return await http.get("monitor/server", data, config);
		}
	},
	online: {
		list: async function (data, config = {}) {
			return await http.get("online/list", data, config);
		},
		quit: async function (data, config = {}) {
			return await http.get("online/quit", data, config);
		}
	},
	crontab: {
		list: async function (data = {}) {
			return await http.get("crontab/list", data);
		},
		add: async function (data = {}) {
			return await http.post("crontab/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("crontab/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("crontab/del", data);
		},
		option: async function (data = {}) {
			return await http.get("crontab/option", data);
		},
	},
	crontab_log: {
		list: async function (data = {}) {
			return await http.get("crontab_log/list", data);
		},
		del: async function (data = {}) {
			return await http.delete("crontab_log/del", data);
		},
		empty: async function (data = {}) {
			return await http.delete("crontab_log/remove_all", data);
		},
	},
	config: {
		list: async function (data = {}) {
			return await http.get("system_config/list", data);
		},
		info: async function (data = {}) {
			return await http.get("system_config/list", data);
		},
		add: async function (data = {}) {
			return await http.post("system_config/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("system_config/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("system_config/del", data);
		},
		option: async function (data = {}) {
			return await http.get("system_config/option", data);
		},
		multi: async function (data = {}) {
			return await http.get("config/multi", data);
		},
		save: async function (data = {}) {
			return await http.post("config/save", data);
		}
	},
	dict: {
		list: async function (data = {}) {
			return await http.get("dict/list", data);
		},
		info: async function (data = {}) {
			return await http.get("dict/list", data);
		},
		add: async function (data = {}) {
			return await http.post("dict/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("dict/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("dict/del", data);
		},
		option: async function (data = {}) {
			return await http.get("dict/option", data);
		},
	},
	dict_data: {
		list: async function (data = {}) {
			return await http.get("dict_data/list", data);
		},
		info: async function (data = {}) {
			return await http.get("dict_data/list", data);
		},
		add: async function (data = {}) {
			return await http.post("dict_data/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("dict_data/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("dict_data/del", data);
		},
		option: async function (data = {}) {
			return await http.get("dict_data/option", data);
		},
	},
	translation: {
		list: async function (data = {}) {
			return await http.get("translation/list", data);
		},
		add: async function (data = {}) {
			return await http.post("translation/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("translation/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("translation/del", data);
		},
		load: async function (data = {}) {
			return await http.get("translations", data);
		}
	},
	message: {
		list: async function (data = {}) {
			return await http.get("message/list", data);
		},
		add: async function (data = {}) {
			return await http.post("message/add", data);
		},
		edit: async function (data = {}) {
			return await http.put("message/edit", data);
		},
		del: async function (data = {}) {
			return await http.delete("message/del", data);
		},
		recalled: async function (data = {}) {
			return await http.put("message/recalled", data);
		},
		mine: async function (data = {}) {
			return await http.get("message/mine", data);
		},
		read: async function (data = {}) {
			return await http.post("message/read", data);
		},
		detail: async function (data = {}) {
			return await http.get("message/detail", data);
		},
		remove: async function (data = {}) {
			return await http.delete("message/remove", data);
		},
		clear: async function (data = {}) {
			return await http.delete("message/clear", data);
		},
	}
}
