
// 协议
export const protocolInfo = (params) => uni.$uv.http.get(`/protocol/info`, { params })

// 常见问题
export const problemPage = (params) => uni.$uv.http.get(`/common/problem/page`, { params })

// 常见问题详情
export const problemInfo = (id) => uni.$uv.http.get(`/common/problem/info/${id}`, {})

// 新增商家申请
export const businessApplyAdd = (data) => uni.$uv.http.post(`/business/businessApply/add`, data)

// 商家修改商家信息申请
export const businessApplyUpdate = (data) => uni.$uv.http.post(`/business/businessUpdateRecord/add`, data)

// 查询商家申请列表
export const businessApplyPage = (params) => uni.$uv.http.get(`/business/businessApply/page`, { params })

// 获取商家申请详细信息
export const businessApplyInfo = (id) => uni.$uv.http.get(`/business/businessApply/info/${id}`, {})

// 查询商家申请信息
export const businessApplyApplyInfo = (params) => uni.$uv.http.get(`/business/businessApply/applyInfo`, { params })

// 获取商家物流配置详细信息
export const businessLogisticsConfigInfo = (businessId) => uni.$uv.http.get(`/business/businessLogisticsConfig/info/${businessId}`, {})

// 查询商家自提地址列表
export const businessSelfPickupAddressList = (businessId) => uni.$uv.http.get(`/business/businessSelfPickupAddress/list/${businessId}`, {})

// 查询用户在消费商家的余额记录列表
export const userBalanceRecordPage_Api = (params) => uni.$uv.http.get(`/user/userBalanceRecord/page`, { params })

// 查询用户在消费商家的积分记录列表
export const userBusinessIntegralRecordPage_Api = (params) => uni.$uv.http.get(`/business/userBusinessIntegralRecord/page`, { params })

// 查询商家收货地址
export const userBusinessReturnAddressInfo_Api = (businessId) => uni.$uv.http.get(`/business/businessReturnAddress/info/${businessId}`, {})

// 获取地区树
export const cnareaTreeLbs = (params) => uni.$uv.http.get(`/base/cnArea/tree-lbs`, { params })

// 上传OSS对象存储
export const commonUpload_api = (filePath, formData) => uni.$uv.http.upload('/common/upload', {
    filePath: filePath,
    name: 'file',
    formData
})

// 上传OSS对象存储-旋转
export const commonUploadOrient_api = (filePath, formData) => uni.$uv.http.upload('/common/uploadOrient', {
    filePath: filePath,
    name: 'file',
    formData
})

// Base64图片上传OSS
export const commonUploadBase_api = (data) => uni.$uv.http.post('/common/uploadBase', data)

// 可以领取的优惠券
export const couponPage_Api = (params) => uni.$uv.http.get(`/coupon/coupon/page`, { params });

// 领取优惠券
export const couponReceiveRecordAdd_Api = (couponId) => uni.$uv.http.post(`/coupon/couponReceiveRecord/receive/${couponId}`, {})

// 查询优惠券领取记录与使用情况列表
export const couponReceiveRecordPage_Api = (params) => uni.$uv.http.get(`/coupon/couponReceiveRecord/page`, { params });

// 下单时选择通用券
export const selectUniversal_Api = (params) => uni.$uv.http.get(`/coupon/couponReceiveRecord/selectUniversal`, { params });

// 快递公司查询
export const expressCompanyList_Api = (params) => uni.$uv.http.get(`/common/expressCompanyList`, { params });

// 查询商家申请待审核列表
export const businessApplyWaitPage_Api = (params) => uni.$uv.http.get(`/business/businessApply/waitPage`, { params })

// 查询商家申请已审核列表
export const businessApplyAuditPage_Api = (params) => uni.$uv.http.get(`/business/businessApply/auditPage`, { params })

// 审核商家申请
export const businessApplyAudit_Api = (data) => uni.$uv.http.post('/business/businessApply/audit', data)


// 营业执照识别
export const ocrBusinessLic_Api = (params) => uni.$uv.http.get(`/jzq/ocr/businessLic`, { params });

// 身份证识别
export const ocrIdcard_Api = (params) => uni.$uv.http.get(`/jzq/ocr/idcard`, { params });

// 银行卡识别
export const ocrBank_Api = (params) => uni.$uv.http.get(`/jzq/ocr/bank`, { params });


// 修改基本商家信息
export const businessUpdate_Api = (data) => uni.$uv.http.post(`/ticket/business/update`, data);

// 分页查询积分核销记录
export const pageVerifyRecord_Api = (params) => uni.$uv.http.get(`/business/integralVerifier/pageVerifyRecord`, { params })

// 商家积分核销统计
export const verifyStatistics_Api = (params) => uni.$uv.http.get(`/business/integralVerifier/verifyStatistics`, { params })

// 积分核销
export const integralVerifierVerify_Api = (data) => uni.$uv.http.post('/business/integralVerifier/verify', data)

// 会员码查用户信息
export const queryUserInfo_Api = (code) => uni.$uv.http.get(`/business/integralVerifier/queryUserInfo/${code}`, {})

// 判断核销码是否有效
export const integralVerifierValid_Api = (params) => uni.$uv.http.get(`/business/integralVerifier/verificationCodeIsValid`, { params })

// 查询委托授权书模板URL
export const queryAuthorizationTemplateUrl_Api = (params) => uni.$uv.http.get(`/ticket/business/queryAuthorizationTemplateUrl`, { params });

// 获取商家结算信息详细信息
export const businessSettlementInfo_Api = (params) => uni.$uv.http.get(`/business/businessSettlement/info`, { params });

// 获取最新APP版本
export const appVersionNewest_Api = (params) => uni.$uv.http.get(`/version/appVersion/newest`, { params });


// 余额兑换积分
export const balanceToIntegral_Api = (data) => uni.$uv.http.post(`/business/integralVerifier/balanceToIntegral`, data);

// 获取广告位广告
export const getAdList_Api = (locationCode) => uni.$uv.http.get(`/ad/list/${locationCode}`, {});

// 根据位置标识码查询金刚区列表
export const getQuickLinkList_Api = (locationCode) => uni.$uv.http.get(`/quick/link/list/${locationCode}`, {});
