瀏覽代碼

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

haopeng 2 年之前
父節點
當前提交
e1b90ccf73
共有 2 個文件被更改,包括 14 次插入0 次删除
  1. 7 0
      src/pages/confirmOrder/addOrder/index.vue
  2. 7 0
      src/pages/confirmOrder/details/index.vue

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

@@ -639,8 +639,15 @@ export default {
639 639
         order_day: this.tsTableList[this.tsTableIndex].order_day,
640 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 648
       api.padOrderAdd(params).then(res => {
643 649
         if (res.code == 200) {
650
+          this.$loading().close()
644 651
           // 关闭当前页面并且跳转
645 652
           that.$router.push({
646 653
             path: "/confirmOrder/details",

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

@@ -759,11 +759,18 @@ export default {
759 759
         order_day: this.tsTableList[this.tsTableIndex].order_day,
760 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 768
       api.setOrderUpdate(params).then(res => {
763 769
         if (res.code == 200) {
764 770
           this.getOrderInfo()
765 771
           this.isTs = false
766 772
           this.isChange = false
773
+          this.$loading().close()
767 774
         }
768 775
       })
769 776
     },