import { POST } from './Request.js'; let app = getApp(); let base = app.globalData.url; // 登录接口 export const userLogin = params => { return POST('POST', `${base}/login/userLogin`, params).then(res => res.data); } //获取openid export const getAccessToken = params => { return POST('GET', `${base}/wechat/getAccessToken`, params).then(res => res.data); } //退出登录 export const logout = params => { return POST('POST', `${base}/login/logout`, params).then(res => res.data); } //银行卡识别 export const recognizeBankCard = params => { return POST('GET', `${base}/ocr/recognizeBankCard`, params).then(res => res.data); } //访问临时路径 export const getImgSignedUrl = params => { return POST('POST', `${base}/fileUpload/getImgSignedUrl`, params).then(res => res.data); } //营业执照识别 export const recognizeBusinessLicense = params => { return POST('GET', `${base}/ocr/recognizeBusinessLicense`, params).then(res => res.data); } // 身份证识别【正反面】 export const recognizeIdCard = params => { return POST('GET', `${base}/ocr/recognizeIdCard`, params).then(res => res.data); } // 查询行业 export const getIndustry = params => { return POST('GET', `${base}/common/getIndustry`, params).then(res => res.data); } // 上传商户图片 export const uploadFile = params => { return POST('POST', `${base}/mer/uploadFile`, params).then(res => res.data); } //第一步上传商户信息 export const configMerAccount = params => { return POST('POST', `${base}/mer/configMerAccount`, params).then(res => res.data); } //查询商户详情 export const getMerDetail = params => { return POST('GET', `${base}/mer/getMerDetail`, params).then(res => res.data); } //第二步商户基本信息 export const configMerBasis = params => { return POST('POST', `${base}/mer/configMerBasis`, params).then(res => res.data); } //第三步商户结算信息 export const configMerSettlement = params => { return POST('POST', `${base}/mer/configMerSettlement`, params).then(res => res.data); } //获取银行卡bin信息 export const getBankCardBin = params => { return POST('GET', `${base}/common/getBankCardBin`, params).then(res => res.data); } //获取银行支行列表 export const getBankList = params => { return POST('GET', `${base}/common/getBankList`, params).then(res => res.data); } //银行开户许可证识别 export const recognizeBankAccount = params => { return POST('GET', `${base}/ocr/recognizeBankAccount`, params).then(res => res.data); } //第四步商户门店信心 export const configMerStore = params => { return POST('POST', `${base}/mer/configMerStore`, params).then(res => res.data); } //业务员查询商户 export const getMerListBySalesman = params => { return POST('GET', `${base}/mer/getMerListBySalesman`, params).then(res => res.data); } //业务员查询mcc export const getMccList = params => { return POST('GET', `${base}/common/getMccList`, params).then(res => res.data); } //查询所有数据字典 export const getDictionaries = params => { return POST('GET', `${base}/common/getDictionaries`, params).then(res => res.data); } //查询数据字典 export const getDictionaryByCodeType = params => { return POST('GET', `${base}/common/getDictionaryByCodeType`, params).then(res => res.data); } //查询商户门店 export const getStoreListByMer = params => { return POST('GET', `${base}/store/getStoreListByMer`, params).then(res => res.data); } //查询商户门店详情 export const getStoreDetailById = params => { return POST('GET', `${base}/store/getStoreDetailById`, params).then(res => res.data); } //商户添加门店 export const configStore = params => { return POST('POST', `${base}/store/configStore`, params).then(res => res.data); } //修改结算信息 export const createApplyUpdateSettle = params => { return POST('POST', `${base}/merSettleAcct/createApplyUpdateSettle`, params).then(res => res.data); } //查询商户最新申请修改 export const getLastApplyByMer = params => { return POST('GET', `${base}/merSettleAcct/getLastApplyByMer`, params).then(res => res.data); } //查询商户修改结算申请列表 export const getAuditList = params => { return POST('GET', `${base}/audit/getAuditList`, params).then(res => res.data); } //通过审核 export const approve = params => { return POST('POST', `${base}/audit/approve`, params).then(res => res.data); } //驳回审核 export const reject = params => { return POST('POST', `${base}/audit/reject`, params).then(res => res.data); } //审核详情 export const getAuditDetail = params => { return POST('GET', `${base}/audit/getAuditDetail`, params).then(res => res.data); } //申请分期 export const apply = params => { return POST('POST', `${base}/merPlatformPeriod/apply`, params).then(res => res.data); } //查询分期详情 export const getMerPlatformPeriodDetail = params => { return POST('GET', `${base}/merPlatformPeriod/getMerPlatformPeriodDetail`, params).then(res => res.data); } //查询贴息列表 export const getFeePaidList = params => { return POST('GET', `${base}/merPlatformPeriod/getFeePaidList`, params).then(res => res.data); } //修改支付贴息方式 export const updateFeePaid = params => { return POST('POST', `${base}/merPlatformPeriod/updateFeePaid`, params).then(res => res.data); } // ---------- 设备 ---------- //查询设备列表 export const getDeviceList = params => { return POST('GET', `${base}/device/getDeviceList`, params).then(res => res.data); } //订单分配设备 export const assignOrder = params => { return POST('POST', `${base}/deviceOrder/assignOrder`, params).then(res => res.data); } //查询设备订单列表 export const getOrderList = params => { return POST('GET', `${base}/deviceOrder/getOrderList`, params).then(res => res.data); } //查询订单详情 export const getOrderDetail = params => { return POST('GET', `${base}/deviceOrder/getOrderDetail`, params).then(res => res.data); } //支付订单 export const payOrder = params => { return POST('POST', `${base}/deviceOrderPay/payOrder`, params).then(res => res.data); } //创建设备订单 export const createDeviceOrder = params => { return POST('POST', `${base}/deviceOrder/createDeviceOrder`, params).then(res => res.data); } //查询设备价格 export const getDevicePrice = params => { return POST('GET', `${base}/device/getDevicePrice`, params).then(res => res.data); } //更换设备 export const replace = params => { return POST('POST', `${base}/deviceOrder/replace`, params).then(res => res.data); } // 订单退款 export const orderRefund = params => { return POST('POST', `${base}/deviceOrder/orderRefund`, params).then(res => res.data); } //订单分配退款 export const deviceRefund = params => { return POST('POST', `${base}/deviceOrder/deviceRefund`, params).then(res => res.data); } // ---------------- // //门店添加设备 // export const bindStoreDevice = params => { // return POST('POST', `${base}/device/bindStoreDevice`, params).then(res => res.data); // } // //业务员查询设备列表 // export const getSalesmanDeviceList = params => { // return POST('GET', `${base}/device/getSalesmanDeviceList`, params).then(res => res.data); // } // //门店查询设备列表 // export const getStoreDeviceList = params => { // return POST('GET', `${base}/device/getStoreDeviceList`, params).then(res => res.data); // } //业务员查询统计 export const moveHomeCount = params => { return POST('POST', `${base}/salesman/moveHomeCount`, params).then(res => res.data); } //商户查询统计 export const mermoveHomeCount = params => { return POST('POST', `${base}/mer/moveHomeCount`, params).then(res => res.data); } //门店查询统计 export const storemoveHomeCount = params => { return POST('POST', `${base}/store/moveHomeCount`, params).then(res => res.data); } // 查询交易订单列表 export const getTradeOrderList = params => { return POST('GET', `${base}/tradeOrder/getTradeOrderList`, params).then(res => res.data); } //业务员绑定门店二维码 export const bindStore = params => { return POST('POST', `${base}/payQrCode/bindStore`, params).then(res => res.data); } //业务员查询二维码列表 export const getSalesmanQrCodeList = params => { return POST('GET', `${base}/payQrCode/getSalesmanQrCodeList`, params).then(res => res.data); } //门店查询二维码列表 export const getStoreQrCodeList = params => { return POST('GET', `${base}/payQrCode/getStoreQrCodeList`, params).then(res => res.data); } //商户分账功能申请 export const merLedgerApply = params => { return POST('POST', `${base}/merLedger/merLedgerApply`, params).then(res => res.data); } //查询商户分账功能 export const getMerLedgerApply = params => { return POST('GET', `${base}/merLedger/getMerLedgerApply`, params).then(res => res.data); } //商户分账绑定接受方申请 export const merLedgerReceiverApply = params => { return POST('POST', `${base}/merLedger/merLedgerReceiverApply`, params).then(res => res.data); } //查询分账接收方列表 export const getLedgerReceiverListByMer = params => { return POST('GET', `${base}/merLedger/getLedgerReceiverListByMer`, params).then(res => res.data); } //查询接收方列表 export const getLedgerReceiverList = params => { return POST('GET', `${base}/merLedger/getLedgerReceiverList`, params).then(res => res.data); } //分账解绑接收方申请 export const merLedgerReceiverDelApply = params => { return POST('POST', `${base}/merLedger/merLedgerReceiverDelApply`, params).then(res => res.data); } //查询接收方详情 export const getLedgerReceiverById = params => { return POST('GET', `${base}/merLedger/getLedgerReceiverById`, params).then(res => res.data); } //查询活动列表 export const queryActivityList = params => { return POST('GET', `${base}/bankActivity/queryActivityList`, params).then(res => res.data); } //查询活动详情 export const queryActivityDetail = params => { return POST('GET', `${base}/bankActivity/queryActivityDetail`, params).then(res => res.data); } //报名活动 export const enrollActivity = params => { return POST('POST', `${base}/bankActivity/enrollActivity`, params).then(res => res.data); } // 配置费率 export const configRosterRate = params => { return POST('POST', `${base}/bankActivity/configRosterRate`, params).then(res => res.data); } //进件复议 export const reconsider = params => { return POST('POST', `${base}/mer/reconsider`, params).then(res => res.data); } //根据商户查询结算 export const getSettleAcctByMer = params => { return POST('GET', `${base}/merSettleAcct/getSettleAcctByMer`, params).then(res => res.data); } // 查询商户渠道平台列表 export const getMerPlatformList = params => { return POST('GET', `${base}/merPlatform/getMerPlatformList`, params).then(res => res.data); } // 查询商户 export const getMerList = params => { return POST('GET', `${base}/mer/getMerList`, params).then(res => res.data); } // 查询业务员 export const querySalesmanList = params => { return POST('GET', `${base}/salesman/querySalesmanList`, params).then(res => res.data); } //查询订单详情 export const getOrderByOutTradeOrder = params => { return POST('GET', `${base}/tradeOrder/getOrderByOutTradeOrder`, params).then(res => res.data); } // #根据商户查询费率 export const getRateByMer = params => { return POST('GET', `${base}/merRate/getRateByMer`, params).then(res => res.data); } // #编辑费率申请 export const editRateApply = params => { return POST('POST', `${base}/merRate/editRateApply`, params).then(res => res.data); } // #查询最新申请信息 export const getNewRateApplyDetail = params => { return POST('GET', `${base}/merRate/getNewRateApplyDetail`, params).then(res => res.data); } //#查询费率申请详情 export const getRateApplyDetail = params => { return POST('GET', `${base}/merRate/getRateApplyDetail`, params).then(res => res.data); } // # 设备绑定门店 export const devicebindStore = params => { return POST('POST', `${base}/device/bindStore`, params).then(res => res.data); } //# 设备解绑门店 export const unbindStore = params => { return POST('POST', `${base}/device/unbindStore`, params).then(res => res.data); } //切换渠道 export const switchPlatform = params => { return POST('POST', `${base}/merPlatform/switchPlatform`, params).then(res => res.data); } //获取账户信息 export const queryAccount = params => { return POST('GET', `${base}/rebateMerAccount/queryAccount`, params).then(res => res.data); } //获取账户交易记录 export const queryAccountRecordList = params => { return POST('GET', `${base}/rebateMerAccount/queryAccountRecordList`, params).then(res => res.data); } //获取账户交易详情 export const queryAccountRecordDetail = params => { return POST('GET', `${base}/rebateMerAccount/queryAccountRecordDetail`, params).then(res => res.data); } //账户充值 export const rebateCreate = params => { return POST('POST', `${base}/rebateMerAccountOrder/create`, params).then(res => res.data); } //获取账户充值记录 export const queryOrderList = params => { return POST('GET', `${base}/rebateMerAccountOrder/queryOrderList`, params).then(res => res.data); } //获取充值订单详情 export const queryOrderDetail = params => { return POST('GET', `${base}/rebateMerAccountOrder/queryOrderDetail`, params).then(res => res.data); } ////////活动///// //添加活动 export const addActivity = params => { return POST('POST', `${base}/rebateActivity/addActivity`, params).then(res => res.data); } //修改活动 export const updateActivity = params => { return POST('POST', `${base}/rebateActivity/updateActivity`, params).then(res => res.data); } //开启活动 export const openActivity = params => { return POST('POST', `${base}/rebateActivity/openActivity`, params).then(res => res.data); } //关闭活动 export const closeActivity = params => { return POST('POST', `${base}/rebateActivity/closeActivity`, params).then(res => res.data); } //调整、修改活动结束时间 export const updateActivityEndTime = params => { return POST('POST', `${base}/rebateActivity/updateActivityEndTime`, params).then(res => res.data); } //查询活动详情 export const getActivityDetail = params => { return POST('GET', `${base}/rebateActivity/getActivityDetail`, params).then(res => res.data); } //活动列表 export const getActivityList = params => { return POST('GET', `${base}/rebateActivity/getActivityList`, params).then(res => res.data); } //充值活动金额 export const recharge = params => { return POST('POST', `${base}/rebateActivityAccount/recharge`, params).then(res => res.data); } //回收活动余额 export const recover = params => { return POST('POST', `${base}/rebateActivityAccount/recover`, params).then(res => res.data); } //查询活动余额 export const getActivityAccount = params => { return POST('GET', `${base}/rebateActivityAccount/getActivityAccount`, params).then(res => res.data); } //退款 export const refund = params => { return POST('POST', `${base}/tradeOrderRefund/refund`, params).then(res => res.data); }