feat: 🚀 订阅功能

This commit is contained in:
2025-09-16 16:38:30 +08:00
parent eb1b66a066
commit d3a3ef2911
456 changed files with 40544 additions and 124 deletions

32
src/api/modules/login.ts Normal file
View File

@@ -0,0 +1,32 @@
import { ResultData, Login } from "@/api/interface/index";
// import authMenuList from "@/assets/json/authMenuList.json";
import http from "@/api";
/**
* @name 登录模块
*/
// 用户登录
export const loginApi = (params: Login.ReqLoginCode) => {
return http.get<ResultData<Login.ResLogin>>(`/user/signin/${params}`);
// 正常 post json 请求 ==> application/json
// return http.post<Login.ResLogin>(PORT1 + `/login`, params, { noLoading: true }); // 控制当前请求不显示 loading
// return http.post<Login.ResLogin>(PORT1 + `/login`, {}, { params }); // post 请求携带 query 参数 ==> ?username=admin&password=123456
// return http.post<Login.ResLogin>(PORT1 + `/login`, qs.stringify(params)); // post 请求携带表单参数 ==> application/x-www-form-urlencoded
// return http.get<Login.ResLogin>(PORT1 + `/login?${qs.stringify(params, { arrayFormat: "repeat" })}`); // get 请求可以携带数组等复杂参数
};
// 获取菜单列表
export const getAuthMenuListApi = () => {
console.log("触发了吗");
return http.get<any>(`/user/permissions`, {}, { noLoading: true });
// return authMenuList;
};
// 用户退出登录
export const logoutApi = () => {
return http.get(`/user/signout`);
};
// export const LoginOutSingleApi = () => {
// return http.get(`/Login/LoginOutSingle`);
// };