cms.js 802 B

12345678910111213141516171819202122
  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. const getsublist = async ({ alias }) => {
  19. const res = await request.get({ url: `/cms/type/sublist/${alias}` });
  20. return res.data;
  21. }
  22. export default { getTypeList, getArticleList, getArticleDetail, addBlogViews, getsublist };