微信小程序:图片预览
作者:互联网
wxml页面:
<image src='{{UPLOAD_IMAGES_URL}}{{vv.img_s}}' data-src="{{vv.img}}" bindtap="previewImage"></image>
js:
/*预览*/
previewImage:function(e){
console.log('previewImage');
var current = e.currentTarget.dataset.src;
var that = this;
var url = [that.data.UPLOAD_IMAGES_URL+current];
wx.previewImage({
current: current, // 当前显示图片的http链接
urls: url // 需要预览的图片http链接列表
})
}
标签:http,预览,url,微信,current,previewImage,var,图片 来源: https://www.cnblogs.com/two-bees/p/10458206.html