import Service from '../lib/service.js'
import axios from 'axios'
import Config from '../config'

class UCardService extends Service {
  constructor() {
    super()
    axios.defaults.baseURL = Config.Host85
  }

  // 申请详情
  async applyDetails(params = {}) {
    return await this.post('/wasabi/card/apply/details', params)
  }
  // 查询开卡进度
  async ucardApplyProgress(params = {}) {
    return await this.post('/wasabi/card/apply/progress', params)
  }
  // 获取卡片申请列表
  async applyList(params = {}) {
    return await this.post('/wasabi/card/apply/page', params)
  }
  // 银行卡下拉框
  async cardNumberDropdown(params = {}) {
    return await this.post('/wasabi/card/number/dropdown', params)
  }
  // 国家城市
  async ucardCountryCity(params = {}) {
    return await this.post('/wasabi/card/country', params)
  }
  // 银行卡激活
  async ucardActivate(params = {}) {
    return await this.post('/wasabi/card/activate', params)
  }
  // 冻结卡片
  async ucardFreeze(params = {}) {
    return await this.post('/wasabi/card/freeze', params)
  }
  // 解冻卡片
  async ucardUnfreeze(params = {}) {
    return await this.post('/wasabi/card/unfreeze', params)
  }
  // 银行卡充值
  async ucardRecharge(params = {}) {
    return await this.post('/wasabi/card/recharge', params)
  }
  // 银行卡扣款
  async ucardRithdraw(params = {}) {
    return await this.post('/wasabi/card/withdraw', params)
  }
  //获取卡片类型列表
  async cardTypesList(params = {}) {
    return await this.post('/wasabi/card/types/page', params)
  }

  // 开卡审批
  async applyApprove(params = {}) {
    return await this.post('/wasabi/card/apply/approve', params)
  }
  // 申请卡片更新地址
  async addressUpdate(params = {}) {
    return await this.post('/wasabi/merchant/user/address/update', params)
  }

  // 申请开卡
  async ucardApply(params = {}) {
    return await this.post('/wasabi/card/apply', params)
  }
  // 充值审批
  async rechargeApprove(params = {}) {
    return await this.post('/wasabi/card/recharge/approve', params)
  }

  // 找回密码
  async ucardResetPassword(params = {}) {
    return await this.post('/wasabi/card/password/reset', params)
  }

  // 提交KYC认证
  async kycSubmit(params = {}) {
    return await this.post('/wasabi/merchant/kyc/manual/submit', params)
  }

  // 卡片是否可用
  async numberVerify(params = {}) {
    return await this.post('/wasabi/card/number/verify', params)
  }

  // 获取激活卡
  async getActivationCode(params = {}) {
    return await this.post('/wasabi/get/activation/code', params)
  }

  // 调整余额
  async balanceUpdate(params = {}) {
    return await this.post('/wasabi/card/wallet/balance/update', params)
  }
  // 更新卡片类型配置
  async updateCardTypesConfig(params = {}) {
    return await this.post('/wasabi/card/type/config/update', params)
  }
  // 更新卡片类型列表
  async updateCardTypes(params = {}) {
    return await this.post('/wasabi/card/types', params)
  }

  // 上传KYC附件
  async kycUpload(params = {}) {
    return await this.post('/wasabi/merchant/kyc/upload', params)
  }
  // 证件类型配置列表
  async idTypesConfigList(params = {}) {
    return await this.post('/wasabi/card/id/type/config/list', params)
  }
  // 是否手动上传证件照
  async photoManually(params = {}) {
    return await this.post('/wasabi/card/photo/manually', params)
  }
  // 商户用户分页列表
  async merchantList(params = {}) {
    return await this.post('/wasabi/merchant/user/page', params)
  }
  // 商户用户注册
  async merchantRegister(params = {}) {
    return await this.post('/wasabi/merchant/user/register', params)
  }
  // 更新商户用户信息
  async merchantUpdate(params = {}) {
    return await this.post('/wasabi/merchant/user/update', params)
  }
  // 商户注册选择用户列表
  async merchantSearch(params = {}) {
    return await this.post('/custom/search/ucard', params)
  }
  // 查询职业信息
  async getOccupationList(params = {}) {
    return await this.post('/wasabi/card/occupation/list', params)
  }
  // 文件上传
  async ucardUpload(params = {}) {
    return await this.post('/wasabi/upload/file', params)
  }
  // 人脸详情
  async kycSearchSingle(params = {}) {
    return await this.post('/wasabi/kyc/status/single', params)
  }
  // 查询KYC认证状态
  async kycStatus(params = {}) {
    return await this.post('/wasabi/merchant/kyc/status', params)
  }

  // kyc列表
  async kycList(params = {}) {
    return await this.post('/wasabi/merchant/kyc/page', params)
  }
  // 查询卡片余额
  async ucardBalance(params = {}) {
    return await this.post('/wasabi/card/balance', params)
  }

  // 更新银行卡信息
  async getCardInfo(params = {}) {
    return await this.post('/wasabi/card/info/refresh', params)
  }

