import {axios} from '@/util/axios/request'

/**
 * login func
 * parameter: {
 *     username: '',
 *     password: '',
 *     remember_me: true,
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
export function login(data) {
  return axios({
    url: '/login',
    method: 'post',
    data: data
  })
}

export function getInfo() {
  return axios({
    url: '/login/init',
    method: 'get'
  })
}

export function testLogin() {
  return axios({
    url: '/login/info',
    method: 'get',
    useFullLoading: true
  })
}
