const setData = (_t) => {
    var link = wx.getStorageSync('ud_echodata')
    if(link){
        _t.setData({
            link: link.links
        })
    }else{
        setTimeout(function(){
            setData(_t)
        },1000)
    }
}
Component({
    behaviors: [],
    properties: {
    },
    data: {
        link:[]
    }, // 私有数据，可用于模板渲染
    pageLifetimes: {
        // 组件所在页面的生命周期函数
        show: function () {
            var _t = this
            setData(_t)  
         },
        hide: function () { },
        resize: function () { },
      },
    methods: {
        goLink: function(e) {
            let index = e.currentTarget.id
            let wxid = this.data.link[index].wxid||this.data.link[index].appid
            wx.vibrateShort(), wx.openEmbeddedMiniProgram({
                appId: wxid,
                path: this.data.link[index].path
            });
          },
    }
  })  