import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/api/v1/alipay/page',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data
  })
}

export function add(data) {
  return request({
    url: '/api/v1/alipay/add',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data
  })
}

export function deleteById(id) {
  return request({
    url: `/api/v1/alipay/del/${id}`,
    method: 'get'
  })
}

export function updateStatusById(id, status = false) {
  return request({
    url: `/api/v1/alipay/${status ? 'enable' : 'cancel'}/${id}`,
    method: 'get'
  })
}
