You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
687 B
TypeScript

2 months ago
/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-03-06 11:37:14
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2025-03-06 11:38:11
* @FilePath: \vite-ai\data-dashboard\mock\user.ts
* @Description:
*/
export default [
{
url: '/api/login',
method: 'post',
response: ({ body }) => {
if (body.username === 'admin' && body.password === 'admin123') {
return {
code: 200,
data: {
token: 'MOCK_TOKEN_' + Date.now()
}
}
}
return {
code: 401,
message: '用户名或密码错误'
}
}
}
]