import { http } from '@/utils/http/axios';
import { ApiEnum } from '@/enums/apiEnum';

export function getTableList(params) {
  return http.request({
    url: ApiEnum.UserAccountList,
    method: 'get',
    params,
  });
}

export function getSearchList(params) {
  return http.request({
    url: '/userAccount/searchList',
    method: 'get',
    params,
  });
}

export function getBanList(params) {
  return http.request({
    url: '/userAccount/banList',
    method: 'get',
    params,
  });
}

export function getChatReportList(params) {
  return http.request({
    url: '/chat/reportList',
    method: 'get',
    params,
  });
}

export function getChatLogList(params) {
  return http.request({
    url: '/chat/logList',
    method: 'get',
    params,
  });
}

export function getChatMsgList(params) {
  return http.request({
    url: '/chat/msgList',
    method: 'get',
    params,
  });
}

export function getChatLog(params) {
  return http.downloadFile({
    url: '/chat/download',
    method: 'get',
    responseType: 'blob',
    params,
  });
}

export function exportChatLog(params) {
  return http.downloadFile({
    url: '/chat/reportList',
    method: 'get',
    responseType: 'blob',
    params,
  });
}

export function getConfPath(params) {
  return http.request({
    url: '/gm/conf_path',
    method: 'get',
    params,
  });
}

export function ReleaseVersion(params) {
  return http.request({
    url: '/gm/releaseVersion',
    method: 'post',
    params,
  });
}

export function VersionList() {
  return http.request({
    url: '/gm/versionList',
    method: 'get',
  });
}

export function GetVersionIndex(params) {
  return http.request({
    url: '/gm/getVersionIndex',
    method: 'get',
    params,
  });
}

export function updateSwitchers(params) {
  return http.request({
    url: '/gm/updateSwitchers',
    method: 'post',
    params,
  });
}

export function getPlayerAttr(params) {
  return http.request({
    url: ApiEnum.PlayerAttrGet,
    method: 'get',
    params,
  });
}

export function getPlayerAttrAll(params) {
  return http.request({
    url: ApiEnum.PlayerAttrGetAll,
    method: 'get',
    params,
  });
}

export function orderStatistics(params) {
  return http.request({
    url: ApiEnum.OrderUserStatistics,
    method: 'get',
    params,
  });
}

export function getUserAccountInfo(params) {
  return http.request({
    url: ApiEnum.UserAccountGet,
    method: 'get',
    params,
  });
}

export function getSigninCount(params) {
  return http.request({
    url: ApiEnum.SigninCount,
    method: 'get',
    params,
  });
}

export function updatePlayerBase(params) {
  return http.request({
    url: ApiEnum.GmUpdatePlayerBase,
    method: 'post',
    params,
  });
}

export function updateTalents(params) {
  return http.request({
    url: ApiEnum.GmUpdateTalents,
    method: 'post',
    params,
  });
}

export function updateChapter(params) {
  return http.request({
    url: '/gm/updateChapter',
    method: 'post',
    params,
  });
}

export function updateGuides(params) {
  return http.request({
    url: ApiEnum.GmUpdateGuides,
    method: 'post',
    params,
  });
}

export function getAllMaterials(params) {
  return http.request({
    url: '/gm/get_all_materials',
    method: 'get',
    params,
  });
}

export function addMaterial(params) {
  return http.request({
    url: '/gm/add_material',
    method: 'post',
    params,
  });
}

export function getAllRunes(params) {
  return http.request({
    url: '/gm/get_all_runes',
    method: 'get',
    params,
  });
}

export function getAllLegends(params) {
  return http.request({
    url: '/gm/get_all_legends',
    method: 'get',
    params,
  });
}

export function addRune(params) {
  return http.request({
    url: '/gm/add_rune',
    method: 'post',
    params,
  });
}

export function addLegend(params) {
  return http.request({
    url: '/gm/add_legend',
    method: 'post',
    params,
  });
}

export function addGift(params) {
  return http.request({
    url: '/gm/add_gift',
    method: 'post',
    params,
  });
}

export function addEquipment(params) {
  return http.request({
    url: '/gm/add_equipment',
    method: 'post',
    params,
  });
}

export function upgradeRole(params) {
  return http.request({
    url: '/gm/upgrade_role',
    method: 'post',
    params,
  });
}
export function getRoleLevel(params) {
  return http.request({
    url: '/gm/get_role_level',
    method: 'get',
    params,
  });
}

export function getAllEquipments(params) {
  return http.request({
    url: '/gm/get_all_equipments',
    method: 'get',
    params,
  });
}

export function playerAccountBan(params) {
  return http.request({
    url: '/userAccount/userBan',
    method: 'post',
    params,
  });
}

export function playerSingleBan(params) {
  return http.request({
    url: '/userAccount/singleBanUser',
    method: 'post',
    params,
  });
}

export function playerChatBan(params) {
  return http.request({
    url: '/userAccount/banUserChat',
    method: 'post',
    params,
  });
}

export function playerPaymentSwitch(params) {
  return http.request({
    url: '/userAccount/paySwitch',
    method: 'post',
    params,
  });
}

export function UpdateNickname(params) {
  return http.request({
    url: '/userAccount/updateNickname',
    method: 'post',
    params,
  });
}

export function CompatibilityTestVerify(params) {
  return http.request({
    url: '/userAccount/compatibilityTestVerify',
    method: 'post',
    params,
  });
}

export function CompatibilityTestMigrate(params) {
  return http.request({
    url: '/userAccount/compatibilityTestMigrate',
    method: 'post',
    params,
  });
}

export function deletePlayer(params) {
  return http.request({
    url: '/gm/delete_player',
    method: 'post',
    params,
  });
}

export function deleteAccount(params) {
  return http.request({
    url: '/gm/delete_account',
    method: 'post',
    params,
  });
}

export function openAccount(params) {
  return http.request({
    url: '/gm/openAccount',
    method: 'post',
    params,
  });
}

export function GetDrainageServer() {
  return http.request({
    url: '/drainageServer/get',
    method: 'get',
  });
}

export function EditDrainageServer(params) {
  return http.request({
    url: '/drainageServer/edit',
    method: 'post',
    params,
  });
}

export function GetDisplayServer() {
  return http.request({
    url: '/drainageServer/getDisplay',
    method: 'get',
  });
}

export function EditDisplayServer(params) {
  return http.request({
    url: '/drainageServer/editDisplay',
    method: 'post',
    params,
  });
}

export function GetWhiteListServer() {
  return http.request({
    url: '/drainageServer/getWhiteList',
    method: 'get',
  });
}

export function EditWhiteListServer(params) {
  return http.request({
    url: '/drainageServer/editWhiteList',
    method: 'post',
    params,
  });
}

export function GetServerDate() {
  return http.request({
    url: '/gm/getServerDate',
    method: 'get',
  });
}

export function EditServerDate(params) {
  return http.request({
    url: '/gm/editServerDate',
    method: 'post',
    params,
  });
}

export function GetGrandmaster(params) {
  return http.request({
    url: '/grandmaster/get',
    method: 'get',
    params,
  });
}

export function SetDanScore(params) {
  return http.request({
    url: '/grandmaster/setDanScore',
    method: 'post',
    params,
  });
}

export function GetPayConfig() {
  return http.request({
    url: '/paySwitch/get',
    method: 'get',
  });
}
