tabbar.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. const util = require('../../utils/util.js');
  2. const app = getApp();
  3. Component({
  4. /**
  5. * 组件的属性列表
  6. */
  7. properties: {
  8. tabbar: {
  9. type: Object,
  10. value: {
  11. "backgroundColor": "#ffffff",
  12. "color": "#979795",
  13. "selectedColor": "#1c1c1b",
  14. "list": [{
  15. "pagePath": "/pages/homePage/index",
  16. "iconPath": "icon/icon_home.png",
  17. "selectedIconPath": "icon/icon_home_HL.png",
  18. "text": "首页"
  19. }, {
  20. "pagePath": "/pages/leadTeam/index",
  21. "iconPath": "icon/icon_home.png",
  22. "selectedIconPath": "icon/icon_home_HL.png",
  23. "text": "带队"
  24. },
  25. {
  26. "pagePath": "/pages/story/publish/index",
  27. "iconPath": "icon/icon_release.png",
  28. "isSpecial": true,
  29. "text": "发布"
  30. },
  31. {
  32. "pagePath": "/pages/grow/index",
  33. "iconPath": "icon/icon_mine.png",
  34. "selectedIconPath": "icon/icon_mine_HL.png",
  35. "text": "成长"
  36. }, {
  37. "pagePath": "/pages/mine/index",
  38. "iconPath": "icon/icon_mine.png",
  39. "selectedIconPath": "icon/icon_mine_HL.png",
  40. "text": "我的"
  41. }
  42. ]
  43. }
  44. }
  45. },
  46. /**
  47. * 组件的初始数据
  48. */
  49. data: {
  50. // isIphoneX: app.globalData.systemInfo.model.search('iPhone X') != -1 ? true : false
  51. userInfo: app.globalData.userInfo,
  52. },
  53. /**
  54. * 组件的方法列表
  55. */
  56. methods: {
  57. navigator_url(e) {
  58. console.log(e, 56565)
  59. wx.switchTab({
  60. url: e.currentTarget.dataset.url,
  61. })
  62. },
  63. }
  64. })