import { MainRequest } from '../../utils'

/**
 * 原来支付相关
 */

// 查询花呗手续费配置
export const getOrderHuabeiConfigApi = (data) => MainRequest('/order/getHuabeiConfig', data)

//  APP立即支付
export const gotoOrderAppPayApi = (data) => MainRequest('/order/gotoAppPay', data, 'POST')

// 商城订单-通联H5支付
export const gotoOrderH5PayApi = (data) => MainRequest('/order/gotoH5Pay', data, 'POST')

// 小程序支付
export const gotoOrderPayApi = (data) => MainRequest('/order/gotoPay', data, 'POST')

// 小程序支付成功
export const payOrderSuccessApi = (data) => MainRequest('/order/paySuccess', data, 'POST')

/**
 * 原来订单相关
 */

// 订单详情查询
export const getOrderDetailApi = (data) => MainRequest('/order/getById', data)

/**
 * 原来信息相关
 */

// 我的账户信息查询
export const getDistributorApi = (data) => MainRequest('/distributor/getDistributor', data)

// 服务协议-查询分类层级
export const getQueryDictByNameApi = (data) => MainRequest('/dict/getByName', data)

// 微信登录
export const updateWXLoginApi = (data) => MainRequest('/app/wxLogin', data, 'POST')

// APP微信登录
export const updateWXAppLoginApi = (data) => MainRequest('/app/wxAppLogin', data, 'POST')

// 获取短信验证码
export const getVerifyCodeApi = (data) => MainRequest('/app/getCode', data)

/**
 * 申请记录
 */

// 用户商家申请记录查询
export const getApplyByStoreListApi = (data) => MainRequest('/check/getApplyByUserId', data)

// 用户分公司与策划师申请记录查询
export const getApplyByUserListApi = (data) => MainRequest('/check/getApplyByUserId2', data)

// 套餐购买提交订单
export const paySubmitSettleApi = (data) => MainRequest('/order/submitSettle', data, 'POST')

// // H5入驻购买支付
// export const payGotoH5SettlePayApi = (data) => MainRequest('/order/gotoH5SettlePay', data, 'POST')

/**
 * 代金券
 */

// 代金券购买提交订单
export const paySubmitVoucherApi = (data) => MainRequest('/order/submitVoucher', data, 'POST')

// // H5代金券购买支付
// export const payGotoH5VoucherApi = (data) => MainRequest('/order/gotoH5Voucher', data, 'POST')

/**
 * 地图红包
 */

// 查询商家范围内地图红包
export const getWrapRedReleaseApi = (data) => MainRequest('/wrapRed/releaseWrap', data, 'POST')

// 用户领取红包
export const addWrapRedReceiveApi = (data) => MainRequest('/wrapRed/receiveWrap', data, 'POST')

// 用户或商家发布红包
export const addWrapRedReleaseApi = (data) => MainRequest('/wrapRed/release', data, 'POST')

// TODO查询我的发布红包
export const getWrapRedselectApi = (data) => MainRequest('/wrapRed/selectWrap', data)

/**
 * 商家优惠券
 */

// 查询商家的优惠卷
export const getBrandCouponListApi = (data) => MainRequest('/wrapRed/selectWrapId', data)

/**
 * 本地生活
 */

// 查询店铺分类
export const getCategoryListApi = (data) => MainRequest('/shopCategory/getShopCategoryLevel', data)

// 查询店铺父级分类查询子级分类
export const getSubMenuByPidApi = (data) => MainRequest('/shopCategory/getShopCategorySon', data)

// 附近商家
export const getHomeBrandListApi = (data) => MainRequest('/shop/getShopAll', data, 'POST')

// 生成用户订单的核销码
export const getOrderVerificationHxCodeApi = (data) => MainRequest('/orderVerificationCode/getHxCode', data)

// 核销订单
export const updateSetHxCodeApi = (data) => MainRequest('/order/write', data, 'POST')

/**
 * 本地生活
 */

// 用户扫码绑定
export const bindPlatformInfoCodeApi = (data) => MainRequest('/platformInfoCode/binding', data, 'POST')
