实现部分页面前后端相通

This commit is contained in:
2026-07-16 17:29:27 +08:00
parent 7e45ecd144
commit a9ccdab421
16 changed files with 778 additions and 184 deletions
+40
View File
@@ -0,0 +1,40 @@
const http = require('../utils/request')
/** 分页查询团课 */
function getCoursesByPage(params) {
return http.post('/groupCourse/page', params)
}
/** 获取课程详情 */
function getCourseDetail(id) {
return http.get('/groupCourse/' + id + '/detail')
}
/** 获取团课类型列表 */
function getCourseTypes() {
return http.get('/groupCourse/types')
}
/** 获取课程标签 */
function getCourseLabels() {
return http.get('/groupCourse/labels')
}
/** 获取活跃推荐课程 */
function getActiveRecommendations() {
return http.get('/groupCourse/recommend/active')
}
/** 搜索团课 */
function searchCourses(params) {
return http.post('/groupCourse/search', params)
}
module.exports = {
getCoursesByPage,
getCourseDetail,
getCourseTypes,
getCourseLabels,
getActiveRecommendations,
searchCourses
}