import request from '@/utils/request'

// 登录
export function login(params) {
  return request({
    url: '/admin/user/login',
    method: 'post',
    params
  })
}

// 获取用户信息
export function getInfo(userid) {
  return request({
    url: '/admin/user/detail',
    method: 'get',
    params: { adminUserId: userid }
  })
}

// 动态路由
export function getRouter(params) {
  return request({
    url: `/admin/user/module/list`,
    method: 'get',
    params
  })
}

// 退出登录
export function logout() {
  return request({
    url: '/admin/user/logout',
    method: 'post'
  })
}

// 动态路由
export function getCode() {
  return request({
    url: '/admin/user/imageVerification',
    method: 'get',
  })
}