index
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import request from '@/config/axios'
export interface StudentVO {
id: number
name: string
description: string
birthday: Date
sex: number
enabled: boolean
avatar: string
video: string
memo: string
}
// 查询学生分页
export const getStudentPage = async (params) => {
return await request.get({ url: `/infra/student/page`, params })
}
// 查询学生详情
export const getStudent = async (id: number) => {
return await request.get({ url: `/infra/student/get?id=` + id })
}
// 新增学生
export const createStudent = async (data: StudentVO) => {
return await request.post({ url: `/infra/student/create`, data })
}
// 修改学生
export const updateStudent = async (data: StudentVO) => {
return await request.put({ url: `/infra/student/update`, data })
}
// 删除学生
export const deleteStudent = async (id: number) => {
return await request.delete({ url: `/infra/student/delete?id=` + id })
}
// 导出学生 Excel
export const exportStudent = async (params) => {
return await request.download({ url: `/infra/student/export-excel`, params })
}