Component({
  data: {
    selected: '',
    color: "#7A7E83",
    selectedColor: "#409eff",
    list: [{
      "pagePath": "/pages/home/index",
      "iconPath": "/image/home1.png",
      "selectedIconPath": "/image/home2.png",
      "text": "首页"
    },
    {
      "pagePath": "/pages/reserve/index",
      "iconPath": "/image/reserve1.png",
      "selectedIconPath": "/image/reserve2.png",
      "text": "报餐"
    },
    {
      "pagePath": "/pages/news/index",
      "iconPath": "/image/news1.png",
      "selectedIconPath": "/image/news2.png",
      "text": "新闻"
    },
    {
      "pagePath": "/pages/my/index",
      "iconPath": "/image/my1.png",
      "selectedIconPath": "/image/my2.png",
      "text": "我的"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({ url })
      // wx.reLaunch({ url })
      // this.setData({
      //   selected: data.index
      // })
    }
  }
})