panhui 4 лет назад
Родитель
Сommit
ed78efec5f
1 измененных файлов с 9 добавлено и 5 удалено
  1. 9 5
      src/main/nine-space/src/views/Home.vue

+ 9 - 5
src/main/nine-space/src/views/Home.vue

@@ -63,11 +63,15 @@ export default {
                 message: '加载中...',
                 forbidClick: true
             });
-            this.getProduct().then(res => {
-                this.banners = res;
-            });
-            this.getProduct('LIST').then(res => {
-                this.products = res;
+            Promise.all([
+                this.getProduct().then(res => {
+                    this.banners = res;
+                }),
+                this.getProduct('LIST').then(res => {
+                    this.products = res;
+                })
+            ]).then(() => {
+                this.$toast.clear();
             });
         },
         getProduct(type = 'BANNER') {