api.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920
  1. /**
  2. * API请求工具类
  3. */
  4. import config from './config.js'
  5. // API基础URL - 从配置文件读取
  6. const BASE_URL = config.BASE_URL
  7. /**
  8. * 统一请求方法
  9. */
  10. function request(url, method = 'GET', data = {}) {
  11. return new Promise((resolve, reject) => {
  12. // 显示加载提示
  13. if (config.SHOW_LOADING && method !== 'GET') {
  14. uni.showLoading({
  15. title: '请求中...',
  16. mask: false
  17. })
  18. }
  19. uni.request({
  20. url: BASE_URL + url,
  21. method: method,
  22. data: data,
  23. header: {
  24. 'Content-Type': 'application/json'
  25. },
  26. timeout: config.TIMEOUT,
  27. success: (res) => {
  28. // 隐藏加载提示
  29. if (config.SHOW_LOADING && method !== 'GET') {
  30. uni.hideLoading()
  31. }
  32. if (res.statusCode === 200) {
  33. if (res.data.code === 200) {
  34. resolve(res.data)
  35. } else {
  36. reject(new Error(res.data.message || '请求失败'))
  37. }
  38. } else {
  39. reject(new Error('网络请求失败,状态码:' + res.statusCode))
  40. }
  41. },
  42. fail: (err) => {
  43. // 隐藏加载提示
  44. if (config.SHOW_LOADING && method !== 'GET') {
  45. uni.hideLoading()
  46. }
  47. console.error('API请求失败:', err)
  48. reject(new Error('网络请求失败,请检查网络连接'))
  49. }
  50. })
  51. })
  52. }
  53. /**
  54. * GET请求
  55. */
  56. function get(url, data = {}) {
  57. return request(url, 'GET', data)
  58. }
  59. /**
  60. * POST请求
  61. */
  62. function post(url, data = {}) {
  63. return request(url, 'POST', data)
  64. }
  65. /**
  66. * PUT请求
  67. */
  68. function put(url, data = {}) {
  69. return request(url, 'PUT', data)
  70. }
  71. /**
  72. * DELETE请求
  73. */
  74. function del(url, data = {}) {
  75. return request(url, 'DELETE', data)
  76. }
  77. // ============================================
  78. // 用户相关API
  79. // ============================================
  80. /**
  81. * 用户登录
  82. */
  83. export function login(username, password) {
  84. return post('/user/login', {
  85. username: username,
  86. password: password
  87. })
  88. }
  89. /**
  90. * 用户注册
  91. */
  92. export function register(data) {
  93. return post('/user/register', data)
  94. }
  95. /**
  96. * 获取用户信息
  97. */
  98. export function getUserById(id) {
  99. return get(`/user/${id}`)
  100. }
  101. // ============================================
  102. // 书籍相关API
  103. // ============================================
  104. /**
  105. * 分页查询书籍
  106. */
  107. export function getBooks(params) {
  108. return get('/book/list', params)
  109. }
  110. /**
  111. * 获取书籍详情
  112. * @param {Number} id 书籍ID
  113. * @param {Number} userId 用户ID(可选,用于VIP权限检查)
  114. */
  115. export function getBookById(id, userId) {
  116. const params = {}
  117. if (userId !== undefined && userId !== null) {
  118. params.userId = userId
  119. }
  120. return get(`/book/${id}`, params)
  121. }
  122. /**
  123. * 获取今日推荐
  124. */
  125. export function getTodayRecommend(limit = 8) {
  126. return get('/book/today-recommend', {
  127. limit: limit
  128. })
  129. }
  130. /**
  131. * 获取畅销书籍
  132. */
  133. export function getBestsellers(limit = 10) {
  134. return get('/book/bestsellers', {
  135. limit: limit
  136. })
  137. }
  138. /**
  139. * 获取全部书籍(分页)
  140. */
  141. export function getAllBooks(page = 1, size = 10) {
  142. return get('/book/all', {
  143. page: page,
  144. size: size
  145. })
  146. }
  147. /**
  148. * 获取排行榜书籍
  149. */
  150. export function getRankingBooks(limit = 10) {
  151. return get('/book/ranking', {
  152. limit: limit
  153. })
  154. }
  155. /**
  156. * 获取热门书籍
  157. */
  158. export function getPopularBooks(limit = 10) {
  159. return get('/book/popular', {
  160. limit: limit
  161. })
  162. }
  163. /**
  164. * 获取新书榜
  165. */
  166. export function getNewBooks(limit = 10) {
  167. return get('/book/new', {
  168. limit: limit
  169. })
  170. }
  171. /**
  172. * 获取VIP书籍(分页)
  173. */
  174. export function getVipBooks(page = 1, size = 10) {
  175. return get('/book/vip', {
  176. page: page,
  177. size: size
  178. })
  179. }
  180. /**
  181. * 获取精品书单
  182. */
  183. export function getFeaturedList(limit = 4) {
  184. return get('/book/featured-list', {
  185. limit: limit
  186. })
  187. }
  188. // ============================================
  189. // 分类相关API
  190. // ============================================
  191. /**
  192. * 获取所有分类列表
  193. */
  194. export function getAllCategories() {
  195. return get('/category/list')
  196. }
  197. /**
  198. * 根据ID获取分类详情
  199. */
  200. export function getCategoryById(id) {
  201. return get(`/category/${id}`)
  202. }
  203. /**
  204. * 获取更多推荐书籍
  205. */
  206. export function getMoreRecommend(limit = 6) {
  207. return get('/book/more-recommend', {
  208. limit: limit
  209. })
  210. }
  211. /**
  212. * 创建书籍
  213. */
  214. export function createBook(data) {
  215. return post('/book', data)
  216. }
  217. /**
  218. * 获取个人资料
  219. */
  220. export function getUserProfile(userId) {
  221. return get('/user/profile', { userId })
  222. }
  223. /**
  224. * 更新个人资料
  225. */
  226. export function updateUserProfile(payload) {
  227. return request('/user/profile', 'PUT', payload)
  228. }
  229. /**
  230. * 更新书籍
  231. */
  232. export function updateBook(id, data) {
  233. return put(`/book/${id}`, data)
  234. }
  235. /**
  236. * 删除书籍
  237. */
  238. export function deleteBook(id) {
  239. return del(`/book/${id}`)
  240. }
  241. /**
  242. * 批量删除书籍
  243. */
  244. export function deleteBooks(ids) {
  245. return del('/book/batch', ids)
  246. }
  247. // ============================================
  248. // 书架相关API
  249. // ============================================
  250. /**
  251. * 添加书籍到书架
  252. */
  253. export function addToBookshelf(userId, bookId) {
  254. return post('/bookshelf/add', {
  255. userId: userId,
  256. bookId: bookId
  257. })
  258. }
  259. /**
  260. * 从书架移除书籍
  261. */
  262. export function removeFromBookshelf(userId, bookId) {
  263. return request('/bookshelf/remove', 'DELETE', {
  264. userId: userId,
  265. bookId: bookId
  266. })
  267. }
  268. /**
  269. * 获取用户书架列表
  270. */
  271. export function getBookshelfList(userId) {
  272. return get('/bookshelf/list', {
  273. userId: userId
  274. })
  275. }
  276. /**
  277. * 检查书籍是否在书架中
  278. */
  279. export function checkInBookshelf(userId, bookId) {
  280. return get('/bookshelf/check', {
  281. userId: userId,
  282. bookId: bookId
  283. })
  284. }
  285. /**
  286. * 更新阅读进度
  287. */
  288. export function updateReadProgress(userId, bookId, readProgress) {
  289. return put('/bookshelf/progress', {
  290. userId: userId,
  291. bookId: bookId,
  292. readProgress: readProgress
  293. })
  294. }
  295. // ============================================
  296. // 听书书架相关API
  297. // ============================================
  298. /**
  299. * 添加听书到书架
  300. */
  301. export function addAudiobookToBookshelf(userId, audiobookId) {
  302. return post('/audiobook-bookshelf/add', {
  303. userId: userId,
  304. audiobookId: audiobookId
  305. })
  306. }
  307. /**
  308. * 从书架移除听书
  309. */
  310. export function removeAudiobookFromBookshelf(userId, audiobookId) {
  311. return request('/audiobook-bookshelf/remove', 'DELETE', {
  312. userId: userId,
  313. audiobookId: audiobookId
  314. })
  315. }
  316. /**
  317. * 获取用户听书书架列表
  318. */
  319. export function getAudiobookBookshelfList(userId) {
  320. return get('/audiobook-bookshelf/list', {
  321. userId: userId
  322. })
  323. }
  324. /**
  325. * 检查听书是否在书架中
  326. */
  327. export function checkAudiobookInBookshelf(userId, audiobookId) {
  328. return get('/audiobook-bookshelf/check', {
  329. userId: userId,
  330. audiobookId: audiobookId
  331. })
  332. }
  333. /**
  334. * 更新听书进度
  335. */
  336. export function updateAudiobookListeningProgress(userId, audiobookId, chapterId, position) {
  337. return put('/audiobook-bookshelf/progress', {
  338. userId: userId,
  339. audiobookId: audiobookId,
  340. lastListenedChapterId: chapterId,
  341. lastListenedPosition: position
  342. })
  343. }
  344. // ============================================
  345. // 听书相关API
  346. // ============================================
  347. /**
  348. * 获取最近上新
  349. */
  350. export function getRecentAudiobooks(limit = 8) {
  351. return get('/audiobook/recent', {
  352. limit: limit
  353. })
  354. }
  355. /**
  356. * 获取热门听书
  357. */
  358. export function getPopularAudiobooks(limit = 10) {
  359. return get('/audiobook/popular', {
  360. limit: limit
  361. })
  362. }
  363. /**
  364. * 获取推荐听书
  365. */
  366. export function getRecommendAudiobooks(limit = 10) {
  367. return get('/audiobook/recommend', {
  368. limit: limit
  369. })
  370. }
  371. /**
  372. * 获取畅听榜
  373. */
  374. export function getRankingAudiobooks(limit = 10) {
  375. return get('/audiobook/ranking', {
  376. limit: limit
  377. })
  378. }
  379. /**
  380. * 获取听书详情(包含章节列表)
  381. */
  382. export function getAudiobookDetail(id, userId = null) {
  383. const params = userId ? { userId } : {}
  384. return get(`/audiobook/${id}`, params)
  385. }
  386. /**
  387. * 获取章节详情
  388. * @param {Number} chapterId 章节ID
  389. * @param {Number} userId 用户ID(可选,用于VIP权限检查)
  390. */
  391. export function getChapterDetail(chapterId, userId) {
  392. const params = {}
  393. if (userId !== undefined && userId !== null) {
  394. params.userId = userId
  395. }
  396. return get(`/audiobook/chapter/${chapterId}`, params)
  397. }
  398. /**
  399. * 记录听书历史
  400. */
  401. export function recordListeningHistory(userId, audiobookId, chapterId) {
  402. return post('/audiobook/history', {
  403. userId: userId,
  404. audiobookId: audiobookId,
  405. chapterId: chapterId
  406. })
  407. }
  408. /**
  409. * 保存听书进度
  410. */
  411. export function saveListeningProgress(userId, audiobookId, chapterId, currentPosition, duration) {
  412. return post('/audiobook/progress', {
  413. userId: userId,
  414. audiobookId: audiobookId,
  415. chapterId: chapterId,
  416. currentPosition: currentPosition,
  417. duration: duration
  418. })
  419. }
  420. /**
  421. * 获取听书进度
  422. */
  423. export function getListeningProgress(userId, chapterId) {
  424. return get('/audiobook/progress', {
  425. userId: userId,
  426. chapterId: chapterId
  427. })
  428. }
  429. /**
  430. * 播放章节(增加播放次数)
  431. */
  432. export function playChapter(audiobookId, chapterId) {
  433. return post('/audiobook/play', {
  434. audiobookId: audiobookId,
  435. chapterId: chapterId
  436. })
  437. }
  438. // ============================================
  439. // 书籍章节相关API
  440. // ============================================
  441. /**
  442. * 根据书籍ID获取章节列表
  443. */
  444. export function getBookChapters(bookId) {
  445. return get('/chapter/list', {
  446. bookId: bookId
  447. })
  448. }
  449. /**
  450. * 根据章节ID获取章节详情(包含内容)
  451. */
  452. export function getBookChapterDetail(chapterId) {
  453. return get(`/chapter/${chapterId}`)
  454. }
  455. // ============================================
  456. // 搜索相关API
  457. // ============================================
  458. /**
  459. * 搜索书籍(模糊查询)
  460. * @param {String} keyword - 搜索关键词
  461. * @param {Number} page - 页码,默认1
  462. * @param {Number} size - 每页数量,默认20
  463. */
  464. export function searchBooks(keyword, page = 1, size = 20) {
  465. return get('/book/search', {
  466. keyword: keyword,
  467. page: page,
  468. size: size
  469. })
  470. }
  471. /**
  472. * 获取热门搜索关键词
  473. * @param {Number} limit - 返回数量,默认10
  474. */
  475. export function getPopularKeywords(limit = 10) {
  476. return get('/book/popular-keywords', {
  477. limit: limit
  478. })
  479. }
  480. // ============================================
  481. // 听书检索API
  482. // ============================================
  483. /**
  484. * 听书分页搜索(模糊查询)
  485. * @param {String} keyword 关键词
  486. * @param {Number} page 页码
  487. * @param {Number} size 每页数量
  488. * 其他可选:categoryId, status, isVip, isFree
  489. */
  490. export function searchAudiobooks({ keyword, page = 1, size = 20, categoryId, status, isVip, isFree } = {}) {
  491. const params = { keyword, page, size }
  492. if (categoryId !== undefined && categoryId !== null) params.categoryId = categoryId
  493. if (status !== undefined && status !== null) params.status = status
  494. if (isVip !== undefined && isVip !== null) params.isVip = isVip
  495. if (isFree !== undefined && isFree !== null) params.isFree = isFree
  496. return get('/audiobook/list', params)
  497. }
  498. // ============================================
  499. // 自定义轮播与榜单(公共读取)
  500. // ============================================
  501. export function getBannersByCode(code) {
  502. return get('/banner/list', { code })
  503. }
  504. /**
  505. * 获取所有启用的排行榜类型
  506. */
  507. export function getAllRankingGroups() {
  508. return get('/ranking/groups')
  509. }
  510. /**
  511. * 根据排行榜类型code获取排行榜书籍(支持分类筛选)
  512. * @param {String} code 排行榜类型code(如:bestseller、popular)
  513. * @param {Number} categoryId 分类ID(可选)
  514. */
  515. export function getRankingByCode(code, categoryId = null) {
  516. const params = { code }
  517. if (categoryId !== null && categoryId !== undefined) {
  518. params.categoryId = categoryId
  519. }
  520. return get('/ranking/list', params)
  521. }
  522. // ============================================
  523. // 浏览记录相关API
  524. // ============================================
  525. /**
  526. * 记录浏览历史
  527. * @param {Number} userId 用户ID
  528. * @param {Number} bookId 书籍ID
  529. */
  530. export function recordBrowsingHistory(userId, bookId) {
  531. return post('/browsing-history/record', {
  532. userId: userId,
  533. bookId: bookId
  534. })
  535. }
  536. /**
  537. * 获取用户的浏览记录列表
  538. * @param {Number} userId 用户ID
  539. */
  540. export function getBrowsingHistory(userId) {
  541. return get('/browsing-history/list', {
  542. userId: userId
  543. })
  544. }
  545. /**
  546. * 清空用户的浏览记录
  547. * @param {Number} userId 用户ID
  548. */
  549. export function clearBrowsingHistory(userId) {
  550. return del('/browsing-history/clear', {
  551. userId: userId
  552. })
  553. }
  554. // ============================================
  555. // 评论相关API
  556. // ============================================
  557. /**
  558. * 发表评论
  559. * @param {Number} userId 用户ID
  560. * @param {Number} bookId 书籍ID
  561. * @param {String} content 评论内容
  562. */
  563. export function addComment(userId, bookId, content) {
  564. return post('/comment/add', {
  565. userId: userId,
  566. bookId: bookId,
  567. content: content
  568. })
  569. }
  570. /**
  571. * 获取书籍的评论列表
  572. * @param {Number} bookId 书籍ID
  573. * @param {Number} userId 当前用户ID(可选,用于判断是否已点赞)
  574. */
  575. export function getComments(bookId, userId = null) {
  576. const params = { bookId }
  577. if (userId !== null && userId !== undefined) {
  578. params.userId = userId
  579. }
  580. return get('/comment/list', params)
  581. }
  582. /**
  583. * 点赞/取消点赞评论
  584. * @param {Number} userId 用户ID
  585. * @param {Number} commentId 评论ID
  586. */
  587. export function toggleCommentLike(userId, commentId) {
  588. return post('/comment/like', {
  589. userId: userId,
  590. commentId: commentId
  591. })
  592. }
  593. // ============================================
  594. // 搜索历史相关API
  595. // ============================================
  596. /**
  597. * 记录搜索历史
  598. * @param {Number} userId 用户ID
  599. * @param {String} keyword 搜索关键词
  600. */
  601. export function recordSearchHistory(userId, keyword) {
  602. return post('/search-history/record', {
  603. userId: userId,
  604. keyword: keyword
  605. })
  606. }
  607. /**
  608. * 获取用户的搜索历史列表
  609. * @param {Number} userId 用户ID
  610. * @param {Number} limit 返回数量,默认10
  611. */
  612. export function getSearchHistory(userId, limit = 10) {
  613. return get('/search-history/list', {
  614. userId: userId,
  615. limit: limit
  616. })
  617. }
  618. /**
  619. * 清空用户的搜索历史
  620. * @param {Number} userId 用户ID
  621. */
  622. export function clearSearchHistory(userId) {
  623. return del('/search-history/clear', {
  624. userId: userId
  625. })
  626. }
  627. // ============================================
  628. // 意见反馈相关API
  629. // ============================================
  630. /**
  631. * 提交意见反馈
  632. * @param {Object} feedbackData 反馈数据
  633. * @param {Number} feedbackData.userId 用户ID
  634. * @param {String} feedbackData.type 反馈类型(bug/suggestion/other)
  635. * @param {String} feedbackData.description 详细描述
  636. * @param {Array} feedbackData.images 图片URL列表
  637. */
  638. export function submitFeedback(feedbackData) {
  639. return post('/feedback/submit', feedbackData)
  640. }
  641. /**
  642. * 获取用户的反馈列表
  643. * @param {Number} userId 用户ID
  644. * @param {Number} page 页码,默认1
  645. * @param {Number} size 每页数量,默认10
  646. */
  647. export function getFeedbackList(userId, page = 1, size = 10) {
  648. return get('/feedback/list', {
  649. userId: userId,
  650. page: page,
  651. size: size
  652. })
  653. }
  654. /**
  655. * 获取反馈详情
  656. * @param {Number} id 反馈ID
  657. */
  658. export function getFeedbackById(id) {
  659. return get(`/feedback/${id}`)
  660. }
  661. // ============================================
  662. // 消息相关API
  663. // ============================================
  664. /**
  665. * 获取用户的消息列表
  666. * @param {Number} userId 用户ID
  667. * @param {Number} isRead 是否已读(0-未读,1-已读,不传则查询全部)
  668. * @param {String} type 消息类型(like/comment/reply,不传则查询全部)
  669. * @param {Number} page 页码,默认1
  670. * @param {Number} size 每页数量,默认20
  671. */
  672. export function getMessages(userId, isRead, type, page = 1, size = 20) {
  673. const params = { userId }
  674. if (isRead !== undefined && isRead !== null) {
  675. params.isRead = isRead
  676. }
  677. if (type) {
  678. params.type = type
  679. }
  680. params.page = page
  681. params.size = size
  682. return get('/message/list', params)
  683. }
  684. /**
  685. * 获取未读消息数量
  686. * @param {Number} userId 用户ID
  687. */
  688. export function getUnreadMessageCount(userId) {
  689. return get('/message/unread-count', { userId })
  690. }
  691. /**
  692. * 标记消息为已读
  693. * @param {Number} id 消息ID
  694. */
  695. export function markMessageAsRead(id) {
  696. return put(`/message/read/${id}`, {})
  697. }
  698. /**
  699. * 批量标记所有消息为已读
  700. * @param {Number} userId 用户ID
  701. */
  702. export function markAllMessagesAsRead(userId) {
  703. return put('/message/read-all', { userId })
  704. }
  705. // ============================================
  706. // VIP相关API
  707. // ============================================
  708. /**
  709. * 获取VIP套餐列表
  710. */
  711. export function getVipPlans() {
  712. return get('/vip/plans')
  713. }
  714. /**
  715. * 购买VIP
  716. * @param {Object} purchaseData 购买数据
  717. * @param {Number} purchaseData.userId 用户ID
  718. * @param {String} purchaseData.vipType VIP类型(month/quarter/year)
  719. * @param {String} purchaseData.vipName VIP名称
  720. * @param {Number} purchaseData.price 价格
  721. * @param {String} purchaseData.paymentMethod 支付方式(alipay/wechat/other)
  722. */
  723. export function purchaseVip(purchaseData) {
  724. return post('/vip/purchase', purchaseData)
  725. }
  726. /**
  727. * 确认支付(支付回调)
  728. * @param {Number} recordId 记录ID
  729. * @param {String} transactionId 交易流水号(可选)
  730. */
  731. export function confirmVipPayment(recordId, transactionId) {
  732. return post('/vip/confirm-payment', {
  733. recordId: recordId,
  734. transactionId: transactionId
  735. })
  736. }
  737. /**
  738. * 检查用户VIP状态
  739. * @param {Number} userId 用户ID
  740. */
  741. export function checkVipStatus(userId) {
  742. return get('/vip/check', { userId })
  743. }
  744. /**
  745. * 获取用户的VIP充值记录列表
  746. * @param {Number} userId 用户ID
  747. * @param {Number} paymentStatus 支付状态(0-待支付,1-已支付,不传则查询全部)
  748. * @param {Number} page 页码,默认1
  749. * @param {Number} size 每页数量,默认10
  750. */
  751. export function getVipRecords(userId, paymentStatus, page = 1, size = 10) {
  752. const params = { userId, page, size }
  753. if (paymentStatus !== undefined && paymentStatus !== null) {
  754. params.paymentStatus = paymentStatus
  755. }
  756. return get('/vip/records', params)
  757. }
  758. export default {
  759. login,
  760. register,
  761. getUserById,
  762. getBooks,
  763. getBookById,
  764. getTodayRecommend,
  765. getBestsellers,
  766. getAllBooks,
  767. getRankingBooks,
  768. getPopularBooks,
  769. getNewBooks,
  770. getVipBooks,
  771. createBook,
  772. updateBook,
  773. deleteBook,
  774. deleteBooks,
  775. addToBookshelf,
  776. removeFromBookshelf,
  777. getBookshelfList,
  778. checkInBookshelf,
  779. updateReadProgress,
  780. getAllCategories,
  781. getCategoryById,
  782. getRecentAudiobooks,
  783. getPopularAudiobooks,
  784. getRecommendAudiobooks,
  785. getRankingAudiobooks,
  786. getAudiobookDetail,
  787. getChapterDetail,
  788. recordListeningHistory,
  789. saveListeningProgress,
  790. getListeningProgress,
  791. playChapter,
  792. getBookChapters,
  793. getBookChapterDetail,
  794. searchBooks,
  795. getPopularKeywords,
  796. searchAudiobooks,
  797. getBannersByCode,
  798. getRankingByCode,
  799. getAllRankingGroups,
  800. recordBrowsingHistory,
  801. getBrowsingHistory,
  802. clearBrowsingHistory,
  803. addComment,
  804. getComments,
  805. toggleCommentLike,
  806. recordSearchHistory,
  807. getSearchHistory,
  808. clearSearchHistory,
  809. submitFeedback,
  810. getFeedbackList,
  811. getFeedbackById,
  812. getMessages,
  813. getUnreadMessageCount,
  814. markMessageAsRead,
  815. markAllMessagesAsRead,
  816. getVipPlans,
  817. purchaseVip,
  818. confirmVipPayment,
  819. checkVipStatus,
  820. getVipRecords
  821. }