zhanghongrui 2 yıl önce
ebeveyn
işleme
e3b14619d9

+ 13 - 3
pages/zhenggaijindu/zhenggaijindu.js

@@ -23,12 +23,22 @@ Page({
       pictureBasePath: res.pictureBasePath,
       zgjdList: res.zgjdList
     })
-    if (res.zgjdList.length > 0 && res.zgjdList[0].riskStatus == "risk_status_2") {
+    if(res.zgjdList!=null&&res.zgjdList.length>0){
+    if ( res.zgjdList[0].riskStatus == "risk_status_2") {
 
       this.setData({
-        hidden: false
+        flag: false
+      })
+    }else{
+      this.setData({
+        flag: true
       })
     }
+  }else{
+    this.setData({
+      flag: false
+    })
+  }
   },
 
   bindPickerChange: function (e) {
@@ -60,7 +70,7 @@ Page({
    */
   data: {
     host: app.globalData.host,
-    hidden: true,
+    flag: false,
     pictureBasePath: null,
     zgjdList: null,
     isRefreshUP: false,

+ 1 - 1
pages/zhenggaijindu/zhenggaijindu.wxml

@@ -16,7 +16,7 @@
       </view>
     </view>
   </view>
-  <view class="btm_btn" hidden='{{!hidden}}'>
+  <view class="btm_btn" wx:if='{{flag}}'>
     <view class="time_qx">
     
       <view class="ttbtn">