perf: 同步完整版代码

This commit is contained in:
xiaoxian521
2022-04-10 21:22:05 +08:00
parent 2bac78478c
commit 736f1c27cd
8 changed files with 22 additions and 56 deletions

View File

@@ -1,23 +0,0 @@
import { MockMethod } from "vite-plugin-mock";
export default [
{
url: "/login",
method: "post",
response: ({ body }) => {
if (body.username === "admin") {
return {
username: "admin",
expires: 24 * 60 * 60,
accessToken: "eyJhbGciOiJIUzUxMiJ9.admin"
};
} else {
return {
username: "test",
expires: 24 * 60 * 60,
accessToken: "eyJhbGciOiJIUzUxMiJ9.test"
};
}
}
}
] as MockMethod[];