ycm 2 년 전
부모
커밋
df4b67be93
3개의 변경된 파일16개의 추가작업 그리고 10개의 파일을 삭제
  1. 14 8
      pages/order/deposit/deposit.js
  2. 1 1
      pages/order/deposit/deposit.wxml
  3. 1 1
      pages/order/detail/detail.js

+ 14 - 8
pages/order/deposit/deposit.js

@@ -19,7 +19,9 @@ Page({
         device_no: "",
         order_num: "",
         is_deposit: 1,
-        netwrok_id: 0
+        netwrok_id: 0,
+        order_type: 0,
+
 
 
     },
@@ -37,10 +39,11 @@ Page({
         console.log(options);
         this.setData({
             logisticsStatus: app.globalData.logisticsStatus,
-            order_num: is_deposit==1?0:order_num,
+            order_num: order_num,
             netwrok_id: netwrok_id,
             is_deposit: is_deposit,
-            device_id:device_id
+            device_id:device_id,
+            order_type: order_type
         })
 
 
@@ -124,6 +127,7 @@ Page({
             order_type: order_type,
             order_num: this.data.order_num,
             logistics_status: that.data.is_deposit == 1 ? 1 : 6,
+            is_deposit: that.data.is_deposit
         }
         console.log(data);
 
@@ -171,21 +175,21 @@ Page({
                 that.setData({
                     device_no: res.message.data.device_no,
                 })
-
                 wx.showToast({
                     title: res.message.msg,
                 })
+                console.log(res.message.msg)
                 // wx.setTimeout(() => {
                 //     wx.hideLoading();
                 // }, 1000);
 
 
                 setTimeout(function () {
-                    wx.hideLoading();
+                    // wx.hideLoading();
                     that.setData({
                         show: !that.data.show
                     })
-                }, 1000)
+                }, 3000)
 
             } else {
                 console.log(res);
@@ -194,6 +198,7 @@ Page({
                     spot_id: res.message.data.spot_id,
                     device_no: res.message.data.device_id
                 })
+                
                 if (type == 1) {
                     that.storeClothes()
                 } else {
@@ -202,7 +207,7 @@ Page({
 
             }
 
-            wx.hideLoading();
+            // wx.hideLoading();
 
         }).catch(function (err) {
             console.log(err.message)
@@ -232,6 +237,7 @@ Page({
                     }, 1000);
 
                 } else {
+                    that.getorderList(that.data.order_type, that.data.netwrok_id);
                     console.log(res);
                     if (is_deposit == 1) {
                         that.storeClothes()
@@ -265,6 +271,7 @@ Page({
                     }, 1000);
 
                 } else {
+                    that.getorderList(that.data.order_type, that.data.netwrok_id);
                     console.log(res);
                     if (type == 1) {
                         that.storeClothes()
@@ -335,7 +342,6 @@ Page({
 
             } else {
                 console.log(res);
-
                 if (that.is_deposit == 1) {
                     that.storeClothes()
                 } else {

+ 1 - 1
pages/order/deposit/deposit.wxml

@@ -1,7 +1,7 @@
 <!--pages/order/deposit/deposit.wxml-->
 <view class="topBox flex ju-b">
     <view class="le">
-        <view class="tit"> {{network.name}}</view>
+        <view class="tit"> {{network.title}}</view>
         <view class="adr m-top-20"> {{network.address}}</view>
     </view>
     <view class="lr">

+ 1 - 1
pages/order/detail/detail.js

@@ -174,7 +174,7 @@ Page({
                var reg= new RegExp('(^)?network_id=([^&]*)(&|$)orde_num=([^&]*)(&|$)','i')
               var str= res.result.match(reg);
        
-              wx.navigateTo({
+              wx.redirectTo({
                 url: '/pages/order/deposit/deposit?order_type='+no+"&network_id="+network_id+"&is_deposit="+is_deposit+"&order_num="+str[4]+"&device_id="+str[4],
               })
             }