Component({
  data: {
    selected: 0,
    color: "#bfbfbf",
    selectedColor: "#337AFF",
    list: [
      {
        pagePath: "/pages/index/index",
        iconPath: "/images/主页.png",
        selectedIconPath: "/images/主页点击.png",
        text: "首页"
      },
      {
        pagePath: "/pages/aitools/aitools",
        iconPath: "/images/AI分析.png",
        selectedIconPath: "/images/AI分析.png",
        text: "写文案"
      },
      {
        pagePath: "/pages/video_list/video_list",
        iconPath: "/images/文案库.png",
        selectedIconPath: "/images/文案库点击.png",
        text: "违规检测"
      },
      {
        pagePath: "/pages/mine/mine",
        iconPath: "/images/my.png",
        selectedIconPath: "/images/我的点击.png",
        text: "我的"
      }
    ]
  },
  attached() {},
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      console.log(data)
        wx.switchTab({
          url
        })
      }
  }
});
