import axios from '@/utils/axios'

export default {
    /**
     * 用户信息
     */
    getUserInfo() {
        return axios.get('/permission/api/system/userinfo')
    },
    /**
     * 修改密码
     */
    ChangePassword(params) {
        return axios({
            url: '/permission/api/admin/changePassword',
            method: 'post',
            params: params
        })
    },
    /**
     * 重置密码
     */
    ResetPassword(params) {
        return axios({
            url: '/permission/api/admin/resetPassword',
            method: 'post',
            params: params
        })
    },
    /**
     * 获取验证码
     */
    getVerifyCode() {
        return axios.get('/permission/api/admin/verifyCode')
    },
    /**
     * 获取用户权限
     */
    getPermissionList(params) {
        return axios.get('/permission/api/system/getPermissionList', {params})
    },
    /**
     * 用户登录
     */
    adminLogin(data) {
        return axios.post('/permission/api/admin/login', data)
    },
    /**
     * 判断是否用户登录
     */
    IsAdminLogin(params) {
        return axios({
            url: '/permission/api/system/getLoginStatusByToken',
            method: 'post',
            params: params
        })
    },
    /**
     * 退出登录
     */
    adminLogout() {
        return axios.post('/permission/api/admin/logout')
    },
    /**
     * 获取租户类型
     */
    getDict(params) {
        return axios.get('/permission/api/system/getDict', {params})
    },
    /**
    * 查询没有租户的客户
  */
  getNoTenantClients(params) {
    return axios.get('/permission/api/client/getNoTenantClients',{params})
  },
}