cms.js 657 B

123456789101112131415161718
  1. import request from './request.js';
  2. const getTypeList = async ({ alias }) => {
  3. const res = await request.get({ url: `/cms/type/sublist/${alias}` });
  4. return res.data;
  5. }
  6. const getArticleList = async data => {
  7. const res = await request.get({ url: `/cms/blog/wx/articleList`, data });
  8. return res.data;
  9. }
  10. const getArticleDetail = async ({ id }) => {
  11. const res = await request.get({ url: `/cms/blog/cms/detail/${id}` });
  12. return res.data;
  13. }
  14. const addBlogViews = async ({ id }) => {
  15. const res = await request.get({ url: `/cms/blog/cms/addBlogViews/${id}` });
  16. return res.data;
  17. }
  18. export default { getTypeList, getArticleList, getArticleDetail, addBlogViews };