Procházet zdrojové kódy

添加错误提示

魏熙美 před 5 roky
rodič
revize
db98ca1efd

+ 8
- 5
src/views/carouselFigure/advertisementEdit.vue Zobrazit soubor

@@ -418,14 +418,16 @@
418 418
           this.form = res
419 419
           this.imageUrl = res.image
420 420
           this.showPlace = res.targetName
421
-        }).catch(() => {
421
+        }).catch((err) => {
422
+          this.$notify.error(err.msg || err.message);
422 423
           console.log('carouselFigure/getByIdExtendContent err')
423 424
         })
424 425
       },
425 426
       getBuildList() {
426 427
         this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
427 428
           this.buildingList = res.records
428
-        }).catch(() => {
429
+        }).catch((err) => {
430
+          this.$notify.error(err.msg || err.message);
429 431
           console.log('building/getBuildings err')
430 432
         })
431 433
       },
@@ -454,8 +456,8 @@
454 456
           this.$store.dispatch('carouselFigure/addExtendContent', this.form).then((res) => {
455 457
             this.$message.success('操作成功')
456 458
             this.$router.go(-1)
457
-          }).catch(() => {
458
-
459
+          }).catch((err) => {
460
+            this.$notify.error(err.msg || err.message);
459 461
           })
460 462
           return
461 463
         }
@@ -464,7 +466,8 @@
464 466
         this.$store.dispatch('carouselFigure/updateExtendContent', this.form).then((res) => {
465 467
           this.$message.success('操作成功')
466 468
           this.$router.go(-1)
467
-        }).catch(() => {
469
+        }).catch((err) => {
470
+          this.$notify.error(err.msg || err.message);
468 471
           console.log('carouselFigure/updateExtendContent err')
469 472
         })
470 473
       },

+ 8
- 5
src/views/carouselFigure/edit.vue Zobrazit soubor

@@ -418,14 +418,16 @@ export default {
418 418
         this.form = res
419 419
         this.imageUrl = res.image
420 420
         this.showPlace = res.targetName
421
-      }).catch(() => {
421
+      }).catch((err) => {
422
+        this.$notify.error(err.msg || err.message);
422 423
         console.log('carouselFigure/getByIdExtendContent err')
423 424
       })
424 425
     },
425 426
     getBuildList() {
426 427
       this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
427 428
         this.buildingList = res.records
428
-      }).catch(() => {
429
+      }).catch((err) => {
430
+        this.$notify.error(err.msg || err.message);
429 431
         console.log('building/getBuildings err')
430 432
       })
431 433
     },
@@ -454,8 +456,8 @@ export default {
454 456
         this.$store.dispatch('carouselFigure/addExtendContent', this.form).then((res) => {
455 457
           this.$message.success('操作成功')
456 458
           this.$router.go(-1)
457
-        }).catch(() => {
458
-
459
+        }).catch((err) => {
460
+          this.$notify.error(err.msg || err.message);
459 461
         })
460 462
         return
461 463
       }
@@ -464,7 +466,8 @@ export default {
464 466
       this.$store.dispatch('carouselFigure/updateExtendContent', this.form).then((res) => {
465 467
         this.$message.success('操作成功')
466 468
         this.$router.go(-1)
467
-      }).catch(() => {
469
+      }).catch((err) => {
470
+        this.$notify.error(err.msg || err.message);
468 471
         console.log('carouselFigure/updateExtendContent err')
469 472
       })
470 473
     },

+ 5
- 2
src/views/customer/editCustomer.vue Zobrazit soubor

@@ -155,6 +155,8 @@
155 155
             this.detail = data;
156 156
             this.dialogImageUrl = data.picture
157 157
             this.imageUrl = data.picture
158
+          }).catch((err) => {
159
+            this.$notify.error(err.msg || err.message);
158 160
           });
159 161
         }
160 162
       },
@@ -220,7 +222,7 @@
220 222
                 })
221 223
                 .catch(err => {
222 224
                   this.hideLoadding();
223
-                  this.$notify.error(err.message);
225
+                  this.$notify.error(err.msg || err.message);
224 226
                 });
