yinzhipeng 4 年 前
コミット
d18456615e
1 ファイル変更16 行追加8 行削除
  1. 16 8
      pages/charging/charging.js

+ 16 - 8
pages/charging/charging.js

@@ -286,16 +286,24 @@ Page({
   onShow: function(e) {
     clearInterval(chargingStatus);
     this.showChargingPng();
-    let {
-      orderid,
-      userId,
-      chargPileId
-    } = this.data;
-    if (!orderid || orderid == "null") {
-      orderid = undefined;
-    }
+    // var {
+    //   orderid,
+    //   userId,
+    //   chargPileId
+    // } = this.data;
+    // if (!orderid || orderid == "null") {
+    //   orderid = '';
+    // }
     let that = this;
     chargingStatus = setInterval(function() {
+      var {
+        orderid,
+        userId,
+        chargPileId
+      } = that.data;
+      if (!orderid || orderid == "null") {
+        orderid = '';
+      }
       wx.request({
         url: getApp().globalData.postHeadAgreement + '/restapi/pileLog/wechatchargstatus',
         data: {