/* * @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: '用户名或密码错误' } } } ]