Commit 69810aed4cd9ad004f61bd7edce58e2588e243b7

Authored by yvan.ni
1 parent 85da1272

订单列表的优化

packageA/pages/details_serviceCard/details_serviceCard.js
... ... @@ -695,7 +695,7 @@ Page({
695 695 }, function () {
696 696 app.showWarning('支付成功');
697 697  
698   - if(pt_act.is_zsorder==2){
  698 + if(pt_act.kttype==1){
699 699 //--如果商家团的时候---
700 700 getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", {
701 701 data: {orderSn:order_sn,storeId:os.stoid }
... ...
pages/user/order_list/order_list.js
... ... @@ -1217,8 +1217,9 @@ Page({
1217 1217 success: function (t) {
1218 1218 th.setData({ paying: 0 });
1219 1219 if (t.data.code == 0) {
1220   - th.data.orderList.splice(o_index, 1);
1221   - th.setData({ orderList: th.data.orderList });
  1220 + //th.data.orderList.splice(o_index, 1);
  1221 + //th.setData({ orderList: th.data.orderList });
  1222 + th.onShow();
1222 1223 } else {
1223 1224 getApp().confirmBox(t.data.msg + "请您取消该订单");
1224 1225 }
... ... @@ -1238,8 +1239,8 @@ Page({
1238 1239 t.pay(e.order_sn, function () {
1239 1240 th.setData({ paying: 0 });
1240 1241 wx.showToast({ title: '支付成功' })
1241   - th.data.orderList.splice(o_index, 1);
1242   - th.setData({ orderList: th.data.orderList });
  1242 + //th.data.orderList.splice(o_index, 1);
  1243 + //th.setData({ orderList: th.data.orderList });
1243 1244  
1244 1245 //商家团支付成功后,要让他的团能够建立或者参与
1245 1246 if(e.is_zsorder==2){
... ... @@ -1249,6 +1250,11 @@ Page({
1249 1250 })
1250 1251 }
1251 1252  
  1253 + setTimeout(()=>{
  1254 + th.onShow();
  1255 + },500)
  1256 +
  1257 +
1252 1258 }, function () {
1253 1259 th.setData({ paying: 0 });
1254 1260 }, os.stoid, 1);
... ... @@ -2665,15 +2671,18 @@ Page({
2665 2671 duration: 2000
2666 2672 });
2667 2673  
2668   - if(pt_act.is_zsorder==2){
2669   - //--如果商家团的时候---
2670   - getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", {
  2674 + if(pt_act.kttype==1){
  2675 +
  2676 + //--如果商家团的时候,这个要改,要用服务卡的接口---
  2677 + getApp().request.promisePost("/api/weshop/rechargeServicelist/vipAutoTuan", {
2671 2678 data: {orderSn:order_sn,storeId:os.stoid }
2672 2679 })
2673 2680 }
2674 2681  
2675   - th.data.cardList.splice(index, 1);
2676   - th.setData({ orderList: th.data.cardList });
  2682 + setTimeout(()=>{
  2683 + th.onShow();
  2684 + },500)
  2685 +
2677 2686  
2678 2687  
2679 2688 }, function (e) {
... ...
pages/user/order_list/order_list.wxml
... ... @@ -484,7 +484,7 @@
484 484 </view>
485 485  
486 486 <!-- 无订单 -->
487   -<view class="empty_order" wx:if="{{((!orderList||orderList.length==0) && is_get && currentIndex == 0) || (list2.length==0 && currentIndex == 1) || (cardList.length == 0 && currentIndex == 2)}}">
  487 +<view class="empty_order" wx:if="{{((!orderList||orderList.length==0) && is_get && currentIndex == 0) || (list2.length==0 && currentIndex == 1) || (cardList.length == 0 && currentIndex == 2 && is_get)}}">
488 488 <view class="flex-level">
489 489 <image src="{{iurl}}miniapp/images/order/empty_order.png"></image>
490 490 </view>
... ...