chapter.js 664 B

1234567891011121314151617181920212223242526272829
  1. // 章节相关API
  2. const api = require('../utils/api');
  3. // 获取电子书章节列表
  4. function getBookChapterList(contentId) {
  5. return api.get(`/app/book-chapter/list/${contentId}`);
  6. }
  7. // 获取电子书章节详情
  8. function getBookChapter(chapterId) {
  9. return api.get(`/app/book-chapter/${chapterId}`);
  10. }
  11. // 获取听书章节列表
  12. function getAudioChapterList(contentId) {
  13. return api.get(`/app/audio-chapter/list/${contentId}`);
  14. }
  15. // 获取听书章节详情
  16. function getAudioChapter(audioId) {
  17. return api.get(`/app/audio-chapter/${audioId}`);
  18. }
  19. module.exports = {
  20. getBookChapterList,
  21. getBookChapter,
  22. getAudioChapterList,
  23. getAudioChapter
  24. };