import { AxiosRequestData } from '../data/axios_request'
import cache from '@/utils/cache'

// 登录 (弃用)
export async function getLogin(form) {
    const url = '/login'
    let token = null
    let response = await AxiosRequestData(
        url,
        token,
        {
            account: form.username,
            password: form.password,
            reqChannel: 4,
            loginType: 1
        },
        false,
        1
    )
    if (response) {
        return response
    }
}

// 用户信息
export function getUser(token) {
    return JSON.parse(cache.getSession('user'))
}
