Component({
  data: {
    selected: 0,
    color: '#7A7E83',
    selectedColor: '#3B7CFC',
    list: [
      {
        pagePath: '/pages/maintenanceIndex/maintenanceIndex',
        iconPath: '/images/icon_tabbar_h.png',
        selectedIconPath: '/images/icon_tabbar_hs.png',
        text: '工作台'
      },
      {
        pagePath: '/pages/backlog/backlogList/backlogList',
        iconPath: '/images/icon_tabbar2.png',
        selectedIconPath: '/images/icon_tabbar2.png',
        text: '待办'
      },
      {
        pagePath: '/pages/addressBook/addressBook',
        iconPath: '/images/icon_tabbar_n.png',
        selectedIconPath: '/images/icon_tabbar_ns.png',
        text: '通讯录'
      }
    ]
  },
  attached() {},
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset;
      const url = data.path;
      wx.switchTab({ url });
      this.setData({
        selected: data.index
      });
    }
  }
});
