


import request from '@/utils/request'
 

export function ajaxDataPost(url,data) {
  return request({
    url: url,
    method: 'post',
    data:data
  })
}

export function ajaxDataGet(url,data) {
  return request({
    url: url,
    method: 'get',
    params: data
  })
}


export function ajaxDataPut(url,data) {
  return request({
    url: url,
    method: 'put',
    data: data
  })
}

export function ajaxDataDelete(url,data) {
  return request({
    url: url,
    method: 'delete',
    data: data
  })
}
 


export function ajaxDataLogin(url,data) {
 
  return request({
    url: url,
    method: 'post',
    data:data,
    headers:{  } 
  })
}

 
 
export function checkButtons(buttonsList, buttonName) {
   console.log(buttonsList)
  for (let i = 0; i < buttonsList.length; i++) {
    if (buttonsList[i].menu_name === buttonName ) {  
      return true
    }
  }
  return false
}