user.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /**
  2. * Mock数据 - 用户认证
  3. */
  4. // 用户信息Mock数据
  5. export const mockUserInfo = {
  6. id: 1,
  7. username: 'admin',
  8. nickname: '超级管理员',
  9. avatar: '',
  10. phone: '13800138000',
  11. email: 'admin@haha.com',
  12. role: 'admin',
  13. roleName: '系统管理员',
  14. permissions: ['order:view', 'order:edit', 'device:view', 'device:edit', 'shop:view', 'shop:edit', 'product:view', 'inventory:view'],
  15. lastLoginTime: '2026-02-14 18:30:00',
  16. createdAt: '2025-01-01 00:00:00'
  17. };
  18. // 登录响应Mock数据
  19. export const mockLoginResponse = {
  20. token: 'mock_admin_token_' + Date.now(),
  21. userInfo: mockUserInfo
  22. };
  23. // 菜单权限Mock数据
  24. export const mockMenuList = [
  25. {
  26. id: 1,
  27. name: '工作台',
  28. icon: 'home',
  29. path: '/pages/index/index'
  30. },
  31. {
  32. id: 2,
  33. name: '订单管理',
  34. icon: 'order',
  35. path: '/pages/orders/list',
  36. children: [
  37. { id: 21, name: '订单列表', path: '/pages/orders/list' },
  38. { id: 22, name: '异常订单', path: '/pages/orders/abnormal' },
  39. { id: 23, name: '售后管理', path: '/pages/orders/after-sale' }
  40. ]
  41. },
  42. {
  43. id: 3,
  44. name: '设备管理',
  45. icon: 'device',
  46. path: '/pages/device/list'
  47. },
  48. {
  49. id: 4,
  50. name: '门店管理',
  51. icon: 'shop',
  52. path: '/pages/shop/list'
  53. },
  54. {
  55. id: 5,
  56. name: '商品管理',
  57. icon: 'product',
  58. path: '/pages/products/list'
  59. },
  60. {
  61. id: 6,
  62. name: '库存管理',
  63. icon: 'inventory',
  64. path: '/pages/inventory/query'
  65. }
  66. ];