/*
 * @Author: Gui
 * @Date: 2023-03-01 19:20:44
 * @LastEditors: 潘凤涛 904755879@qq.com
 * @LastEditTime: 2024-01-15 16:29:07
 * @Description: kxs files
 * @filePath:
 */
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

type Result = {
  success: boolean;
  data?: {
    /** 列表数据 */
    list: Array<any>;
    /** 总数 */
    total?: number;
  };
};

/** 获取用户管理列表 */
export const getUserList = (data?: object) => {
  console.log(data)
  return http.get(baseUrlApi("/v1/qrcodeplatemain/sysadmin/sysadminlist"), data);
};
/** 删除用户 */
export const deleteUserList = (data?: object) => {
  console.log(data)
  return http.delete(baseUrlApi("/v1/qrcodeplatemain/sysadmin/deletesysadminuserinfo"), data);
};
/** 新增用户 */
export const postUserList = (data?: object) => {
  console.log(data)
  return http.post(baseUrlApi("/v1/qrcodeplatemain/sysadmin/addsysadminuserinfo"), data);
};
/** 编辑用户 */
export const editUserList = (data?: object) => {
  console.log(data)
  return http.post(baseUrlApi("/v1/qrcodeplatemain/sysadmin/editsysadminuserinfo"), data);
};

/** 获取角色管理列表 */
export const getRoleList = (data?: object) => {
  console.log(data)
  return http.get(baseUrlApi("/v1/qrcodeplatemain/sysadminrole/sysadminrolelist"), data);
};
/** 添加系统角色 */
export const postRoleList = (data?: object) => {
  console.log(data)
  return http.post(baseUrlApi("/v1/qrcodeplatemain/sysadminrole/addsysadminroleinfo"), data);
};
/** 编辑系统角色 */
export const putRoleList = (data?: object) => {
  console.log(data)
  return http.put(baseUrlApi("/v1/qrcodeplatemain/sysadminrole/editsysadminroleinfo"), data);
};
/** 删除系统角色 */
export const deleteRoleList = (data?: object) => {
  console.log(data)
  return http.delete(baseUrlApi("/v1/qrcodeplatemain/sysadminrole/deletesysadminroleinfo"), data);
};
/** 获取角色权限列表 */
export const getRoleTreeList = (data?: object) => {
  console.log(data)
  return http.get(baseUrlApi("/api/v1/sysadmin/authstree"), data);
};
/** 编辑协议 */
export const edit_Protocol = (data?: object) => {
  console.log(data)
  return http.put(baseUrlApi("/v1/qrcodeplatemain/pageinfo/editagreementinfo"), data);
};
/** 删除协议 */
export const delete_Protocol = (data?: object) => {
  console.log(data)
  return http.delete(baseUrlApi("/v1/qrcodeplatemain/pageinfo/deleteagreementinfo"), data);
};
/** 获取协议列表 */
export const protocol_List = (data?: object) => {
  console.log(data)
  return http.get(baseUrlApi("/v1/qrcodeplatemain/pageinfo/agreementinfolist"), data);
};
/** 新增协议 */
export const add_Protocol = (data?: object) => {
  console.log(data)
  return http.post(baseUrlApi("/v1/qrcodeplatemain/pageinfo/addagreementinfo"), data);
};