修正多处问题
This commit is contained in:
@@ -54,6 +54,7 @@ export function searchGroupCourse(params = {}, options = {}) {
|
||||
timePeriod,
|
||||
priceSort,
|
||||
remainingMost,
|
||||
isRecurring,
|
||||
page = 0,
|
||||
size = 10
|
||||
} = params
|
||||
@@ -67,6 +68,7 @@ export function searchGroupCourse(params = {}, options = {}) {
|
||||
if (timePeriod) requestBody.timePeriod = timePeriod
|
||||
if (priceSort) requestBody.priceSort = priceSort
|
||||
if (remainingMost !== undefined) requestBody.remainingMost = remainingMost
|
||||
if (isRecurring !== undefined) requestBody.isRecurring = isRecurring
|
||||
|
||||
return request.post('/groupCourse/search', requestBody, options)
|
||||
}
|
||||
@@ -91,14 +93,24 @@ export function getMemberBookings(memberId, options = {}) {
|
||||
return request.get(`/groupCourse/bookings/member/${memberId}`, {}, options)
|
||||
}
|
||||
|
||||
export function getActiveRecommendCourses(options = { cache: true, cacheTime: 5 * 60 * 1000 }) {
|
||||
export function getActiveRecommendCourses(options = { cache: false }) {
|
||||
return request.get('/groupCourse/recommend/active', {}, options)
|
||||
}
|
||||
|
||||
export function getGroupCourseRecommendList(params = {}, options = { cache: true, cacheTime: 5 * 60 * 1000 }) {
|
||||
export function getGroupCourseRecommendList(params = {}, options = { cache: false }) {
|
||||
return request.get('/groupCourse/recommend/list', params, options)
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码签到
|
||||
* 扫描团课二维码后签到,将预约状态更新为已出席
|
||||
* @param {number} courseId - 团课ID
|
||||
* @param {number} memberId - 会员ID
|
||||
*/
|
||||
export function qrSignInGroupCourse(courseId, memberId) {
|
||||
return request.post(`/groupCourse/${courseId}/qrsignin`, { memberId })
|
||||
}
|
||||
|
||||
export default {
|
||||
getGroupCourseList,
|
||||
getGroupCoursePage,
|
||||
|
||||
@@ -328,6 +328,17 @@ export function getStoredCardRechargeRecords(memberId, page = 1, size = 20, opti
|
||||
return request.get(`/stored-card/${memberId}/recharges?page=${page}&size=${size}`, {}, options)
|
||||
}
|
||||
|
||||
// ========== 系统配置相关API ==========
|
||||
|
||||
/**
|
||||
* 根据配置键获取配置值
|
||||
* @param {string} configKey - 配置键
|
||||
* @param {object} options - 请求选项
|
||||
*/
|
||||
export function getConfigByKey(configKey, options = {}) {
|
||||
return request.get(`/config/key/${configKey}`, {}, options)
|
||||
}
|
||||
|
||||
// ========== 支付相关API ==========
|
||||
|
||||
/**
|
||||
@@ -482,6 +493,16 @@ export function getCourseBookings(courseId, options = { cache: false }) {
|
||||
return request.get(`/groupCourse/bookings/course/${courseId}`, {}, options)
|
||||
}
|
||||
|
||||
// ========== 轮播图相关API ==========
|
||||
|
||||
/**
|
||||
* 获取启用的轮播图列表
|
||||
* @param {object} options - 请求选项 { cache: boolean, cacheTime: number }
|
||||
*/
|
||||
export function getActiveBanners(options = { cache: true, cacheTime: 10 * 60 * 1000 }) {
|
||||
return request.get('/banner/active', {}, options)
|
||||
}
|
||||
|
||||
export default {
|
||||
login,
|
||||
sendCode,
|
||||
@@ -520,5 +541,6 @@ export default {
|
||||
cancelBooking,
|
||||
signinGroupCourse,
|
||||
getMemberBookings,
|
||||
getCourseBookings
|
||||
getCourseBookings,
|
||||
getActiveBanners
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user