ycm 2 years ago
parent
commit
d656f4dff3
2 changed files with 11 additions and 4 deletions
  1. 6 0
      pages/servicePoint/index.js
  2. 5 4
      pages/servicePoint/index.wxml

+ 6 - 0
pages/servicePoint/index.js

@@ -58,6 +58,12 @@ Page({
     onPullDownRefresh:function(){
       this.getData(this.data.class)
     },
+    openpreview(e){
+        wx.previewImage({
+            current: e.currentTarget.dataset.url, // 当前显示图片的http链接
+            urls: e.currentTarget.dataset.urls.map(v=>{return v.thumb}) || [] // 需要预览的图片http链接列表
+        })
+    },
     click(e){
       var clsss=e.currentTarget.dataset.class;
       var dat=""

+ 5 - 4
pages/servicePoint/index.wxml

@@ -4,13 +4,13 @@
       <view class="bd1">
         <text lines="1" class="word2">{{selectInfo.title}}</text>
         <view class="bd2">
-          <view class="section3-0" >
+          <view class="section3-0" wx:if="{{selectInfo.unit>0}}">
             <view class="main1-0">
               <text lines="1" class="word3-0">{{selectInfo.door_Collect_num}}</text>
               <text lines="1" class="word4-0">上门待收</text>
             </view>
           </view>
-          <view class="section3-1">
+          <view class="section3-1" wx:if="{{selectInfo.unit>0}}">
             <view class="main1-1">
               <text lines="1" class="word3-1">{{selectInfo.door_stay_num}}</text>
               <text lines="1" class="word4-1">上门待送</text>
@@ -61,7 +61,7 @@
           </view>
           <view class="box2-0">
             <view class="box3-0">
-              <view wx:for="{{item.order_info}}" wx:key="index" wx:for-item="val" class="box4-0">
+              <view wx:for="{{item.order_info}}" wx:key="index" wx:for-item="val" catchtap="openpreview" data-url="{{val.thumb}}" data-urls="{{item.order_info}}" class="box4-0">
 
                 <view class="layer1-0">
                   <image src="{{val.thumb==''?'/image/home/pic.png':val.thumb}}"></image>
@@ -89,7 +89,8 @@
       </view>
 
     </view>
-    <view class="group10" wx:if="{{selectInfo.unit>0}}">
+    <!-- wx:if="{{selectInfo.unit>0}}" -->
+    <view class="group10">
       <view class="section9">
         <view bindtap="operate" data-type="0" class="outer1">
           <text lines="1" class="word15">揽收</text>