import request from '@/utils/require'
import { root } from '@/api/index'

export function getMenuList() {
	return request({
    url: `${root}/module/getData`,
    method: 'get',
  });
}

export function getLinkList() {
  return request({
    url: `${root}/externalLink/findByType`,
    method: 'get',
  });
}

export function getImgList() {
  return request({
    url: `${root}/picture/findByType`,
    method: 'get',
  });
}
export function getArticleTitle(id) {
  return request({
    url: `${root}/module/findArticleName?id=${id}`,
    method: 'get'
  });
}
export function getArticleTitleChange(id) {
  return request({
    url: `${root}/articles/findByModuleIdTop10/${id}`,
    method: 'get'
  });
}

export function getArticleList(page,size,title) {
  return request({
    url: `${root}/articles/findByModuleId/${page}/${size}`,
    method: 'post',
    data:JSON.stringify({title})
  });
}

