/*
 * @Author: your name
 * @Date: 2022-02-21 09:15:17
 * @LastEditTime: 2022-02-23 15:11:47
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \CABaggageData\src\api\login.js
 */
import request from '@/utils/request-new'
import requsetNew from '@/utils/request'

//获取权限
export function getAuth (params) {
    return request({
        url: '/foxlibc/getAuth',
        method: 'post',
        data: params
    })
}

//登录
export function signIn (params) {
    return request({
        url: '/foxlibc/sign-in',
        method: 'post',
        data: params
    })
}

//登出
export function loginOut (params) {
    return requsetNew({
        url: '/foxlibc/sign-out',
        method: 'post',
        data: params
    })
}

//获取验证码
export function getVCode (params) {
    return request({
        url: '/foxlibc/verification-code',
        method: 'post',
        data: params
    })
}

//重置token
export function refreshToken (params) {
    return request({
        url: '/foxlibc/testToken',
        method: 'post',
        data: params
    })
}

//token
export function getToken (params) {
    return request({
        url: '/user/getToken',
        method: 'post',
        data: params,
        istoken: true
    })
}

//获取加密公匙
export function getKey (params) {
    return request({
        url: '/user/publicKey',
        method: 'post',
        data: params,
    })
}

//获取加密公匙
export function forceLogin (params) {
    return request({
        url: '/foxlibc/force_sign',
        method: 'post',
        data: params,
    })
}

//获取用户权限
export function getPermissions (params) {
    return requsetNew({
        url: '/foxlibc/permissions',
        method: 'post',
        data: params,
    })
}

//修改密码
export function resetPasswd (params) {
    return requsetNew({
        url: '/foxlibc/reset-passwd',
        method: 'post',
        data: params,
    })
}

//用户心跳
export function userHealth (params) {
    return requsetNew({
        url: '/foxlibc/health',
        method: 'post',
        data: params,
    })
}

