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

@Service('category')
export class CategoryService extends BaseService {
	page(params) {
		return this.request({
			url: '/list',
			params: {
				...params
			}
		}).then(res => {
			return {
				list: res
			};
		});
	}

	updateStatus(data) {
		return this.request({
			url: '/change-status',
			params: data
		});
	}
}

export default new CategoryService();
