更新:增加“搜索”功能

This commit is contained in:
2025-11-13 10:31:08 +08:00
parent d2389b2ed1
commit 6ba3781375
7 changed files with 564 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ import type {
IUserLateCourseListResponse,
IMarketCourseListResponse
} from '@/types/course'
import type { ISearchRequest, ISearchResponse } from '@/types/search'
const client = createRequestClient({ baseURL: SERVICE_MAP.MAIN })
@@ -50,5 +51,18 @@ export const courseApi = {
method: 'POST',
data: { id, limit, page }
})
},
/**
* 搜索课程和商品
* @param data 搜索参数 { keyWord, appName }
* @returns 搜索结果
*/
searchData(data: ISearchRequest) {
return client.request<ISearchResponse>({
url: 'bookAbroad/home/searchCourse',
method: 'POST',
data
})
}
}