Pārlūkot izejas kodu

前台:按钮loading

baichengfei 5 gadi atpakaļ
vecāks
revīzija
5f21c30b1c

+ 3 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstorage/_opera/basisedit.vue

@@ -525,14 +525,15 @@
               type: 'success',
               message: res.data.message
             })
+            this.btnLoading = false
             // this.$router.push('/') // TODO
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
+            this.btnLoading = false
           }
-          this.btnLoading = false
         }).catch(err => {
           this.dialogVisibleBack = false
           this.btnLoading = false
@@ -607,8 +608,8 @@
                 type: 'warning',
                 message: res.data.message
               })
+              this.btnLoading = false
             }
-            this.btnLoading = false
           }).catch(() => {
             this.$message({
               type: 'info',

+ 4 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstorage/_opera/goodsedit.vue

@@ -527,14 +527,15 @@
               type: 'success',
               message: res.data.message
             })
+            this.btnLoading = false
             // this.$router.push('/')
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
             })
+            this.btnLoading = false
           }
-          this.btnLoading = false
         }).catch(err => {
           this.dialogVisibleBack = false
           this.btnLoading = false
@@ -605,14 +606,15 @@
                 type: 'success',
                 message: res.data.message
               })
+              this.btnLoading = false
             } else {
               this.$message({
                 type: 'warning',
                 message: res.data.message
               })
+              this.btnLoading = false
             }
           })
-          this.btnLoading = false
         }).catch(() => {
           this.$message({
             type: 'info',

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstorage/_opera/techedit.vue

@@ -539,8 +539,8 @@
               type: 'warning',
               message: res.data.message
             })
+            this.btnLoading = false
           }
-          this.btnLoading = false
         }).catch(err => {
           this.dialogVisibleBack = false
           this.btnLoading = false
@@ -615,8 +615,8 @@
                 type: 'warning',
                 message: res.data.message
               })
+              this.btnLoading = false
             }
-            this.btnLoading = false
           }).catch(() => {
             this.$message({
               type: 'info',