Component({
  data: {
    selected: 0,
    color: "#b3b6c3",
    selectedColor: "#007dff",
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "/images/ico_home_gray@3x.png",
      selectedIconPath: "/images/ico_home_blue@3x.png",
      text: "首页"
    }, {
      pagePath: "/pages/message/message",
      iconPath: "/images/ico_news-gray@3x.png",
      selectedIconPath: "/images/ico_news-blue@3x.png",
      text: "消息"
    }, {
      pagePath: "/pages/mine/mine",
      iconPath: "/images/ico_me-gray@3x.png",
      selectedIconPath: "/images/ico_me-blue@3x.png",
      text: "我的"
    }]
  },
  attached() {},
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({
        url
      })
      this.setData({
        selected: data.index
      })
    }
  }
})