perf: 同步完整版分支代码

This commit is contained in:
xiaoxian521
2021-12-06 17:11:15 +08:00
parent e9dc8274a0
commit f6057458de
39 changed files with 651 additions and 647 deletions

View File

@@ -1,5 +1,5 @@
import { http } from "../utils/http";
export const getAsyncRoutes = (data?: object) => {
return http.request("get", "/getAsyncRoutes", data);
export const getAsyncRoutes = (params?: object) => {
return http.request("get", "/getAsyncRoutes", { params });
};

26
src/api/user.ts Normal file
View File

@@ -0,0 +1,26 @@
import { http } from "../utils/http";
interface userType extends Promise<any> {
svg?: string;
code?: number;
info?: object;
}
// 获取验证码
export const getVerify = (): userType => {
return http.request("get", "/captcha");
};
// 登录
export const getLogin = (data: object) => {
return http.request("post", "/login", { data });
};
// 刷新token
export const refreshToken = (data: object) => {
return http.request("post", "/refreshToken", { data });
};
// export const searchVague = (data: object) => {
// return http.request("post", "/searchVague", { data });
// };