release: update 5.1.0

This commit is contained in:
xiaoxian521
2024-03-09 16:27:52 +08:00
parent ff27074ebd
commit 1121c5a2b5
148 changed files with 8005 additions and 8352 deletions

View File

@@ -1,9 +1,9 @@
import { MockMethod } from "vite-plugin-mock";
import { defineFakeRoute } from "vite-plugin-fake-server/client";
// 模拟刷新token接口
export default [
export default defineFakeRoute([
{
url: "/refreshToken",
url: "/refresh-token",
method: "post",
response: ({ body }) => {
if (body.refreshToken) {
@@ -13,7 +13,7 @@ export default [
accessToken: "eyJhbGciOiJIUzUxMiJ9.newAdmin",
refreshToken: "eyJhbGciOiJIUzUxMiJ9.newAdminRefresh",
// `expires`选择这种日期格式是为了方便调试,后端直接设置时间戳或许更方便(每次都应该递增)。如果后端返回的是时间戳格式,前端开发请来到这个目录`src/utils/auth.ts`,把第`38`行的代码换成expires = data.expires即可。
expires: "2023/10/30 23:59:59"
expires: "2030/10/30 23:59:59"
}
};
} else {
@@ -24,4 +24,4 @@ export default [
}
}
}
] as MockMethod[];
]);