![](https://i-blog.csdnimg.cn/blog_migrate/8af3665b4a0e1a036389021816cb0a22.png)
uni.previewImage({
urls: [imgUrl],
success: function(data) {
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
},
fail: function(err) {
console.log(err.errMsg);
}
});
后面直接使用uview组件将图片弹窗显示
<u-popup v-model="imageShow" mode="center" border-radius="14" width="80%" height="80%">
<view class="ImageBox"><image :src="imageUrl" mode="aspectFit" :lazy-load="true" show-menu-by-longpress></image></view>
</u-popup>