import request from '@/utils/request'
import qs from 'qs'

// 登录
export function login(account, password) {
    return request({
        url: '/login/auth.do',
        method: 'post',
        data: qs.stringify({
            account,
            password,
            appSecret: 'ff57f743341c77530827dd2cdbcbdc3a1c61a8ea',
            appId: '保留参数暂时不用到仅为了和移动端保持一致',
            customerId: '保留参数暂时不用到仅为了和移动端保持一致'
        })
    })
}

// 获取用户信息
export function getInfo(token) {
    return request({
        url: '/login/findRolePermissions.do',
        method: 'post',
        data: qs.stringify({
            token
        })
    })
}

// 退出登录
export function logout() {
    return request({
        url: '/login/loginOut.do',
        method: 'post'
    })
}
