import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { SchoolList, ClassList} from './types';

/**
 * 获取学校列表
 */
export function getSchoolList(): AxiosPromise<SchoolList[]> {
	return request({
		url: 'http://www.smadmin.com/schools/index',
		method: 'get'
	});
}
/**
 * 获取班级列表
 */
export function getClassList(id: number): AxiosPromise<ClassList[]> {
	return request({
		url: 'http://www.smadmin.com/schools/grade-lists',
		method: 'get',
		params: {school_id: id}
	});
}
