项目微调
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Login } from "@/api/interface/index";
|
||||
import { PORT1 } from "@/api/config/servicePort";
|
||||
import { ADMIN } from "@/api/config/serviceName";
|
||||
import http from "@/api";
|
||||
|
||||
/**
|
||||
@@ -7,20 +7,20 @@ import http from "@/api";
|
||||
*/
|
||||
// 用户登录
|
||||
export const loginApi = (params: Login.ReqLoginForm) => {
|
||||
return http.post<Login.ResLogin>(PORT1 + `/login`, params, { loading: false }); // 正常 post json 请求 ==> application/json
|
||||
return http.post<Login.ResLogin>(ADMIN + `/login`, params, { loading: false }); // 正常 post json 请求 ==> application/json
|
||||
};
|
||||
|
||||
// 获取菜单列表
|
||||
export const getAuthMenuListApi = () => {
|
||||
return http.get<Menu.MenuOptions[]>(PORT1 + `/menu/list`, {}, { loading: false });
|
||||
return http.get<Menu.MenuOptions[]>(ADMIN + `/menu/list`, {}, { loading: false });
|
||||
};
|
||||
|
||||
// 获取按钮权限
|
||||
export const getAuthButtonListApi = () => {
|
||||
return http.get<Login.ResAuthButtons>(PORT1 + `/auth/buttons`, {}, { loading: false });
|
||||
return http.get<Login.ResAuthButtons>(ADMIN + `/auth/buttons`, {}, { loading: false });
|
||||
};
|
||||
|
||||
// 用户退出登录
|
||||
export const logoutApi = () => {
|
||||
return http.post(PORT1 + `/logout`);
|
||||
return http.post(ADMIN + `/logout`);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user