// components/shoping-tabbar/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    selected: {
      type: Number,
      default:0
    }
  },  

  /**
   * 组件的初始数据
   */
  data: {
    selected:0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [
      { 
        text: "阈值", 
        pagePath: "/shoping/threshold/threshold", 
        iconPath: "/assets/taddar/users-copy.png", 
        selectedIconPath: "/assets/taddar/copy.png" 
      },
      { 
        text: "反酸模型数据管理", 
        pagePath: "/shoping/Visualization/Visualization", 
        iconPath: "/assets/taddar/users-copy.png", 
        selectedIconPath: "/assets/taddar/copy.png" 
      },
      { text: "降酸模型数据管理", 
      pagePath: "/shoping/Visualization/Visualization", 
      iconPath: "/assets/taddar/users-copy.png", 
      selectedIconPath: "/assets/taddar/copy.png" 
    },
    { 
      text: "人员中心", 
      pagePath: "/shoping/Staff/Staff", 
      iconPath: "/assets/taddar/users-copy.png", 
      selectedIconPath: "/assets/taddar/copy.png" 
    }
    ]
  },


  /**
   * 组件的方法列表
   */
  methods: {
    switchTab(e) {
      let data = e.currentTarget.dataset
      let url = data.path
      wx.redirectTo({
        url
      })
    }
  }
})
