wxml:
<view class='web-page'>
<image src="https://res.tuoluohuodong.com/h5_program_code.png" mode="widthFix"
data-src="https://res.tuoluohuodong.com/h5_program_code.png"
bindtap="previewImage"></image>
</view>
js:
// 长按识别小程序码
previewImage: function (e) {
var current = e.target.dataset.src;
wx.previewImage({
current: current,
urls: [current]
})
},