Browse Source

feat: 增加及确认订单增加loading

haopeng 2 years ago
parent
commit
e1b90ccf73

+ 7 - 0
src/pages/confirmOrder/addOrder/index.vue

@@ -639,8 +639,15 @@ export default {
639
         order_day: this.tsTableList[this.tsTableIndex].order_day,
639
         order_day: this.tsTableList[this.tsTableIndex].order_day,
640
         order_time: this.timeIndexText
640
         order_time: this.timeIndexText
641
       };
641
       };
642
+      this.$loading({
643
+        lock: true,
644
+        text: '加载中',
645
+        spinner: 'el-icon-loading',
646
+        background: 'rgba(0, 0, 0, 0.7)'
647
+      })
642
       api.padOrderAdd(params).then(res => {
648
       api.padOrderAdd(params).then(res => {
643
         if (res.code == 200) {
649
         if (res.code == 200) {
650
+          this.$loading().close()
644
           // 关闭当前页面并且跳转
651
           // 关闭当前页面并且跳转
645
           that.$router.push({
652
           that.$router.push({
646
             path: "/confirmOrder/details",
653
             path: "/confirmOrder/details",

+ 7 - 0
src/pages/confirmOrder/details/index.vue

@@ -759,11 +759,18 @@ export default {
759
         order_day: this.tsTableList[this.tsTableIndex].order_day,
759
         order_day: this.tsTableList[this.tsTableIndex].order_day,
760
         order_time: this.timeIndexText
760
         order_time: this.timeIndexText
761
       }
761
       }
762
+      this.$loading({
763
+        lock: true,
764
+        text: '加载中',
765
+        spinner: 'el-icon-loading',
766
+        background: 'rgba(0, 0, 0, 0.7)'
767
+      })
762
       api.setOrderUpdate(params).then(res => {
768
       api.setOrderUpdate(params).then(res => {
763
         if (res.code == 200) {
769
         if (res.code == 200) {
764
           this.getOrderInfo()
770
           this.getOrderInfo()
765
           this.isTs = false
771
           this.isTs = false
766
           this.isChange = false
772
           this.isChange = false
773
+          this.$loading().close()
767
         }
774
         }
768
       })
775
       })
769
     },
776
     },