魏熙美 пре 5 година
родитељ
комит
18fe0d69ba

+ 1
- 1
src/router.js Прегледај датотеку

@@ -11,7 +11,7 @@ const routes = [
11 11
   {
12 12
     path: '/',
13 13
     name: 'index',
14
-    redirect: '/dashboard',
14
+    redirect: '/indexEcharts',
15 15
     component: () => import('@/layout/index.vue'),
16 16
     children: [
17 17
       ...pages,

+ 4
- 4
src/store/modules/apartment.js Прегледај датотеку

@@ -57,8 +57,8 @@ export default {
57 57
         }).then((data) => {
58 58
           
59 59
           resolve(data)
60
-        }).catch(() => {
61
-          reject()
60
+        }).catch((err) => {
61
+          reject(err)
62 62
         })
63 63
       })
64 64
     },
@@ -70,8 +70,8 @@ export default {
70 70
           data:payload
71 71
         }).then((data) => {
72 72
           resolve(data)
73
-        }).catch(() => {
74
-          reject()
73
+        }).catch((err) => {
74
+          reject(err)
75 75
         })
76 76
       })
77 77
     },

+ 9
- 1
src/views/activity/add.vue Прегледај датотеку

@@ -197,7 +197,11 @@ export default {
197 197
 
198 198
     handleAvatarSuccess (res) {
199 199
       this.activityQuery.url = res.data
200
-      this.updateDetail({...this.dynamic, imgUrl: res.data})
200
+      this.updateDetail({...this.dynamic, imgUrl: res.data}).then((res) => {
201
+
202
+      }).catch((err) => {
203
+          this.$notify.error(err.msg || err.message)
204
+      })
201 205
       this.loading.close()
202 206
     },
203 207
     shareImageHandleAvatarSuccess(res, file) { // 海报图
@@ -236,6 +240,8 @@ export default {
236 240
         ).then(() => {
237 241
           this.onCancel()
238 242
           
243
+        }).catch((err) => {
244
+            this.$notify.error(err)
239 245
         })
240 246
         this.$router.push({ name: "activity-list" });
241 247
           } else {
@@ -288,6 +294,8 @@ export default {
288 294
           phoneEditor.txt.html(data.url)
289 295
         })
290 296
       }
297
+    }).catch((err) => {
298
+        this.$notify.error(err)
291 299
     })
292 300
   }
293 301
 }

+ 2
- 0
src/views/activity/edit.vue Прегледај датотеку

@@ -266,6 +266,8 @@ export default {
266 266
         this.activityQuery.shareImg = data.shareImg
267 267
         this.shareImageUrl = data.shareImg
268 268
 
269
+        }).catch((err) => {
270
+            this.$notify.error(err.msg || err.message)
269 271
         })
270 272
     },
271 273
     formateDate(dt) {

+ 14
- 11
src/views/activity/list.vue Прегледај датотеку

@@ -185,17 +185,20 @@ export default {
185 185
         }).then(() => {
186 186
            this.filterData.dynamicId = id
187 187
           this.finishActivity(
188
-          JSON.stringify(this.filterData)
189
-        ).then((res) => {
190
-           this.getList();
191
-          this.getBuildList()   
192
-        })    
193
-          this.$message({
194
-            type: 'success',
195
-            message: '成功!'
196
-          });
197
-        }).catch(() => {       
198
-        });
188
+                JSON.stringify(this.filterData)
189
+          ).then((res) => {
190
+              this.getList();
191
+              this.getBuildList()
192
+          }).catch((err) => {
193
+              this.$notify.error(err.msg || err.message)
194
+          })
195
+              this.$message({
196
+                type: 'success',
197
+                message: '成功!'
198
+              });
199
+        }).catch((err) => {
200
+            this.$notify.error(err.msg || err.message)
201
+        })
199 202
     },
200 203
     top(row){
201 204
       const weight = Math.abs(row.weight - 1)

+ 1
- 1
src/views/building/edit.vue Прегледај датотеку

@@ -525,7 +525,7 @@ export default {
525 525
         this.addBuilding({
526 526
           onSuccess: this.onCancel,
527 527
           detail: JSON.stringify(building)
528
-        });
528
+        })
529 529
       } else {
530 530
         // 修改
531 531
         this.editBuilding({

+ 8
- 0
src/views/building/list.vue Прегледај датотеку

@@ -269,6 +269,8 @@ export default {
269 269
           status: 1
270 270
         }).then(() => {
271 271
           this.getList()
272
+        }).catch((err) => {
273
+            this.$notify.error(err.msg || err.message)
272 274
         })
273 275
       })
274 276
     },
@@ -286,6 +288,8 @@ export default {
286 288
           status: 0
287 289
         }).then(() => {
288 290
           this.getList()
291
+        }).catch((err) => {
292
+            this.$notify.error(err.msg || err.message)
289 293
         })
290 294
       })
291 295
     },
@@ -303,7 +307,11 @@ export default {
303 307
           id: row.buildingId
304 308
         }).then(() => {
305 309
           this.getList()
310
+        }).catch((err) => {
311
+            this.$notify.error(err.msg || err.message)
306 312
         })
313
+      }).catch((err) => {
314
+          this.$notify.error(err.msg || err.message)
307 315
       })
308 316
     },
