{"size": 774, "ext": "js", "max_stars_repo_path": "src/api/account-admin.js", "max_stars_repo_name": "WispYs/vue-admin", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/api/account-admin.js", "max_issues_repo_name": "WispYs/vue-admin", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/api/account-admin.js", "max_forks_repo_name": "WispYs/vue-admin", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.0, "max_line_length": 54, "alphanum_fraction": 0.5981912145}
import request from '@/utils/request'
import { userUrl } from './url.js'

// 账号管理(管理员)
// 列表
export function fetchAccountList(page, size, filter) {
  return request({
    url: `${userUrl}/admin/search/${page}/${size}`,
    method: 'post',
    data: filter
  })
}
// 详情
export function fetchAccountDetail(id) {
  return request({
    url: `${userUrl}/admin/${id}`,
    method: 'get'
  })
}
// 新建
export function addAccount(data) {
  return request({
    url: `${userUrl}/admin`,
    method: 'post',
    data
  })
}
// 审核
export function auditAccount(id, data) {
  return request({
    url: `${userUrl}/admin/${id}`,
    method: 'put',
    data
  })
}
// 删除
export function deleteAccount(id) {
  return request({
    url: `${userUrl}/admin/${id}`,
    method: 'delete'
  })
}
