修改 ui 包结构.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import { UserState } from '@/store/modules/user/types';
|
||||
|
||||
export interface LoginRequest {
|
||||
username: string;
|
||||
@@ -9,10 +10,30 @@ export interface LoginResponse {
|
||||
token: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 登陆
|
||||
*/
|
||||
export function login(data: LoginRequest) {
|
||||
return axios.post<LoginResponse>('/infra/auth/login', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 登出
|
||||
*/
|
||||
export function logout() {
|
||||
return axios.get('/infra/auth/logout');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
export function getUserPermission() {
|
||||
return axios.get('/infra/permission/user');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单列表
|
||||
*/
|
||||
export function getMenuList() {
|
||||
return axios.get('/infra/permission/menu');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user