From 69810aed4cd9ad004f61bd7edce58e2588e243b7 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Mon, 10 Jul 2023 21:56:12 +0800 Subject: [PATCH] 订单列表的优化 --- packageA/pages/details_serviceCard/details_serviceCard.js | 2 +- pages/user/order_list/order_list.js | 27 ++++++++++++++++++--------- pages/user/order_list/order_list.wxml | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/packageA/pages/details_serviceCard/details_serviceCard.js b/packageA/pages/details_serviceCard/details_serviceCard.js index 4e4b372..86b0ed0 100644 --- a/packageA/pages/details_serviceCard/details_serviceCard.js +++ b/packageA/pages/details_serviceCard/details_serviceCard.js @@ -695,7 +695,7 @@ Page({ }, function () { app.showWarning('支付成功'); - if(pt_act.is_zsorder==2){ + if(pt_act.kttype==1){ //--如果商家团的时候--- getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { data: {orderSn:order_sn,storeId:os.stoid } diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index 2653ba6..4c7a173 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -1217,8 +1217,9 @@ Page({ success: function (t) { th.setData({ paying: 0 }); if (t.data.code == 0) { - th.data.orderList.splice(o_index, 1); - th.setData({ orderList: th.data.orderList }); + //th.data.orderList.splice(o_index, 1); + //th.setData({ orderList: th.data.orderList }); + th.onShow(); } else { getApp().confirmBox(t.data.msg + "请您取消该订单"); } @@ -1238,8 +1239,8 @@ Page({ t.pay(e.order_sn, function () { th.setData({ paying: 0 }); wx.showToast({ title: '支付成功' }) - th.data.orderList.splice(o_index, 1); - th.setData({ orderList: th.data.orderList }); + //th.data.orderList.splice(o_index, 1); + //th.setData({ orderList: th.data.orderList }); //商家团支付成功后,要让他的团能够建立或者参与 if(e.is_zsorder==2){ @@ -1249,6 +1250,11 @@ Page({ }) } + setTimeout(()=>{ + th.onShow(); + },500) + + }, function () { th.setData({ paying: 0 }); }, os.stoid, 1); @@ -2665,15 +2671,18 @@ Page({ duration: 2000 }); - if(pt_act.is_zsorder==2){ - //--如果商家团的时候--- - getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { + if(pt_act.kttype==1){ + + //--如果商家团的时候,这个要改,要用服务卡的接口--- + getApp().request.promisePost("/api/weshop/rechargeServicelist/vipAutoTuan", { data: {orderSn:order_sn,storeId:os.stoid } }) } - th.data.cardList.splice(index, 1); - th.setData({ orderList: th.data.cardList }); + setTimeout(()=>{ + th.onShow(); + },500) + }, function (e) { diff --git a/pages/user/order_list/order_list.wxml b/pages/user/order_list/order_list.wxml index 0e8e518..fa95d92 100644 --- a/pages/user/order_list/order_list.wxml +++ b/pages/user/order_list/order_list.wxml @@ -484,7 +484,7 @@ - + -- libgit2 0.21.4