/*
 * @Author: Do not edit
 * @Date: 2023-11-20 11:05:00
 * @LastEditTime: 2024-01-09 09:50:55
 * @LastEditors: DY
 * @Description:
 */
import request from '@/utils/request'
import { getRefreshToken } from '@/utils/auth'

// 用户登陆
export function loginUser (data) {
  return request({
    url: '/system/auth/login',
    method: 'post',
    data: data
  })
}

// 使用租户名，获得租户编号
export function getTenantIdByName (name) {
  return request({
    url: '/system/tenant/get-id-by-name',
    method: 'get',
    params: {
      name
    }
  })
}

// 刷新访问令牌
export function refreshToken () {
  return request({
    url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken(),
    method: 'post'
  })
}
