import request from '@/utils/request'

const api = {
  commonPage: '/system/common/permission/page',
  commonInfo: '/system/common/permission',
  add: '/system/common/permission'
}

export function fetchSettingCommonPage(params) {
  return request({
    url: api.commonPage,
    method: 'get',
    params
  })
}

export function fetchSettingCommonInfo(id) {
  return request({
    url: `${api.commonInfo}/${id}`,
    method: 'get'
  })
}

export function editSettingCommon(data) {
  return request({
    url: api.add,
    method: 'put',
    data
  })
}
