index.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import {defineStore} from 'pinia'
  2. const menuStore = defineStore('ioc-menu', {
  3. state: () => (
  4. {
  5. currMenu: {},
  6. commonFunction: [
  7. {
  8. "name": "智慧餐厅",
  9. "router": "/life/restaurant",
  10. "icon": "",
  11. "iconColor": "functionColor/life/iocRestaurant.png"
  12. },
  13. {
  14. "name": "智慧停车",
  15. "router": "/life/parking",
  16. "icon": "",
  17. "iconColor": "functionColor/life/iocRestaurant.png"
  18. },
  19. {
  20. "name": "无人商超",
  21. "router": "/life/supermarket",
  22. "icon": "",
  23. "iconColor": "functionColor/life/iocRestaurant.png"
  24. },
  25. {
  26. "name": "健康小屋",
  27. "router": "/life/healthyHome",
  28. "icon": "",
  29. "iconColor": "functionColor/life/iocRestaurant.png"
  30. },
  31. {
  32. "name": "双碳概览",
  33. "router": "/doubleCarbon/overview",
  34. "icon": "",
  35. "iconColor": "functionColor/life/iocRestaurant.png"
  36. },
  37. {
  38. "name": "车辆排放",
  39. "router": "/doubleCarbon/car",
  40. "icon": "",
  41. "iconColor": "functionColor/life/iocRestaurant.png"
  42. },
  43. {
  44. "name": "文印排放",
  45. "router": "/doubleCarbon/print",
  46. "icon": "",
  47. "iconColor": "functionColor/life/iocRestaurant.png"
  48. },
  49. {
  50. "name": "光伏发电",
  51. "router": "/doubleCarbon/pv",
  52. "icon": "",
  53. "iconColor": "functionColor/life/iocRestaurant.png"
  54. }
  55. ],
  56. }
  57. ),
  58. getters: {},
  59. actions: {},
  60. })
  61. const userStore = defineStore('ioc-user', {
  62. state: () => ({
  63. userInfo: {},
  64. token: '',
  65. }),
  66. getters: {
  67. userToken: state => state.token,
  68. userInfo: state => state.userInfo,
  69. },
  70. actions: {},
  71. })
  72. export default {
  73. menuStore,
  74. userStore,
  75. }