  // 查看cvv
  async queryCvv(params = {}) {
    return await this.post('/wasabi/card/query/cvv', params)
  }
  // 重新充值默认金额
  async rechargeUpdate(params = {}) {
    return await this.post('/wasabi/recharge/default/amount', params)
  }
  // 获取卡片列表
  async cardList(params = {}) {
    return await this.post('/wasabi/card/page', params)
  }
  // 查询交易记录分页列表
  async transactionsList(params = {}) {
    return await this.post('/wasabi/card/transac/page', params)
  }
  //查询最新汇率
  async globalLatestExchangeRate(params = {}) {
    return await this.post('/wasabi/global/query/latest/exchange/rate', params)
  }
  //更新手续费率
  async updateGlobalFee(params = {}) {
    return await this.post('/wasabi/global/currencies/config', params)
  }
  //币种更新
  async globalCurrenciesSave(params = {}) {
    return await this.post('/wasabi/global/currencies/save', params)
  }
  //币种下拉列表
  async globalCurrenciesDropdown(params = {}) {
    return await this.post('/wasabi/global/currencies/dropdown', params)
  }
  //查询币种全局配置
  async globalCurrenciesConfig(params = {}) {
    return await this.post('/wasabi/global/query/currencies/config', params)
  }
  //币种列表
  async globalCurrenciesList(params = {}) {
    return await this.post('/wasabi/global/currencies/list', params)
  }
  // 钱包记录分页列表
  async getRecordPage(params = {}) {
    return await this.post('/wasabi/card/wallet/record/page', params)
  }
  // 手机区号获取
  async countryGet(params = {}) {
    return await this.post('/country/get', params)
  }
  // 正则更新删除
  async permissionDelete(params = {}) {
    return await this.post('/wasabi/card/permission/delete', params)
  }
  // 正则更新
  async permissionUpdate(params = {}) {
    return await this.post('/wasabi/card/permission/update', params)
  }
  // 正则add
  async permissionAdd(params = {}) {
    return await this.post('/wasabi/card/permission/add', params)
  }
  // 正则列表
  async permissionPage(params = {}) {
    return await this.post('/wasabi/card/permission/page', params)
  }
  // 证件类型配置删除
  async idTypesConfigDelete(params = {}) {
    return await this.post('/wasabi/card/id/type/config/delete', params)
  }
  // 证件类型配置新增
  async idTypesConfigAdd(params = {}) {
    return await this.post('/wasabi/card/id/type/config/add', params)
  }
  // 银行卡删除
  async cardNumberDelete(params = {}) {
    return await this.post('/wasabi/card/number/delete', params)
  }
  // 银行卡列表
  async cardNumberList(params = {}) {
    return await this.post('/wasabi/card/number/list', params)
  }
  // 银行卡修改
  async cardNumberUpdate(params = {}) {
    return await this.post('/wasabi/card/number/update/status', params)
  }
  // 操作记录
  async operatePage(params = {}) {
    return await this.post('/wasabi/card/operate/page', params)
  }
  //列表
  async cardFileList(params = {}) {
    return await this.post('/wasabi/card/file/search/list', params)
  }
  //激活操作指南
  async cardFileAdd(params = {}) {
    return await this.post('/wasabi/card/file/add', params)
  }
  //更新
  async cardFileUpdate(params = {}) {
    return await this.post('/wasabi/card/file/update', params)
  }
  //删除
  async cardFileDelete(params = {}) {
    return await this.post('/wasabi/card/file/delete', params)
  }
  //查询已认证用户列表
  async cardUserList(params = {}) {
    return await this.post('/wasabi/card/query/user/list', params)
  }
  //查询手续费率和汇率
  async globalExchangeRate(params = {}) {
    return await this.post('/wasabi/global/query/exchange/rate', params)
  }
  // 最近收款人列表
  async globalReceiverList(params = {}) {
    return await this.post('/wasabi/global/receiver/user/list', params)
  }
  //币种字段和可选值列表
  async globalCurrenciesField(params = {}) {
    return await this.post('/wasabi/global/currencies/field/list', params)
  }
  //查询支持的城市列表
  async globalQueryBankCities(params = {}) {
    return await this.post('/wasabi/global/query/bank/cities', params)
  }
  //查询ucard账户信息
  async cardAccountDropdown(params = {}) {
    return await this.post('/wasabi/card/account/dropdown', params)
  }
  // 订单详情
  async globalOrdersDetail(params = {}) {
    return await this.post('/wasabi/global/order/details', params)
  }
  //取消交易订单
  async globalCancelOrder(params = {}) {
    return await this.post('/wasabi/global/cancel/order', params)
  }
  // 速汇订单审批
  async globalOrderApprove(params = {}) {
    return await this.post('/wasabi/global/order/approve', params)
  }
  // 补充资料
  async globalSupplementary(params = {}) {
    return await this.post('/wasabi/global/supplementary/data', params)
  }
  //速汇订单分页列表
  async globalOrdersList(params = {}) {
    return await this.post('/wasabi/global/order/page/list', params)
  }
  //创建订单
  async globalOrdersCreate(params = {}) {
    return await this.post('/wasabi/global/create/order', params)
  }
}

export default new UCardService()
