新增教练端,实现业务闭环:会员登录注册→查询团课→预约团课→扫码签到→教练端开课→记录实际开课时间→教练端结课→记录实际结课时间→后台查询数据

This commit is contained in:
2026-07-20 17:21:28 +08:00
parent df0e68469b
commit 4a4697c816
84 changed files with 6914 additions and 258 deletions
+52
View File
@@ -0,0 +1,52 @@
const http = require('../utils/request')
/**
* 教练登录(账号密码)
*/
function login(username, password) {
return http.post('/auth/login', { username, password })
}
/**
* 获取教练负责的团课列表
*/
function getCoachCourses(coachId) {
return http.get('/coach/' + coachId + '/courses')
}
/**
* 教练手动开课
*/
function startCourse(courseId) {
return http.post('/coach/courses/' + courseId + '/start')
}
/**
* 教练手动结课
*/
function endCourse(courseId) {
return http.post('/coach/courses/' + courseId + '/end')
}
/**
* 获取团课详情
*/
function getCourseDetail(courseId) {
return http.get('/groupCourse/' + courseId + '/detail')
}
/**
* 获取教练违规记录
*/
function getCoachViolations(coachId) {
return http.get('/coach/' + coachId + '/violations')
}
module.exports = {
login,
getCoachCourses,
startCourse,
endCourse,
getCourseDetail,
getCoachViolations
}