225 227
       },
226 228
 
@@ -242,7 +244,8 @@
242 244
           this.dialogForm.pageNumber = res.current
243 245
           this.dialogForm.pageSize = res.size
244 246
           this.dialogTotal = res.total
245
-        }).catch(()=> {
247
+        }).catch((err)=> {
248
+          this.$notify.error(err.msg || err.message);
246 249
           console.log('persons/getConsultants err')
247 250
         })
248 251
       },

+ 5
- 2
src/views/customer/editRecommend.vue Zobrazit soubor

@@ -176,6 +176,8 @@ export default {
176 176
           this.detail = data;
177 177
           this.dialogImageUrl = data.picture
178 178
           this.imageUrl = data.picture
179
+        }).catch((err) => {
180
+          this.$notify.error(err.msg || err.message);
179 181
         });
180 182
       }
181 183
     },
@@ -241,7 +243,7 @@ export default {
241 243
         })
242 244
         .catch(err => {
243 245
           this.hideLoadding();
244
-          this.$notify.error(err.message);
246
+          this.$notify.error(err.msg || err.message);
245 247
         });
246 248
     },
247 249
 
@@ -263,7 +265,8 @@ export default {
263 265
         this.dialogForm.pageNumber = res.current
264 266
         this.dialogForm.pageSize = res.size
265 267
         this.dialogTotal = res.total
266
-      }).catch(()=> {
268
+      }).catch((err)=> {
269
+        this.$notify.error(err.msg || err.message);
267 270
         console.log('persons/getConsultants err')
268 271
       })
269 272
     },

+ 10
- 5
src/views/news/edi/index.vue Zobrazit soubor

@@ -134,14 +134,16 @@
134 134
             getTypeList() {
135 135
                 this.$store.dispatch('news/getTypeList', this.typeForm).then((res) => {
136 136
                     this.typeList = res.records
137
-                }).catch(() => {
137
+                }).catch((err) => {
138
+                    this.$notify.error(err.msg || err.message);
138 139
                     console.log('news/getTypeList err')
139 140
                 })
140 141
             },
141 142
             getBuildList() {
142 143
                 this.$store.dispatch('building/getBuildings', this.buildingForm).then((res) => {
143 144
                     this.buildingList = res.records
144
-                }).catch(() => {
145
+                }).catch((err) => {
146
+                    this.$notify.error(err.msg || err.message);
145 147
                     console.log('building/getBuildings err')
146 148
                 })
147 149
             },
@@ -151,7 +153,8 @@
151 153
                         this.$message.success('操作成功!')
152 154
                         this.$router.go(-1)
153 155
                         // console.log(res)
154
-                    }).catch(() => {
156
+                    }).catch((err) => {
157
+                        this.$notify.error(err.msg || err.message);
155 158
                         console.log('news/add err')
156 159
                     })
157 160
 
@@ -163,7 +166,8 @@
163 166
                     this.$message.success('操作成功!')
164 167
                     this.$router.go(-1)
165 168
                     // console.log(res)
166
-                }).catch(() => {
169
+                }).catch((err) => {
170
+                    this.$notify.error(err.msg || err.message);
167 171
                     console.log('news/update err')
168 172
                 })
169 173
 
@@ -181,7 +185,8 @@
181 185
                     this.imageUrl = res.newsImg
182 186
                     this.form.buildingId = res.buildingId
183 187
                     this.form.newsDetail = res.newsDetail
184
-                }).catch(() => {
188
+                }).catch((err) => {
189
+                    this.$notify.error(err.msg || err.message);
185 190
                     console.log('news/getById err')
186 191
                 })
187 192
             }

+ 2
- 1
src/views/news/type/edi/index.vue Zobrazit soubor

@@ -98,7 +98,8 @@
98 98
                         this.$message.success('操作成功!')
99 99
                         this.$router.go(-1)
100 100
                         // console.log(res)
101
-                    }).catch(() => {
101
+                    }).catch((err) => {
102
+                        this.$notify.error(err.msg || err.message);
102 103
                         console.log('news/addType err')
103 104
                     })
104 105