Commit 3e99966e by chenwq

bug修复

1 parent cf5365c9
...@@ -175,5 +175,27 @@ Component({ ...@@ -175,5 +175,27 @@ Component({
getUserInfo(e) { getUserInfo(e) {
this.triggerEvent('getUserInfo', { detail: e.detail }) this.triggerEvent('getUserInfo', { detail: e.detail })
}, },
// 膨胀金-二维码-长按图片
handleLongPress(e) {
let { index } = e.target.dataset
let { activeNavIdx, actNum } = this.data
// 膨胀金活动,合作方式
if (actNum == 99 && activeNavIdx == 3 && index == 4) {
wx.downloadFile({
// 示例 url,并非真实存在
url: 'https://scrm.glsx.com.cn/frontpdf/expand_agreement.pdf',
success: function (res) {
console.log(res)
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
}
})
}
})
}
},
} }
}) })
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="view-prod custom-class"> <view class="view-prod custom-class">
<view class="pro-head"> <view class="pro-head">
<!-- 有视频 --> <!-- 有视频 -->
<video class="frame" id="video" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" bindplay="handleVideoPlay" data-attr="crowdVideoCtx"/> <video class="frame" id="video" wx:if="{{actNum != 2}}" src="{{prodItemVideo.videoUrl}}" bindplay="handleVideoPlay" data-attr="crowdVideoCtx" />
<image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" /> <image class="no-video" wx:if="{{actNum == 2}}" src="{{prodItemVideo.posterUrl}}?v={{img_version}}" />
<view class="title-wrap"> <view class="title-wrap">
<view class="title">{{prodItemVideo.name}}</view> <view class="title">{{prodItemVideo.name}}</view>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</button> </button>
</block> </block>
</image> </image>
<image webp wx:if="{{ index >= 3 && !showLeftFlag}}" mode="widthFix" webp class="img-item {{item.className?item.className:''}}" src="{{item.url?item.url:item}}?v={{img_version}}"> <image webp wx:if="{{ index >= 3 && !showLeftFlag}}" mode="widthFix" webp class="img-item {{item.className?item.className:''}}" src="{{item.url?item.url:item}}?v={{img_version}}" data-index="{{index}}" bindlongpress="handleLongPress">
<!-- 众筹-视频 --> <!-- 众筹-视频 -->
<block wx:if="{{ index == 3 && actNum == 3 }}"> <block wx:if="{{ index == 3 && actNum == 3 }}">
<video class="crowd-video" id="crowd-video" bindplay="handleVideoPlay" data-attr="videoCtx" src="{{videoBaseUrl}}video/crowd-detail.mp4" /> <video class="crowd-video" id="crowd-video" bindplay="handleVideoPlay" data-attr="videoCtx" src="{{videoBaseUrl}}video/crowd-detail.mp4" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!