/*
 * @Author: 王大坤 160484192@qq.com
 * @Date: 2023-11-13 14:25:46
 * @LastEditors: 王大坤 160484192@qq.com
 * @LastEditTime: 2023-11-22 14:03:56
 * @FilePath: /seoadmin/src/api/api.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { requestGet, requestPost, requestPut, requestDelete } from '@/utils/util'

const login = data => requestPost('admin/login', data) // 登陆接口

// 首页数据
// const statsIndexData = data => requestPost('index.php?s=admin/home', data)
const statsIndexData = data => requestPost('/admin/statsIndexData', data)
const getAdminData = data => requestPost('/admin/getAdminData', data)
const setAdmin = data => requestPost('/admin/setAdmin', data)
const deleteAdmin = data => requestPost('/admin/deleteAdmin', data)
const getRoles = data => requestPost('/admin/getRoles', data)
const deleteRoleById = data => requestPost('/admin/deleteRoleById', data)
const setRole = data => requestPost('/admin/setRole', data)
const getUserList = data => requestPost('/admin/getUserList', data)
const getQuestionList = data => requestPost('/admin/getQuestionList', data)
const getAnswerList = data => requestPost('/admin/getAnswerList', data)
const getMjList = data => requestPost('/admin/getMjList', data)
const updateMjData = data => requestPost('/admin/updateMjData', data)
const getSdList = data => requestPost('/admin/getSdList', data)
const updateSdData = data => requestPost('/admin/updateSdData', data)
const getPublicList = data => requestPost('/admin/getPublicList', data)
const deleteImagePublic = data => requestPost('/admin/deleteImagePublic', data)
const updateSort = data => requestPost('/admin/updateSort', data)
export default {
  login,
  statsIndexData,
  getAdminData,
  setAdmin,
  deleteAdmin,
  getRoles,
  setRole,
  deleteRoleById,
  getUserList,
  getQuestionList,
  getAnswerList,
  getMjList,
  updateMjData,
  getSdList,
  updateSdData,
  getPublicList,
  deleteImagePublic,
  updateSort,
}
