perf: 同步完整版代码
This commit is contained in:
23
mock/user.ts
23
mock/user.ts
@@ -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[];
|
Reference in New Issue
Block a user