import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/vue-element-admin/user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: {
      token
    }
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}

//查询页面上的按钮
export const getButtonList = params => {
  return request({
    url: '/point-strategy/v/button/selectList',
    method: 'post',
    params
  })
}
//登录mac地址验证
export const getDbMac2 = () => {
  return request({
    url: '/point-strategy/mac/getDbMac2',
    method: 'post',
  })
}
//获得本机原始mac信息
export const getLocalMac = () => {
  return request({
    url: '/point-strategy/mac/getLocalMac',
    method: 'post'
  })
}

//保存数据库加密mac信息
export const saveDbMac = params => {
  return request({
    url: '/point-strategy/mac/saveDbMac',
    method: 'post',
    params
  })
}
//单点登录得到用户全部信息
export const singleLogin = params => {
  return request({
    url: '/point-strategy/getUserInfo',
    method: 'post',
    params
  })
}
//监督指导
export const titleSuper = params => {
  return request({
    url: '/point-strategy/v/supervise/titleSuper',
    method: 'get',
    params
  })
}
//关闭
export const closeTitle = params => {
  return request({
    url: '/point-strategy/v/supervise/closeTitle',
    method: 'get',
    params
  })
}


// 根据用户id 查询用户详情
export const selectUserDetails = params => {
  return request({
    url: '/point-strategy/v/user/selectUserDetails',
    method: 'post',
    params
  })
}