309 317
     getCityName() { // 查询城市

+ 11
- 4
src/views/carouselFigure/advertisement.vue Прегледај датотеку

@@ -178,7 +178,9 @@
178 178
           type: "warning"
179 179
         }).then(() => {
180 180
           this.updateExtendContent(contentId, status)
181
-        });
181
+        }).catch((err) => {
182
+          this.$notify.error(err.msg || err.message)
183
+        })
182 184
       },
183 185
       Prohibit(contentId, status) {
184 186
         this.$confirm("确认停用此轮播图?", "提示", {
@@ -187,7 +189,9 @@
187 189
           type: "warning"
188 190
         }).then(() => {
189 191
           this.updateExtendContent(contentId, status)
190
-        });
192
+        }).catch((err) => {
193
+          this.$notify.error(err.msg || err.message)
194
+        })
191 195
       },
192 196
       handleDel(contentId, status) {
193 197
         this.$confirm("确认删除此数据?", "提示", {
@@ -199,12 +203,15 @@
199 203
             this.$message.error("当前活动处于发布状态,不允许删除!");
200 204
             return false;
201 205
           }
202
-        });
206
+        }).catch((err) => {
207
+          this.$notify.error(err.msg || err.message)
208
+        })
203 209
       },
204 210
       updateExtendContent(contentId, status) { // 修改轮播状态
205 211
         this.$store.dispatch('carouselFigure/updateExtendContent', { contentId: contentId, status: status }).then((res) => {
206 212
           this.getList();
207
-        }).catch(() =>{
213
+        }).catch((err) =>{
214
+          this.$notify.error(err)
208 215
           console.log('carouselFigure/updateExtendContent err')
209 216
         })
210 217
       },

+ 9
- 3
src/views/carouselFigure/edit.vue Прегледај датотеку

@@ -350,7 +350,9 @@ export default {
350 350
         ).then(() => {
351 351
           this.getAparmentList();
352 352
           this.showHx = false;
353
-        });
353
+        }).catch((err) => {
354
+          this.$notify.error(err.msg || err.message)
355
+        })
354 356
       } else {
355 357
         this.editApartment(
356 358
           JSON.stringify({
@@ -360,7 +362,9 @@ export default {
360 362
         ).then(() => {
361 363
           this.getAparmentList();
362 364
           this.showHx = false;
363
-        });
365
+        }).catch((err) => {
366
+          this.$notify.error(err.msg || err.message)
367
+        })
364 368
       }
365 369
     },
366 370
     addHx() {
@@ -371,7 +375,9 @@ export default {
371 375
     getAparmentList() {
372 376
       this.getApartments({ buildingId: this.$route.query.id }).then(data => {
373 377
         this.aparments = data;
374
-      });
378
+      }).catch((err) => {
379
+        this.$notify.error(err)
380
+      })
375 381
     },
376 382
     handleEdit(row){
377 383
       this.showPlace = row.name

+ 4
- 0
src/views/dynamic/edit.vue Прегледај датотеку

@@ -111,6 +111,8 @@ export default {
111 111
           detail: JSON.stringify(this.detail)
112 112
         }).then(() => {
113 113
           this.onCancel()
114
+        }).catch((err) => {
115
+          this.$notify.error(err)
114 116
         })
115 117
       } else {
116 118
         // 修改
@@ -118,6 +120,8 @@ export default {
118 120
           detail: JSON.stringify(this.detail)
119 121
         }).then(() => {
120 122
           this.onCancel()
123
+        }).catch((err) => {
124
+          this.$notify.error(err)
121 125
         })
122 126
       }
123 127
     },

+ 9
- 9
src/views/index.js Прегледај датотеку

@@ -1,14 +1,14 @@
1 1
 
2 2
 const pages = [
3
-  {
4
-    path: 'dashboard',
5
-    name: 'dashboard',
6
-    component: () => import('./Dashboard.vue'),
7
-    meta: {
8
-      menuShow: true,
9
-      title: 'Dashboard',
10
-    }
11
-  },
3
+  // {
4
+  //   path: 'dashboard',
5
+  //   name: 'dashboard',
6
+  //   component: () => import('./Dashboard.vue'),
7
+  //   meta: {
8
+  //     menuShow: true,
9
+  //     title: 'Dashboard',
10
+  //   }
11
+  // },
12 12
   {
13 13
     path: 'indexEcharts',
14 14
     name: 'indexEcharts',

+ 9
- 3
src/views/project/edit.vue Прегледај датотеку

@@ -501,7 +501,9 @@ export default {
501 501
         ).then(() => {
502 502
           this.getAparmentList();
503 503
           this.showHx = false;
504
-        });
504
+        }).catch((err) => {
505
+          this.$notify.error(err.msg || err.message)
506
+        })
505 507
       } else {
506 508
         this.editApartment(
507 509
           JSON.stringify({
@@ -511,7 +513,9 @@ export default {
511 513
         ).then(() => {
512 514
           this.getAparmentList();
513 515
           this.showHx = false;
514
-        });
516
+        }).catch((err) => {
517
+          this.$notify.error(err.msg || err.message)
518
+        })
515 519
       }
516 520
     },
517 521
     addHx() {
@@ -522,7 +526,9 @@ export default {
522 526
     getAparmentList() {
523 527
       this.getApartments({ buildingId: this.$route.query.id }).then(data => {
524 528
         this.aparments = data;
525
-      });
529
+      }).catch((err) => {
530
+        this.$notify.error(err)
531
+      })
526 532
     },
527 533
     handleEdit(row) {
528 534
       this.aparmentImg = [];