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

// 终端列表
export function getTerminalList(params) {
  return axios.get(`/THIRD-SERVER/terminal/terminalList?${stringToUrl(params)}`, params);
}

// 生成终端
export function generatingTerminal(params) {
    return axios.post(`/THIRD-SERVER/terminal/addTerminal`, params);
}

// 获取终端分销
export function getTerminalProportion(params) {
  return axios.post(`/THIRD-SERVER/terminalProportion/getTerminalProportion`, params);
}

// 提交终端比例
export function submitProportion(params) {
  return axios.post(`/THIRD-SERVER/terminalProportion/submit`, params);
}

// 获取待审核记录
export function getProportionCheck(params) {
  return axios.post(`/THIRD-SERVER/terminalProportion/getTerminalProportionCheck`, params);
}

// 修改审核状态

export function checkProportion(params) {
  return axios.post(`/THIRD-SERVER/terminalProportion/checkProportion`, params);
}

// 获取密钥
export function getSecretKey(params) {
  return axios.get(`/THIRD-SERVER/merchantInfo/getSecretKey?${stringToUrl(params)}`, params);
}

// 生成密钥
export function generateSecretKey(params) {
  return axios.get(`/THIRD-SERVER/merchantInfo/generateSecretKey?${stringToUrl(params)}`, params);
}

// 获取审核记录
export function getProportionCheckList(params) {
  return axios.post(`/THIRD-SERVER/terminalProportion/getTerminalProportionCheckList`, params);
}