import { BaseService, Service } from '@/cool/index';

export class FestService extends BaseService {
	// 权限树型列表 s
	authList(data) {
		return this.request({
			url: '/auth/tree',
			params: data
		}).then(res => {
			return {
				list: res
			};
		});
	}

	// 添加权限树 s
	authAdd(data) {
		return this.request({
			url: '/auth/add',
			method: 'POST',
			data: data
		});
	}

	// 修改权限树 s
	authEdit(data) {
		return this.request({
			url: '/auth/update',
			method: 'POST',
			data: data
		});
	}

	// 删除权限树 s
	authDel(data) {
		return this.request({
			url: '/auth/delete',
			method: 'POST',
			data: data
		});
	}

	// ===============================
	// 套餐列表 s
	packageList(data) {
		return this.request({
			url: '/set-meal/list',
			params: data
		}).then(res => {
			return {
				list: res
			};
		});
	}

	// 添加权限树 s
	packageAdd(data) {
		return this.request({
			url: '/set-auth/detail',
			params: data
		});
	}

	// 修改权限树 s
	packageEdit(data) {
		return this.request({
			url: '/set-auth/update',
			method: 'POST',
			data: data
		});
	}
}

export default new FestService();
