mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 08:36:19 +08:00
feat(user): add user login expiration example
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { MockMethod } from 'vite-plugin-mock';
|
||||
import { resultSuccess } from '../_util';
|
||||
import { resultSuccess, resultError } from '../_util';
|
||||
|
||||
const userInfo = {
|
||||
name: 'Vben',
|
||||
@@ -51,4 +51,12 @@ export default [
|
||||
return resultSuccess(userInfo);
|
||||
},
|
||||
},
|
||||
{
|
||||
url: '/basic-api/user/sessionTimeout',
|
||||
method: 'post',
|
||||
statusCode: 401,
|
||||
response: () => {
|
||||
return resultError();
|
||||
},
|
||||
},
|
||||
] as MockMethod[];
|
||||
|
Reference in New Issue
Block a user