import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/sing_desk/platformsetting/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/sing_desk/platformsetting/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/sing_desk/platformsetting/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/sing_desk/platformsetting/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/sing_desk/platformsetting/submit',
    method: 'post',
    data: row
  })
}

export const getPlatformSetting = (key,activeId) => {
  return request({
    url: '/api/app/platformsetting/getPlatformValue',
    method: 'get',
    params: {
      platformSettingEnum:key,
      activeId:activeId,
    }
  })
}

export const updatePlatformValue = (params) => {
  return request({
    url: '/api/app/platformsetting/updatePlatformValue',
    method: 'post',
    data: {
      ...params
    }
  })
}
