info.js 696 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import request from '@/utils/request'
  2. // 置顶 取消置顶
  3. export function articletop(data) {
  4. return request({
  5. url: '/api/circle/articletop',
  6. method: 'post',
  7. data
  8. });
  9. }
  10. // 删除贴子
  11. export function articledel(data) {
  12. return request({
  13. url: '/api/circle/articledel',
  14. method: 'post',
  15. data
  16. });
  17. }
  18. // 文章详情
  19. export function details(data,id) {
  20. return request({
  21. url: '/api/article/details/'+id,
  22. method: 'get',
  23. data
  24. });
  25. }
  26. //处理文章详情页
  27. export function deconstructArticle(data) {
  28. if (data) {
  29. data = data.replace(/<img/g, '<img style="width: 100% !important;height:auto"').replace(
  30. /<p>\S*<img/g, '<p style="line-height: 0;"><img');
  31. }
  32. return data;
  33. }