Commit 59d1d0e9 by chenwq

放大图下载

1 parent 31be81f4
...@@ -49,6 +49,18 @@ Page({ ...@@ -49,6 +49,18 @@ Page({
this.triggerEvent('longtouch', info.imgUrl) this.triggerEvent('longtouch', info.imgUrl)
}, },
previewImage(e) {
let { url } = e.currentTarget.dataset
if (url.includes('http')) {
wx.previewImage({
urls: [url],
current: url
})
} else {
// this.triggerEvent('refresh')
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
......
<!--tabWorkOrder/pages/invoiceResult/invoiceResult.wxml--> <!--tabWorkOrder/pages/invoiceResult/invoiceResult.wxml-->
<van-overlay wx:if="{{ info.code == '0000' }}" show z-index="99999"> <van-overlay wx:if="{{ info.code == '0000' }}" show z-index="99999">
<view class="wrapper"> <view class="wrapper">
<image show-menu-by-longpress bindlongpress="longpress" src="{{info.imgUrl}}" mode="widthFix" /> <image show-menu-by-longpress bindlongpress="longpress" bindtap="previewImage" src="{{info.imgUrl}}"
data-url="{{info.imgUrl}}" mode="widthFix" />
</view> </view>
</van-overlay> </van-overlay>
<view wx:else> <view wx:else>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!