1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- /*
- * @Author: ZhengXiaowei
- * @Date: 2019-10-15 14:05:33
- * @LastEditors: ZhengXiaowei
- * @LastEditTime: 2019-10-15 14:05:59
- * @Description: api
- */
- import fly from "./fly";
- // 获取首页数据
- export const getHomeList = (sex) => {
- console.log(sex);
- return fly.get(`/books/${sex}/index`);
- };
- // 获取分类
- export const getCategory = () => {
- return fly.get("/books/getCategory");
- }
- // 获取书库
- export const getBooksList = (params) => {
- return fly.get("/books/library", params);
- }
- // 获取图书详情
- export const getBooksInfo = (bid) => {
- return fly.get(`/book/${bid}`);
- }
- // 获取详情页相似数据
- export const getSimilarBooks = (category_id, bid) => {
- return fly.get("/books/similar", {
- category_id,
- bid
- })
- }
- // 获取详情页中的目录
- export const getShortCatalog = (bid) => {
- return fly.get(`/books/${bid}/catalog`, {
- page_size: 10,
- page: 1
- }).then(r => r.list);
- }
- // 获取充值列表
- export const getChargeList = () => {
- return fly.get("/order/chargeList");
- }
- // 获取书架数据
- export const getUserShelfBooks = () => {
- return fly.get(`/userShelfBooks`);
- };
|