Commit 301cdcdd by 李伟康

增加长按识别回调

1 parent c35c23eb
...@@ -200,6 +200,9 @@ Component({ ...@@ -200,6 +200,9 @@ Component({
this.setData({ this.setData({
showAuth: true showAuth: true
}) })
},
longpress(){
this.triggerEvent('longtouch')
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -16,28 +16,29 @@ ...@@ -16,28 +16,29 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: -1; z-index: -1;
background: rgba(28, 27, 35, 0.60); background: rgba(0,0,0,.8);
} }
.poster { .poster {
width: 558rpx; width: 500rpx;
height: 68%;
// height: 1108rpx; // height: 1108rpx;
overflow: scroll;
border-radius: 8rpx 8rpx 0 0; border-radius: 8rpx 8rpx 0 0;
} }
.btn { .btn {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 558rpx; width: 500rpx;
height: 90rpx; height: 90rpx;
background: #F7F8FA; background: #F7F8FA;
border-radius: 0 0 12rpx 12rpx; border-radius: 0 0 12rpx 12rpx;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #3666FE; color: #3666FE;
margin-top: -2rpx;
.icon { .icon {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
...@@ -50,5 +51,9 @@ ...@@ -50,5 +51,9 @@
font-size: 24rpx; font-size: 24rpx;
color: #FFFFFF; color: #FFFFFF;
line-height: 36rpx; line-height: 36rpx;
.underline{
font-weight: 600;
text-decoration: underline;
}
} }
} }
\ No newline at end of file \ No newline at end of file
<block wx:if="{{show}}"> <block wx:if="{{show}}">
<!-- catchtouchmove="noScroll" --> <!-- catchtouchmove="noScroll" -->
<view class="layout" catchtouchmove="noScroll"> <view class="layout">
<view class="bg" bindtap="hide" /> <view class="bg" bindtap="hide" />
<!-- <view class="poster"> --> <block wx:if="{{scrollImg}}">
<view class="poster">
<!-- <scroll-view scroll-x="false" scroll-y="true" style="height: 100%"> --> <!-- <scroll-view scroll-x="false" scroll-y="true" style="height: 100%"> -->
<image src="{{poster}}" class="poster" mode="widthFix" show-menu-by-longpress /> <image src="{{poster}}" mode="widthFix" show-menu-by-longpress />
<!-- </scroll-view> --> <!-- </scroll-view> -->
<!-- </view> --> </view>
</block>
<block wx:else>
<image src="{{poster}}" class="poster" mode="widthFix" show-menu-by-longpress bindlongpress="longpress" />
</block>
<view class="btn"> <view class="btn">
<glsx-image src="output/longtap.png" class="icon"></glsx-image> <glsx-image src="output/longtap.png" class="icon"></glsx-image>
长按图片转发 长按图片转发
</view> </view>
<view class="tips">提示:这是您的专属活动海报,请长按转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view> <view class="tips">温馨提示:您可以转发到门店群,门店员工通过扫描海报二维码可以注册登录 <text class="underline">门店助手</text> 小程序,执行活动任务,转发活动链接促成订单。</view>
</view> </view>
</block> </block>
<!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" isShowCheck="{{false}}" id="auth" /> --> <!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" isShowCheck="{{false}}" id="auth" /> -->
\ No newline at end of file \ No newline at end of file
...@@ -188,6 +188,10 @@ Component({ ...@@ -188,6 +188,10 @@ Component({
wx.$api.showToast('下载海报失败') wx.$api.showToast('下载海报失败')
}) })
} }
},
/**长按海报 */
longtouch(){
console.log('长按海报')
} }
} }
}) })
...@@ -115,5 +115,5 @@ ...@@ -115,5 +115,5 @@
</view> </view>
</view> </view>
</view> </view>
<crowdfund-poster item="{{posterItem}}" id="poster" /> <crowdfund-poster item="{{posterItem}}" id="poster" bindlongtouch="longtouch" />
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!