import request from '@/utils/request'
import qs from 'qs'
let api = '/api-web'

// 获取配置分部
export function getPaymentConfigs(data) {
    return request({
      url: api + '/paymentConfig/getPaymentConfigs',
      method: 'get',
      params: data
    })
}

// 新增按费用类型配置
export function addTypeRoute(data) {
  return request({
    url: api + '/paymentConfig/addTypeRoute',
    method: 'post',
    headers: {
      'content-type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify(data)
  })
}

// 更新按费用类型配置
export function updateTypeRoute(data) {
  return request({
    url: api + '/paymentConfig/updateTypeRoute',
    method: 'post',
    headers: {
      'content-type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify(data)
  })
}

// 删除按费用类型配置
export function delTypeRoute(data) {
  return request({
    url: api + '/paymentConfig/delTypeRoute',
    method: 'post',
    headers: {
      'content-type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify(data)
  })
}