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

33 lines
800 B

  1. const baseUrl = '/api/auth'
  2. export const authRoutes = (app) => {
  3. app.post(`${baseUrl}/login`, (req, res) => {
  4. // const { username, password } = req.body
  5. const mockResponse = {
  6. code: '0',
  7. msg: '成功',
  8. data: {
  9. id: 1,
  10. createTime: '2025-04-27 07:44:01',
  11. updateTime: '2025-04-27 07:44:01',
  12. username: 'admin',
  13. nickname: 'Admin',
  14. password: null,
  15. role: 'ADMIN',
  16. deleted: 'DISABLE',
  17. fixedUser: 'ENABLE',
  18. },
  19. }
  20. setTimeout(() => {
  21. res.json(mockResponse)
  22. }, 2000)
  23. })
  24. app.post(`${baseUrl}/logout`, (req, res) => {
  25. // const { username, password } = req.body
  26. const mockResponse = {
  27. code: '0',
  28. msg: '成功',
  29. data: null,
  30. }
  31. res.json(mockResponse)
  32. })
  33. }