import axios from '@/utils/axios';
import { stringToUrl } from '@/common/js/utils';


// 新商户入驻申请
export function newSaveHuifuMch(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/addApplication`, params);
}

// 汇付用户开户或业务开通
export function openAccount(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/openAccount?${stringToUrl(params)}`);
}

// 商户入驻申请
export function saveHuifuMch(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/addMerchant`, params);
}

// 获取审核信息
export function getHuifuMchCheck(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuMchCheck?${stringToUrl(params)}`);
}

// 上传材料图片
export function uploadPic(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/uploadPic`, params);
}

// 新上传材料图片
export function newUploadPic(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/newUploadPic`, params);
}

// 提交审核
export function submitHuifuCheck(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/submitCheck`, params);
}

// 提交修改审核
export function updateMerchant(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/updateMerchant`, params);
}

// 发送验证码
export function sendSms(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/sendSms?${stringToUrl(params)}`);
}

// 获取商户号
export function getHuifuId(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/getHuifuId?${stringToUrl(params)}`);
}

// 直接审核商户修改
export function auditMerchantUpdate(params) {
    return axios.post(`/SZWL-SERVER/tHuifuMch/auditMerchantUpdate`, params);
}

// 汇付账号修改审批
export function auditUpdateMerchant(params) {
    return axios.get(`/SZWL-SERVER/tHuifuMch/auditUpdateMerchant?${stringToUrl(params)}`);
}

