//wxml
<view class='game_li' wx:for="{{item.list}}" wx:key="xxx">
<navigator target="miniProgram" app-id="{{item.wxid}}" path="{{item.path}}" open-type='navigate'>
<image wx:if="{{item.qr}}" src='{{item.img}}' class='game_li_icon' data-url="{{item.qr}}" catchtap="qrsclick"></image> **如果后台有二维码输出,前端则通过if判断显示,再通过catchtap冒泡进行点击**
<image wx:if="{{item.qr==null ||item.qr==''}}" src='{{item.img}}' class='game_li_icon'></image>
</navigator>
</view>
qrclick:function(res){
wx.previewImage({
current: 二维码图片的地址.url,
urls: [二维码图片的地址.url]
})