index.ts
3.2 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import request from '@/config/axios'
import type { Dayjs } from 'dayjs'
/** 门店课程-团课信息 */
export interface CoursePt {
id?: number // ID
cover?: string
name?: string // 门店id
minute?: string // 轮播图
introduce?: string // 课程名称
actionAnalysis: { name: string; introduce: string; videoOrPhoto: string }[] // 课程介绍
}
export interface CoursePtSchedule {
id?: number // ID
coursePtId?: number
storeId?: number
coachId?: number // 教练id
classroom?: string // 教室
}
// 门店课程-团课 API
export const CoursePtApi = {
// 查询门店课程-团课分页
getCourseLeaguePage: async (params: any) => {
return await request.get({ url: `/course/pt/page`, params })
},
// 查询门店课程-团课详情
getCoursePt: async (id: number) => {
return await request.get({ url: `/course/pt/get?id=` + id })
},
// 新增门店课程-团课
createCoursePt: async (data: any) => {
return await request.post({ url: `/course/pt/createOpen`, data })
},
// 修改门店课程-团课
updateCoursePt: async (data: any) => {
return await request.put({ url: `/course/pt/updateOpenPt`, data })
},
// 查询门店开设课程
getStoreOpenedCourses: async (params: any) => {
return await request.get({ url: `/course/pt/getOpen`, params })
},
// 查询门店开设课程的教练
getStoreOpenCourseCoach: async (params: any) => {
return await request.get({ url: `/course/pt/getOpenCoach`, params })
},
// 查询排课详情
getScheduleDetail: async (id: number) => {
return await request.get({ url: `/course/pt/scheduleDetail/` + id })
},
// 查询排课分页
getSchedulePage: async (params: any) => {
return await request.get({ url: `/course/pt/schedulePage`, params })
},
// 新增排课
createSchedule: async (data: CoursePtSchedule) => {
return await request.post({ url: `/course/pt/createSchedule`, data })
},
// 批量删除私教
deleteCoursePt: (data: number[]) => {
return request.post({ url: `/course/pt/deleteByIds`, data })
},
// 修改门店开课的状态-团课
updateStoreOpenCourseStatus: (data: any) => {
return request.put({ url: `/course/pt/updateOpen`, data })
},
// 批量删除门店开课
deleteStoreOpenCourse: (data: any) => {
return request.post({ url: `/course/pt/deleteByIdsOpen`, data })
},
// 私教课程列表
getCoursePtList: () => {
return request.get({ url: `/course/pt/list` })
},
// 批量删除门店教练
deleteStoreOpenCourseCoach: (data: any) => {
return request.post({ url: `/course/pt/deleteByIdsOpenCoach`, data })
},
// 获取教练开课信息
getCoachOpenCourseInfo: (id: number) => {
return request.get({ url: `/course/pt/getOpenCoachInfo?id=` + id })
},
// 批量删除排课
deleteSchedule: (data: number[]) => {
return request.post({ url: `/course/pt/deletesCheduleByIds`, data })
},
// 修改排课情况
updateSchedule: (data: any) => {
return request.put({ url: `/course/pt/updateScheduleDetail`, data })
},
createStorePt: (data: any) => {
return request.post({ url: `/course/pt/create`, data })
},
updateStorePt: (data: any) => {
return request.put({ url: `/course/pt/update`, data })
}
}