// mycomponent/hospital.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    sta:String,
    staTwo: String,
  },

  /**
   * 组件的初始数据
   */
  data: {
    imag1: 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/tab_my_active.png',
    imag2: 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/tab_my_normal.png',
    image1: 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/tab_index_active.png',
    image2: 'https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/tab_index_normal.png',
  },
  lifetimes: {
    // // 在组件实例进入页面节点树时执行
    attached(){
      console.log(this.data.sta);
      console.log(this.data.staTwo);
    },
    // 在组件实例被从页面节点树移除时执行
    detached: function() {
      
    }
  },
  /**
   * 组件的方法列表
   */
  
  methods: {
    go(e){
      console.log(e.currentTarget.id);
      if(e.currentTarget.id == 'sy'){
        wx.redirectTo({
          url: '/packageC/hospital/hospital_ind/hospital_ind',
        });
        
      }
      if (e.currentTarget.id == 'wd'){
        wx.redirectTo({
          url: '/packageC/hospital/mycenter/mycenter',
        });
        
      }
    }
  }
});
