MrShi
6 小时以前 bc5d79cdd957fcee510d7a1cee07f6775af65596
mini-program/pagesA/pages/order/order.vue
@@ -178,7 +178,8 @@
               { name: '待支付', id: 0 ,index:1},
               { name: '待发货/自提', id: 1,index:2 },
               { name: '待收货', id: 2 ,index:3},
            ]
            ],
            loading: false
         };
      },
      onLoad(options) {
@@ -280,9 +281,12 @@
         },
         payOrder(item){
            var that = this;
            if (this.loading) return;
            this.loading = true
            this.$u.api.replayPay({
               orderId: item.id
            }).then(res => {
               this.loading = false
               if (res.code === 200) {
                  wx.requestPayment({
                     timeStamp: res.data.response.timeStamp,
@@ -315,13 +319,16 @@
            var that =this
            let res = await this.$u.api.affirmOrder({ orderId: this.currentOrder.id  });
            if (res.code === 200 ) { 
               that.showDone = false
               that.getFirstPageData()
               //修改订单状态
               this.dataList.forEach(item=>{
                  if(item.id==this.currentOrder.id){
                     item.status =3
                  }
               })
               this.doneOrder()
               // this.dataList.forEach(item=>{
               //    if(item.id==this.currentOrder.id){
               //       item.status =3
               //    }
               // })
               // this.doneOrder()
               this.showDone()
            }else{
               /* uni.showToast({
                  title:res.message||'确定收货失败!',
@@ -336,13 +343,15 @@
               var that =this
            let res = await that.$u.api.cancelOrder({ orderId: this.currentOrder.id  });
            if (res.code === 200 ) { 
               this.showCancel = false
               //修改订单状态
               this.dataList.forEach(item=>{
                  if(item.id==this.currentOrder.id){
                     item.status = 4
                  }
               }) 
               this.cancelOrder()
               // this.cancelOrder()
               that.getFirstPageData()
            }else{
               /* uni.showToast({
                  title:res.message||'取消订单失败!',
@@ -357,6 +366,7 @@
            var that =this
            let res = await that.$u.api.delOrder({ orderId: this.currentOrder.id  });
            if (res.code === 200 ) { 
               this.showDelete = false
               //修改订单状态
               /* var tindex = -1;
               this.dataList.forEach((item,index)=>{