index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // components/shoping-tabbar/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. selected: {
  8. type: Number,
  9. default:0
  10. }
  11. },
  12. /**
  13. * 组件的初始数据
  14. */
  15. data: {
  16. selected:0,
  17. color: "#7A7E83",
  18. selectedColor: "#3cc51f",
  19. list: [
  20. {
  21. text: "阈值",
  22. pagePath: "/shoping/threshold/threshold",
  23. iconPath: "/assets/taddar/users-copy.png",
  24. selectedIconPath: "/assets/taddar/copy.png"
  25. },
  26. {
  27. text: "反酸模型数据管理",
  28. pagePath: "/shoping/Visualization/Visualization",
  29. iconPath: "/assets/taddar/users-copy.png",
  30. selectedIconPath: "/assets/taddar/copy.png"
  31. },
  32. { text: "降酸模型数据管理",
  33. pagePath: "/shoping/Visualization/Visualization",
  34. iconPath: "/assets/taddar/users-copy.png",
  35. selectedIconPath: "/assets/taddar/copy.png"
  36. },
  37. {
  38. text: "人员中心",
  39. pagePath: "/shoping/Staff/Staff",
  40. iconPath: "/assets/taddar/users-copy.png",
  41. selectedIconPath: "/assets/taddar/copy.png"
  42. }
  43. ]
  44. },
  45. /**
  46. * 组件的方法列表
  47. */
  48. methods: {
  49. switchTab(e) {
  50. let data = e.currentTarget.dataset
  51. let url = data.path
  52. wx.redirectTo({
  53. url
  54. })
  55. }
  56. }
  57. })