Преглед на файлове

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
     },