index.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Component({
  2. data: {
  3. selected: 0,
  4. color: "#6e6d6b",
  5. selectedColor: "#e64340",
  6. list: [{
  7. "pagePath": "/pages/index/index",
  8. "iconPath": "/images/nav/home-off.png",
  9. "selectedIconPath": "/images/nav/home-on.png",
  10. "text": "首页"
  11. },
  12. {
  13. "pagePath": "/pages/resource/index",
  14. "iconPath": "/images/nav/fl-off.png",
  15. "selectedIconPath": "/images/nav/fl-on.png",
  16. "text": "会务资源"
  17. },
  18. {
  19. "pagePath": "/pages/order/index",
  20. "iconPath": "/images/nav/cart-off.png",
  21. "selectedIconPath": "/images/nav/cart-on.png",
  22. "text": "订单"
  23. },
  24. {
  25. "pagePath": "/pages/my/index",
  26. "iconPath": "/images/nav/my-off.png",
  27. "selectedIconPath": "/images/nav/my-on.png",
  28. "text": "我的"
  29. }
  30. ]
  31. },
  32. attached() {},
  33. methods: {
  34. switchTab(e) {
  35. const {
  36. index,
  37. path
  38. } = e.currentTarget.dataset
  39. wx.switchTab({
  40. url: path
  41. })
  42. }
  43. }
  44. })