import request from '@/utils/request'

export function _getCustomers() {
  return request({
    url: '/BaseInfo/GetCustomers',
    method: 'get'
  })
}

export function _getChannel() {
  return request({
    url: '/BaseInfo/GetChannel',
    method: 'get'
  })
}
export function _getPublicChannel() {
  return request({
    url: '/BaseInfo/GetChannel',
    method: 'get'
  })
}
export function _getChannelList() {
  return request({
    url: '/BaseInfo/GetChannelList',
    method: 'get'
  })
}

export function _getAllPublic() {
  return request({
    url: '/BaseInfo/GetAllPublic',
    method: 'get'
  })
}

export function _getDeliverChannel() {
  return request({
    url: '/BaseInfo/GetDeliverChannel',
    method: 'get'
  })
}

export function _getAllDeliverChannel() {
  return request({
    url: '/BaseInfo/CacheGetAllChannel',
    method: 'get'
  })
}

export function _getFinanceCompanys() {
  return request({
    url: '/BaseInfo/GetFinanceCompanys',
    method: 'get'
  })
}

export function _getUserInfos(roleName) {
  return request({
    url: '/BaseInfo/GetUserInfos',
    method: 'get',
    params: { roleName }
  })
}

export function _getAllUsers() {
  return request({
    url: '/BaseInfo/GetAllUsers',
    method: 'get'
  })
}

export function _getOperationName() {
  return request({
    url: '/BaseInfo/GetOperationName',
    method: 'get'
  })
}

export function _getChannelAPIList() {
  return request({
    url: '/BaseInfo/GetChannelAPIList',
    method: 'get'
  })
}

export function _getDockingPlatform() {
  return request({
    url: '/BaseInfo/GetDockingPlatform',
    method: 'get'
  })
}

export function _getSupplementSheet() {
  return request({
    url: '/BaseInfo/GetSupplementSheet',
    method: 'get'
  })
}
export function _getSettlementCompanys() {
  return request({
    url: '/BaseInfo/GetSettlementCompanys',
    method: 'get'
  })
}

export function _getSourceTargets() {
  return request({
    url: '/BaseInfo/getSourceTargets',
    method: 'get'
  })
}

export function _getOrderQuestion() {
  return request({
    url: '/BaseInfo/getOrderQuestion',
    method: 'get'
  })
}
export function _getEmailType() {
  return request({
    url: '/BaseInfo/getEmailType',
    method: 'get'
  })
}

export function _getFinanceIncidentalType() {
  return request({
    url: '/BaseInfo/GetFinanceIncidentalType',
    method: 'get'
  })
}

export function _getFinanceIncidentalFeeType() {
  return request({
    url: '/FinanceIncidentalType/GetFinanceIncidentalTypes',
    method: 'get'
  })
}

export function _getCalculationMethod() {
  return request({
    url: '/BaseInfo/GetCalculationMethod',
    method: 'get'
  })
}

export function _getPaymentStatus() {
  return request({
    url: '/BaseInfo/GetPaymentStatus',
    method: 'get'
  })
}

export function _getCountries() {
  return request({
    url: '/BaseInfo/GetCountries',
    method: 'get'
  })
}

export function _getTransferNumberType() {
  return request({
    url: '/BaseInfo/getTransferNumberType',
    method: 'get'
  })
}

export function _getChannelType() {
  return request({
    url: '/BaseInfo/getChannelType',
    method: 'get'
  })
}

export function _getZipHelpels() {
  return request({
    url: '/BaseInfo/GetZipHelpels',
    method: 'get'
  })
}

export function _getBillingCycle() {
  return request({
    url: '/BaseInfo/getBillingCycle',
    method: 'get'
  })
}
export function _getSettlementCycleEnum() {
  return request({
    url: '/BaseInfo/getSettlementCycleEnum',
    method: 'get'
  })
}

export function _getDeductionNodesEnum() {
  return request({
    url: '/BaseInfo/getDeductionNodesEnum',
    method: 'get'
  })
}

export function _getCalculateTypes() {
  return request({
    url: '/BaseInfo/GetCalculateTypes',
    method: 'get'
  })
}
export function _getCalculateWeightTypes() {
  return request({
    url: '/BaseInfo/GetCalculateWeightTypes',
    method: 'get'
  })
}
export function _getFBAChannel() {
  return request({
    url: '/BaseInfo/GetFBAChannel',
    method: 'get'
  })
}

// 企微绑定信息
export function _getWXCUstomres(userId) {
  return request({
    url: '/Customer/GetWXCUstomres',
    method: 'get',
    params: { userId },
    transformResponse(response) {
      const data = JSON.parse(response)
      const res = data.data || data.Data
      return res
    }
  })
}
export function _GetWXCustomer(customerId) {
  return request({
    url: '/Customer/GetWXCustomer',
    method: 'get',
    params: { customerId }
  })
}
export function _BindWXCustomers(data) {
  return request({
    url: '/Customer/BindWXCustomers',
    method: 'post',
    data
  })
}
export function _UnBindWXCustomers(data) {
  return request({
    url: '/Customer/UnBindWXCustomers',
    method: 'post',
    data
  })
}

export function _getReComputeVerType() {
  return request({
    url: '/BaseInfo/GetReComputeVerType',
    method: 'get'
  })
}
export function _getReCustomerComputeType() {
  return request({
    url: '/BaseInfo/GetReCustomerComputeType',
    method: 'get'
  })
}

export function _getOwningWarehouseTypes() {
  return request({
    url: '/BaseInfo/GetOwningWarehouseTypes',
    method: 'get'
  })
}

/**
 * 预报节点列表
 * @returns
 */
export function _getForecastNodeList() {
  return request({
    baseURL: 'http://wms.xingyunyi.cn/api',
    url: '/BaseInfo/GetForecastNode',
    method: 'get'
  })
}

export function _getDownloadUrl() {
  return request({
    url: '/customer/GetDownloadUrl',
    method: 'post'
  })
}

export function _getPayTypeList() {
  return request({
    url: '/customer/GetPayTypeList',
    method: 'get'
  })
}
