Quellcode durchsuchen

岗位详情地址显示优化

ZhangWenQiang vor 6 Jahren
Ursprung
Commit
35a741ca52
1 geänderte Dateien mit 20 neuen und 16 gelöschten Zeilen
  1. 20 16
      pages/detail/index.wxml

+ 20 - 16
pages/detail/index.wxml

@@ -42,15 +42,17 @@
         </view>
       </view>
     </view>
-    <view class='three'>
-      <view class='left'>
-        <image src='{{imgServerUrl}}/images/happyjob/location.png'></image>
-        <text>{{postitionDetail.hpPositionAddressList[0].adname}}{{postitionDetail.hpPositionAddressList[0].address}}</text>
-      </view>
-      <view class='right'>
-        <image src='{{imgServerUrl}}/images/happyjob/right.png'></image>
+    <block wx:if="{{postitionDetail.hpPositionAddressList[0].adname}}">
+      <view class='three'>
+        <view class='left'>
+          <image src='{{imgServerUrl}}/images/happyjob/location.png'></image>
+          <text>{{postitionDetail.hpPositionAddressList[0].adname}}{{postitionDetail.hpPositionAddressList[0].address?postitionDetail.hpPositionAddressList[0].address:""}}</text>
+        </view>
+        <view class='right'>
+          <image src='{{imgServerUrl}}/images/happyjob/right.png'></image>
+        </view>
       </view>
-    </view>
+    </block>
     <view class='four'>
       <view class='title'>
         <view class="name {{detailIndex == 0?'active':''}}" data-top="{{basePos}}" bindtap='goDeatil' data-index='0'>基本信息</view>
@@ -211,15 +213,17 @@
         </view>
       </view>
     </view>
-    <view class='three'>
-      <view class='left'>
-        <image src='{{imgServerUrl}}/images/happyjob/location.png'></image>
-        <text>{{postitionDetail.hpPositionAddressList[0].adname}}{{postitionDetail.hpPositionAddressList[0].address}}</text>
-      </view>
-      <view class='right'>
-        <image src='{{imgServerUrl}}/images/happyjob/right.png'></image>
+    <block wx:if="{{postitionDetail.hpPositionAddressList[0].adname}}">
+      <view class='three'>
+        <view class='left'>
+          <image src='{{imgServerUrl}}/images/happyjob/location.png'></image>
+          <text>{{postitionDetail.hpPositionAddressList[0].adname}}{{postitionDetail.hpPositionAddressList[0].address?postitionDetail.hpPositionAddressList[0].address:""}}</text>
+        </view>
+        <view class='right'>
+          <image src='{{imgServerUrl}}/images/happyjob/right.png'></image>
+        </view>
       </view>
-    </view>
+    </block>
     <view class='three_1'>
       <view class='sex'>
         <view class='left'>岗位福利:</view>