import axios from '../request';
import {
  applyTagDetails,
  approvalApplyTag,
  authDetailType,
  authRemarkType,
  changeUserTagNew,
  changeUserTagType,
  CompanyListTag,
  cooperationListTag,
  deleteApplyTag,
  editUserApplyTag,
  editUserApplyTagDetails,
  listAppUserCountType,
  listAppUserType,
  listAuthPageType,
  listUserApplyTag,
  listUserRcdType,
  userAccountUpdateType,
} from '~/api/interface/customManageType';

export class CustomManageAPI {
  // 客户列表
  static listAppUser: listAppUserType = (params) =>
    axios.post('/userapp/user-account/listAppUser', params);
  // 加盟列表
  static CompanyListTag: CompanyListTag = (params) =>
    axios.get('/userapp/cooperation/listTag', { params });
  // 客户列表
  static userAccountUpdate: userAccountUpdateType = (params) =>
    axios.post('/userapp/user-account/update', params);
  // 后台设置小程序用户标签
  static changeUserTag: changeUserTagType = (params) =>
    axios.get('/userapp/cooperation/changeUserTag', { params });
  // 后台设置小程序用户标签
  static changeUserTagNew: changeUserTagNew = (params) =>
    axios.post('/userapp/cooperation/changeUserTag', params);
  // 加盟标签列表
  static cooperationListTag: cooperationListTag = (params) =>
    axios.get('/userapp/cooperation/listTag', { params });
  // 后台申请列表
  static listUserApplyTag: listUserApplyTag = (params) =>
    axios.post('/userapp/cooperation/listUserApplyTag', params);
  // 审批详情
  static applyTagDetails: applyTagDetails = (params) =>
    axios.get('/userapp/cooperation/applyTagDetails', { params });
  // 审批
  static approvalApplyTag: approvalApplyTag = (params) =>
    axios.get('/userapp/cooperation/approvalApplyTag', { params });
  // 强制删除
  static deleteApplyTag: deleteApplyTag = (params) =>
    axios.get('/userapp/cooperation/deleteApplyTag', { params });
  // 后台-编辑详情信息
  static editUserApplyTagDetails: editUserApplyTagDetails = (params) =>
    axios.get('/userapp/cooperation/editUserApplyTagDetails', { params });
  // 后台-编辑服务商信息
  static editUserApplyTag: editUserApplyTag = (params) =>
    axios.post('/userapp/cooperation/editUserApplyTag', params);
  // 裂变-邀请列表
  static listUserRcd: listUserRcdType = (data) =>
    axios.post('/userapp/user-account/listUserRcd', data);
  //  客户-实名认证列表
  static getListAuth: listAuthPageType = (data) =>
    axios.post('/userapp/real-name-auth/listPage', data);
  //  客户-实名认证详情
  static getAuthDetail: authDetailType = (params) =>
    axios.get('/userapp/real-name-auth/detail', { params });
  //  客户-实名认证更新备注
  static updateRemark: authRemarkType = (params) =>
    axios.get('/userapp/real-name-auth/updateRemark', { params });
  //   商家列表-数据统计
  static getListAppUserCount: listAppUserCountType = () =>
    axios.get('/userapp/cooperation/getAuditSum');
}
