Quellcode durchsuchen

长按识别二维码

bobo vor 3 Jahren
Ursprung
Commit
6430be3a02

+ 1 - 1
components/customPreviewImage/customPreviewImage.wxml

@@ -2,7 +2,7 @@
 <view class="preview-body" bindtouchstart="handleStart" bindtouchend="handleEnd" bindlongpress="longPress" bindtap="handleClose">
 
     <view class="preview-box">
-        <image class="preview-img" src="{{src}}" mode="aspectFit" />
+        <image class="preview-img" src="{{src}}" mode="aspectFit" show-menu-by-longpress="true" />
     </view>
 
 </view>

+ 7 - 1
pages/luckDraw/detail.js

@@ -495,9 +495,15 @@ Page({
     },
 
     toLookHitPhoto() {
+        let url = '';
+        if (this.data.hitResult.goodsData && this.data.hitResult.goodsData.fullPhotoUrl) {
+            url = this.data.hitResult.goodsData.fullPhotoUrl
+        } else {
+            url = this.data.hitResult.goodsBigImage
+        }
         this.setData({
             showCustomPreview: true,
-            previewImgSrc: this.data.hitResult.goodsBigImage,
+            previewImgSrc: url
         })
     },
     closePreviewImage() {