import { request } from '/@/utils/service'
import { Local, Session } from '/@/utils/storage'

const token = Session.get('token')

export function getCaptcha() {
  return request({
    url: '/api/captcha/',
    method: 'get',
  })
}

export function login(params: object) {
  return request({
    url: '/api/login/',
    method: 'post',
    data: params,
  })
}

export function getUserInfo() {
  return request({
    url: '/api/system/user/user_info/',
    method: 'get',
  })
}

export function postWorkWeChatCode(body) {
  return request({
    url: '/api/system/wechat/login',
    method: 'post',
    data: body
  })
}
export function WeComLogin(query: any) {
  return request({
    url: '/api/system/wechat/login/',
    method: 'get',
    params: query,
  });
}
