var app = getApp()
var that=null
Page( {
  data: {
    loadingHidden:false,
    myaddress:[]
  },

  onLoad: function() {
      that = this
      var addresss = JSON.parse(wx.getStorageSync("addresss"))
      that.setData({
          loadingHidden:true,
          myaddress:addresss
      })
    }
   ,select:function(e) {
          var index = e.currentTarget.dataset.id
          var addressId=that.data.myaddress[index].id
          var type=that.data.myaddress[index].type
          var contact=that.data.myaddress[index].contact
          var tel=that.data.myaddress[index].tel
          var address=that.data.myaddress[index].address
          var distance=that.data.myaddress[index].distance
          app.globalData.selladdress0={addressId:addressId,type:type,contact:contact,tel:tel,address:address,distance:distance}
          app.globalData.IFRefreshsell0=1
          wx.navigateBack({})
     
    }
})
