更新:课程与图书选择商品公共组件价格处理

This commit is contained in:
2025-11-25 15:20:27 +08:00
parent 7dea269e6a
commit 6b76173b5c
5 changed files with 101 additions and 68 deletions

View File

@@ -11,6 +11,7 @@ import type {
IComment,
IReadProgress
} from '@/types/book'
import type { IGoods } from '@/types/order'
const client = createRequestClient({ baseURL: SERVICE_MAP.MAIN })
@@ -212,5 +213,17 @@ export const bookApi = {
method: 'POST',
data: { chapterId }
})
}
},
/**
* 获取购买商品信息
* @param bookId 书籍ID
*/
getBookGoods(bookId: number) {
return client.request<IApiResponse<{ goodsList: IGoods[] }>>({
url: 'bookAbroad/home/getProductListForBook',
method: 'POST',
data: { bookId }
})
},
}