// pages/localNavigation/localNavigation.js Page({ /** * 页面的初始数据 */ data: { list:[], imgalist:[ {id:0,src:'https://fy.btlsoln.com:8443/showFile/ueditor/lcsy.jpg'} ], src:['https://fy.btlsoln.com:8443/showFile/ueditor/lcsy.jpg'] }, previewImg(e){ console.log(e); var current=e.target.dataset.src; wx.previewImage({ current: '', // 当前显示图片的http链接 urls: this.data.src // 需要预览的图片http链接列表 }) }, getMsg(){ wx.request({ url:'https://fy.btlsoln.com:8443/findHospital', method:"GET", data:{}, header: { 'content-type': 'application/json' }, success: (res)=> { this.setData({ list:res.data.floorList }) console.log(res,"医院导航") } }) }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { this.getMsg() }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { wx.setNavigationBarTitle({ title: '楼层索引' }) }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } })