// monitor/pages/components/baseInfo/baseInfo.js const app = getApp() Component({ /** * 组件的属性列表 */ properties: { basic: Object, }, /** * 组件的初始数据 */ data: { imgUrl: app.globalData.imgUrl }, /** * 组件的方法列表 */ methods: { //设备列表 goDevice(){ wx.navigateTo({ url: '../../deviceList/deviceList?id=' + this.data.basic.entryId, }) }, //查看图片 bigImg(e) { let photo_arr = new Array(); let current = this.data.imgUrl + e.currentTarget.dataset.url; photo_arr.push(current); wx.previewImage({ current: current, // 当前显示图片的https链接 urls: photo_arr, // 需要预览的图片https链接列表 }) }, } })