import createAxios from '/@/utils/axios'

export function index() {
    return createAxios({
        url: '/api/auth/portal/menu',
        method: 'get',
    })
}

export function userinfo() {
    return createAxios({
        url: '/api/auth/token/info',
        method: 'get',
    })
}

export function login(params: object = {}) {
    return createAxios({
        url: '/api/auth/login',
        data: params,
        method: 'POST',
    })
}

export function logout() {
    return createAxios({
        url: '/api/auth/logout',
        method: 'POST',
    })
}
