import request from '@/config/axios'
|
import type { UserLoginVO } from './types'
|
|
export interface SmsCodeVO {
|
mobile: string
|
scene: number
|
}
|
|
export interface SmsLoginVO {
|
mobile: string
|
code: string
|
}
|
|
// 登录
|
export const login = (data: UserLoginVO) => {
|
return request.post({ url: '/system/auth/login', data })
|
}
|
|
// 使用租户名,获得租户编号
|
export const getTenantIdByName = (name: string) => {
|
return request.get({ url: '/system/tenant/get-id-by-name?name=' + name })
|
}
|
|
// 登出
|
export const loginOut = () => {
|
return request.post({ url: '/system/auth/logout' })
|
}
|
|
// 获取用户权限信息
|
export const getInfo = () => {
|
return request.get({ url: '/system/auth/get-permission-info' })
|
}
|
|
// 获取验证图片以及 token
|
export const getCode = (data) => {
|
return request.postOriginal({ url: 'captcha/get', data })
|
}
|
|
// 滑动或者点选验证
|
export const reqCheck = (data) => {
|
return request.postOriginal({ url: 'captcha/check', data })
|
}
|