RuoYi лет назад: 5
Родитель
Сommit
7bd762267b

+ 7 - 11
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index-tree.vue.vm

@@ -420,19 +420,15 @@ export default {
420
 #end
420
 #end
421
           if (this.form.${pkColumn.javaField} != null) {
421
           if (this.form.${pkColumn.javaField} != null) {
422
             update${BusinessName}(this.form).then(response => {
422
             update${BusinessName}(this.form).then(response => {
423
-              if (response.code === 200) {
424
-                this.msgSuccess("修改成功");
425
-                this.open = false;
426
-                this.getList();
427
-              }
423
+              this.msgSuccess("修改成功");
424
+              this.open = false;
425
+              this.getList();
428
             });
426
             });
429
           } else {
427
           } else {
430
             add${BusinessName}(this.form).then(response => {
428
             add${BusinessName}(this.form).then(response => {
431
-              if (response.code === 200) {
432
-                this.msgSuccess("新增成功");
433
-                this.open = false;
434
-                this.getList();
435
-              }
429
+              this.msgSuccess("新增成功");
430
+              this.open = false;
431
+              this.getList();
436
             });
432
             });
437
           }
433
           }
438
         }
434
         }
@@ -449,7 +445,7 @@ export default {
449
         }).then(() => {
445
         }).then(() => {
450
           this.getList();
446
           this.getList();
451
           this.msgSuccess("删除成功");
447
           this.msgSuccess("删除成功");
452
-        }).catch(function() {});
448
+        })
453
     }
449
     }
454
   }
450
   }
455
 };
451
 };

+ 7 - 11
ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm

@@ -436,19 +436,15 @@ export default {
436
 #end
436
 #end
437
           if (this.form.${pkColumn.javaField} != null) {
437
           if (this.form.${pkColumn.javaField} != null) {
438
             update${BusinessName}(this.form).then(response => {
438
             update${BusinessName}(this.form).then(response => {
439
-              if (response.code === 200) {
440
-                this.msgSuccess("修改成功");
441
-                this.open = false;
442
-                this.getList();
443
-              }
439
+              this.msgSuccess("修改成功");
440
+              this.open = false;
441
+              this.getList();
444
             });
442
             });
445
           } else {
443
           } else {
446
             add${BusinessName}(this.form).then(response => {
444
             add${BusinessName}(this.form).then(response => {
447
-              if (response.code === 200) {
448
-                this.msgSuccess("新增成功");
449
-                this.open = false;
450
-                this.getList();
451
-              }
445
+              this.msgSuccess("新增成功");
446
+              this.open = false;
447
+              this.getList();
452
             });
448
             });
453
           }
449
           }
454
         }
450
         }
@@ -466,7 +462,7 @@ export default {
466
         }).then(() => {
462
         }).then(() => {
467
           this.getList();
463
           this.getList();
468
           this.msgSuccess("删除成功");
464
           this.msgSuccess("删除成功");
469
-        }).catch(function() {});
465
+        })
470
     },
466
     },
471
     /** 导出按钮操作 */
467
     /** 导出按钮操作 */
472
     handleExport() {
468
     handleExport() {

+ 8 - 12
ruoyi-ui/src/views/monitor/job/index.vue

@@ -402,7 +402,7 @@ export default {
402
           return runJob(row.jobId, row.jobGroup);
402
           return runJob(row.jobId, row.jobGroup);
403
         }).then(() => {
403
         }).then(() => {
404
           this.msgSuccess("执行成功");
404
           this.msgSuccess("执行成功");
405
-        }).catch(function() {});
405
+        })
406
     },
406
     },
407
     /** 任务详细信息 */
407
     /** 任务详细信息 */
408
     handleView(row) {
408
     handleView(row) {
@@ -437,19 +437,15 @@ export default {
437
         if (valid) {
437
         if (valid) {
438
           if (this.form.jobId != undefined) {
438
           if (this.form.jobId != undefined) {
439
             updateJob(this.form).then(response => {
439
             updateJob(this.form).then(response => {
440
-              if (response.code === 200) {
441
-                this.msgSuccess("修改成功");
442
-                this.open = false;
443
-                this.getList();
444
-              }
440
+              this.msgSuccess("修改成功");
441
+              this.open = false;
442
+              this.getList();
445
             });
443
             });
446
           } else {
444
           } else {
447
             addJob(this.form).then(response => {
445
             addJob(this.form).then(response => {
448
-              if (response.code === 200) {
449
-                this.msgSuccess("新增成功");
450
-                this.open = false;
451
-                this.getList();
452
-              }
446
+              this.msgSuccess("新增成功");
447
+              this.open = false;
448
+              this.getList();
453
             });
449
             });
454
           }
450
           }
455
         }
451
         }
@@ -467,7 +463,7 @@ export default {
467
         }).then(() => {
463
         }).then(() => {
468
           this.getList();
464
           this.getList();
469
           this.msgSuccess("删除成功");
465
           this.msgSuccess("删除成功");
470
-        }).catch(function() {});
466
+        })
471
     },
467
     },
472
     /** 导出按钮操作 */
468
     /** 导出按钮操作 */
473
     handleExport() {
469
     handleExport() {

+ 2 - 2
ruoyi-ui/src/views/monitor/job/log.vue

@@ -263,7 +263,7 @@ export default {
263
         }).then(() => {
263
         }).then(() => {
264
           this.getList();
264
           this.getList();
265
           this.msgSuccess("删除成功");
265
           this.msgSuccess("删除成功");
266
-        }).catch(function() {});
266
+        })
267
     },
267
     },
268
     /** 清空按钮操作 */
268
     /** 清空按钮操作 */
269
     handleClean() {
269
     handleClean() {
@@ -276,7 +276,7 @@ export default {
276
         }).then(() => {
276
         }).then(() => {
277
           this.getList();
277
           this.getList();
278
           this.msgSuccess("清空成功");
278
           this.msgSuccess("清空成功");
279
-        }).catch(function() {});
279
+        })
280
     },
280
     },
281
     /** 导出按钮操作 */
281
     /** 导出按钮操作 */
282
     handleExport() {
282
     handleExport() {

+ 1 - 1
ruoyi-ui/src/views/monitor/online/index.vue

@@ -116,7 +116,7 @@ export default {
116
         }).then(() => {
116
         }).then(() => {
117
           this.getList();
117
           this.getList();
118
           this.msgSuccess("强退成功");
118
           this.msgSuccess("强退成功");
119
-        }).catch(function() {});
119
+        })
120
     }
120
     }
121
   }
121
   }
122
 };
122
 };

+ 8 - 16
ruoyi-ui/src/views/system/config/index.vue

@@ -304,19 +304,15 @@ export default {
304
         if (valid) {
304
         if (valid) {
305
           if (this.form.configId != undefined) {
305
           if (this.form.configId != undefined) {
306
             updateConfig(this.form).then(response => {
306
             updateConfig(this.form).then(response => {
307
-              if (response.code === 200) {
308
-                this.msgSuccess("修改成功");
309
-                this.open = false;
310
-                this.getList();
311
-              }
307
+              this.msgSuccess("修改成功");
308
+              this.open = false;
309
+              this.getList();
312
             });
310
             });
313
           } else {
311
           } else {
314
             addConfig(this.form).then(response => {
312
             addConfig(this.form).then(response => {
315
-              if (response.code === 200) {
316
-                this.msgSuccess("新增成功");
317
-                this.open = false;
318
-                this.getList();
319
-              }
313
+              this.msgSuccess("新增成功");
314
+              this.open = false;
315
+              this.getList();
320
             });
316
             });
321
           }
317
           }
322
         }
318
         }
@@ -334,7 +330,7 @@ export default {
334
         }).then(() => {
330
         }).then(() => {
335
           this.getList();
331
           this.getList();
336
           this.msgSuccess("删除成功");
332
           this.msgSuccess("删除成功");
337
-        }).catch(function() {});
333
+        })
338
     },
334
     },
339
     /** 导出按钮操作 */
335
     /** 导出按钮操作 */
340
     handleExport() {
336
     handleExport() {
@@ -345,11 +341,7 @@ export default {
345
     /** 清理缓存按钮操作 */
341
     /** 清理缓存按钮操作 */
346
     handleClearCache() {
342
     handleClearCache() {
347
       clearCache().then(response => {
343
       clearCache().then(response => {
348
-        if (response.code === 200) {
349
-          this.msgSuccess("清理成功");
350
-        } else {
351
-          this.msgError(response.msg);
352
-        }
344
+        this.msgSuccess("清理成功");
353
       });
345
       });
354
     }
346
     }
355
   }
347
   }

+ 7 - 11
ruoyi-ui/src/views/system/dept/index.vue

@@ -284,19 +284,15 @@ export default {
284
         if (valid) {
284
         if (valid) {
285
           if (this.form.deptId != undefined) {
285
           if (this.form.deptId != undefined) {
286
             updateDept(this.form).then(response => {
286
             updateDept(this.form).then(response => {
287
-              if (response.code === 200) {
288
-                this.msgSuccess("修改成功");
289
-                this.open = false;
290
-                this.getList();
291
-              }
287
+              this.msgSuccess("修改成功");
288
+              this.open = false;
289
+              this.getList();
292
             });
290
             });
293
           } else {
291
           } else {
294
             addDept(this.form).then(response => {
292
             addDept(this.form).then(response => {
295
-              if (response.code === 200) {
296
-                this.msgSuccess("新增成功");
297
-                this.open = false;
298
-                this.getList();
299
-              }
293
+              this.msgSuccess("新增成功");
294
+              this.open = false;
295
+              this.getList();
300
             });
296
             });
301
           }
297
           }
302
         }
298
         }
@@ -313,7 +309,7 @@ export default {
313
         }).then(() => {
309
         }).then(() => {
314
           this.getList();
310
           this.getList();
315
           this.msgSuccess("删除成功");
311
           this.msgSuccess("删除成功");
316
-        }).catch(function() {});
312
+        })
317
     }
313
     }
318
   }
314
   }
319
 };
315
 };

+ 7 - 11
ruoyi-ui/src/views/system/dict/data.vue

@@ -304,19 +304,15 @@ export default {
304
         if (valid) {
304
         if (valid) {
305
           if (this.form.dictCode != undefined) {
305
           if (this.form.dictCode != undefined) {
306
             updateData(this.form).then(response => {
306
             updateData(this.form).then(response => {
307
-              if (response.code === 200) {
308
-                this.msgSuccess("修改成功");
309
-                this.open = false;
310
-                this.getList();
311
-              }
307
+              this.msgSuccess("修改成功");
308
+              this.open = false;
309
+              this.getList();
312
             });
310
             });
313
           } else {
311
           } else {
314
             addData(this.form).then(response => {
312
             addData(this.form).then(response => {
315
-              if (response.code === 200) {
316
-                this.msgSuccess("新增成功");
317
-                this.open = false;
318
-                this.getList();
319
-              }
313
+              this.msgSuccess("新增成功");
314
+              this.open = false;
315
+              this.getList();
320
             });
316
             });
321
           }
317
           }
322
         }
318
         }
@@ -334,7 +330,7 @@ export default {
334
         }).then(() => {
330
         }).then(() => {
335
           this.getList();
331
           this.getList();
336
           this.msgSuccess("删除成功");
332
           this.msgSuccess("删除成功");
337
-        }).catch(function() {});
333
+        })
338
     },
334
     },
339
     /** 导出按钮操作 */
335
     /** 导出按钮操作 */
340
     handleExport() {
336
     handleExport() {

+ 8 - 16
ruoyi-ui/src/views/system/dict/index.vue

@@ -308,19 +308,15 @@ export default {
308
         if (valid) {
308
         if (valid) {
309
           if (this.form.dictId != undefined) {
309
           if (this.form.dictId != undefined) {
310
             updateType(this.form).then(response => {
310
             updateType(this.form).then(response => {
311
-              if (response.code === 200) {
312
-                this.msgSuccess("修改成功");
313
-                this.open = false;
314
-                this.getList();
315
-              }
311
+              this.msgSuccess("修改成功");
312
+              this.open = false;
313
+              this.getList();
316
             });
314
             });
317
           } else {
315
           } else {
318
             addType(this.form).then(response => {
316
             addType(this.form).then(response => {
319
-              if (response.code === 200) {
320
-                this.msgSuccess("新增成功");
321
-                this.open = false;
322
-                this.getList();
323
-              }
317
+              this.msgSuccess("新增成功");
318
+              this.open = false;
319
+              this.getList();
324
             });
320
             });
325
           }
321
           }
326
         }
322
         }
@@ -338,7 +334,7 @@ export default {
338
         }).then(() => {
334
         }).then(() => {
339
           this.getList();
335
           this.getList();
340
           this.msgSuccess("删除成功");
336
           this.msgSuccess("删除成功");
341
-        }).catch(function() {});
337
+        })
342
     },
338
     },
343
     /** 导出按钮操作 */
339
     /** 导出按钮操作 */
344
     handleExport() {
340
     handleExport() {
@@ -349,11 +345,7 @@ export default {
349
     /** 清理缓存按钮操作 */
345
     /** 清理缓存按钮操作 */
350
     handleClearCache() {
346
     handleClearCache() {
351
       clearCache().then(response => {
347
       clearCache().then(response => {
352
-        if (response.code === 200) {
353
-          this.msgSuccess("清理成功");
354
-        } else {
355
-          this.msgError(response.msg);
356
-        }
348
+        this.msgSuccess("清理成功");
357
       });
349
       });
358
     }
350
     }
359
   }
351
   }

+ 2 - 2
ruoyi-ui/src/views/system/logininfor/index.vue

@@ -193,7 +193,7 @@ export default {
193
         }).then(() => {
193
         }).then(() => {
194
           this.getList();
194
           this.getList();
195
           this.msgSuccess("删除成功");
195
           this.msgSuccess("删除成功");
196
-        }).catch(function() {});
196
+        })
197
     },
197
     },
198
     /** 清空按钮操作 */
198
     /** 清空按钮操作 */
199
     handleClean() {
199
     handleClean() {
@@ -206,7 +206,7 @@ export default {
206
         }).then(() => {
206
         }).then(() => {
207
           this.getList();
207
           this.getList();
208
           this.msgSuccess("清空成功");
208
           this.msgSuccess("清空成功");
209
-        }).catch(function() {});
209
+        })
210
     },
210
     },
211
     /** 导出按钮操作 */
211
     /** 导出按钮操作 */
212
     handleExport() {
212
     handleExport() {

+ 7 - 11
ruoyi-ui/src/views/system/menu/index.vue

@@ -367,19 +367,15 @@ export default {
367
         if (valid) {
367
         if (valid) {
368
           if (this.form.menuId != undefined) {
368
           if (this.form.menuId != undefined) {
369
             updateMenu(this.form).then(response => {
369
             updateMenu(this.form).then(response => {
370
-              if (response.code === 200) {
371
-                this.msgSuccess("修改成功");
372
-                this.open = false;
373
-                this.getList();
374
-              }
370
+              this.msgSuccess("修改成功");
371
+              this.open = false;
372
+              this.getList();
375
             });
373
             });
376
           } else {
374
           } else {
377
             addMenu(this.form).then(response => {
375
             addMenu(this.form).then(response => {
378
-              if (response.code === 200) {
379
-                this.msgSuccess("新增成功");
380
-                this.open = false;
381
-                this.getList();
382
-              }
376
+              this.msgSuccess("新增成功");
377
+              this.open = false;
378
+              this.getList();
383
             });
379
             });
384
           }
380
           }
385
         }
381
         }
@@ -396,7 +392,7 @@ export default {
396
         }).then(() => {
392
         }).then(() => {
397
           this.getList();
393
           this.getList();
398
           this.msgSuccess("删除成功");
394
           this.msgSuccess("删除成功");
399
-        }).catch(function() {});
395
+        })
400
     }
396
     }
401
   }
397
   }
402
 };
398
 };

+ 7 - 11
ruoyi-ui/src/views/system/notice/index.vue

@@ -307,19 +307,15 @@ export default {
307
         if (valid) {
307
         if (valid) {
308
           if (this.form.noticeId != undefined) {
308
           if (this.form.noticeId != undefined) {
309
             updateNotice(this.form).then(response => {
309
             updateNotice(this.form).then(response => {
310
-              if (response.code === 200) {
311
-                this.msgSuccess("修改成功");
312
-                this.open = false;
313
-                this.getList();
314
-              }
310
+              this.msgSuccess("修改成功");
311
+              this.open = false;
312
+              this.getList();
315
             });
313
             });
316
           } else {
314
           } else {
317
             addNotice(this.form).then(response => {
315
             addNotice(this.form).then(response => {
318
-              if (response.code === 200) {
319
-                this.msgSuccess("新增成功");
320
-                this.open = false;
321
-                this.getList();
322
-              }
316
+              this.msgSuccess("新增成功");
317
+              this.open = false;
318
+              this.getList();
323
             });
319
             });
324
           }
320
           }
325
         }
321
         }
@@ -337,7 +333,7 @@ export default {
337
         }).then(() => {
333
         }).then(() => {
338
           this.getList();
334
           this.getList();
339
           this.msgSuccess("删除成功");
335
           this.msgSuccess("删除成功");
340
-        }).catch(function() {});
336
+        })
341
     }
337
     }
342
   }
338
   }
343
 };
339
 };

+ 2 - 2
ruoyi-ui/src/views/system/operlog/index.vue

@@ -283,7 +283,7 @@ export default {
283
         }).then(() => {
283
         }).then(() => {
284
           this.getList();
284
           this.getList();
285
           this.msgSuccess("删除成功");
285
           this.msgSuccess("删除成功");
286
-        }).catch(function() {});
286
+        })
287
     },
287
     },
288
     /** 清空按钮操作 */
288
     /** 清空按钮操作 */
289
     handleClean() {
289
     handleClean() {
@@ -296,7 +296,7 @@ export default {
296
         }).then(() => {
296
         }).then(() => {
297
           this.getList();
297
           this.getList();
298
           this.msgSuccess("清空成功");
298
           this.msgSuccess("清空成功");
299
-        }).catch(function() {});
299
+        })
300
     },
300
     },
301
     /** 导出按钮操作 */
301
     /** 导出按钮操作 */
302
     handleExport() {
302
     handleExport() {

+ 7 - 11
ruoyi-ui/src/views/system/post/index.vue

@@ -276,19 +276,15 @@ export default {
276
         if (valid) {
276
         if (valid) {
277
           if (this.form.postId != undefined) {
277
           if (this.form.postId != undefined) {
278
             updatePost(this.form).then(response => {
278
             updatePost(this.form).then(response => {
279
-              if (response.code === 200) {
280
-                this.msgSuccess("修改成功");
281
-                this.open = false;
282
-                this.getList();
283
-              }
279
+              this.msgSuccess("修改成功");
280
+              this.open = false;
281
+              this.getList();
284
             });
282
             });
285
           } else {
283
           } else {
286
             addPost(this.form).then(response => {
284
             addPost(this.form).then(response => {
287
-              if (response.code === 200) {
288
-                this.msgSuccess("新增成功");
289
-                this.open = false;
290
-                this.getList();
291
-              }
285
+              this.msgSuccess("新增成功");
286
+              this.open = false;
287
+              this.getList();
292
             });
288
             });
293
           }
289
           }
294
         }
290
         }
@@ -306,7 +302,7 @@ export default {
306
         }).then(() => {
302
         }).then(() => {
307
           this.getList();
303
           this.getList();
308
           this.msgSuccess("删除成功");
304
           this.msgSuccess("删除成功");
309
-        }).catch(function() {});
305
+        })
310
     },
306
     },
311
     /** 导出按钮操作 */
307
     /** 导出按钮操作 */
312
     handleExport() {
308
     handleExport() {

+ 10 - 16
ruoyi-ui/src/views/system/role/index.vue

@@ -537,20 +537,16 @@ export default {
537
           if (this.form.roleId != undefined) {
537
           if (this.form.roleId != undefined) {
538
             this.form.menuIds = this.getMenuAllCheckedKeys();
538
             this.form.menuIds = this.getMenuAllCheckedKeys();
539
             updateRole(this.form).then(response => {
539
             updateRole(this.form).then(response => {
540
-              if (response.code === 200) {
541
-                this.msgSuccess("修改成功");
542
-                this.open = false;
543
-                this.getList();
544
-              }
540
+              this.msgSuccess("修改成功");
541
+              this.open = false;
542
+              this.getList();
545
             });
543
             });
546
           } else {
544
           } else {
547
             this.form.menuIds = this.getMenuAllCheckedKeys();
545
             this.form.menuIds = this.getMenuAllCheckedKeys();
548
             addRole(this.form).then(response => {
546
             addRole(this.form).then(response => {
549
-              if (response.code === 200) {
550
-                this.msgSuccess("新增成功");
551
-                this.open = false;
552
-                this.getList();
553
-              }
547
+              this.msgSuccess("新增成功");
548
+              this.open = false;
549
+              this.getList();
554
             });
550
             });
555
           }
551
           }
556
         }
552
         }
@@ -561,11 +557,9 @@ export default {
561
       if (this.form.roleId != undefined) {
557
       if (this.form.roleId != undefined) {
562
         this.form.deptIds = this.getDeptAllCheckedKeys();
558
         this.form.deptIds = this.getDeptAllCheckedKeys();
563
         dataScope(this.form).then(response => {
559
         dataScope(this.form).then(response => {
564
-          if (response.code === 200) {
565
-            this.msgSuccess("修改成功");
566
-            this.openDataScope = false;
567
-            this.getList();
568
-          }
560
+          this.msgSuccess("修改成功");
561
+          this.openDataScope = false;
562
+          this.getList();
569
         });
563
         });
570
       }
564
       }
571
     },
565
     },
@@ -581,7 +575,7 @@ export default {
581
         }).then(() => {
575
         }).then(() => {
582
           this.getList();
576
           this.getList();
583
           this.msgSuccess("删除成功");
577
           this.msgSuccess("删除成功");
584
-        }).catch(function() {});
578
+        })
585
     },
579
     },
586
     /** 导出按钮操作 */
580
     /** 导出按钮操作 */
587
     handleExport() {
581
     handleExport() {

+ 8 - 14
ruoyi-ui/src/views/system/user/index.vue

@@ -582,9 +582,7 @@ export default {
582
         cancelButtonText: "取消"
582
         cancelButtonText: "取消"
583
       }).then(({ value }) => {
583
       }).then(({ value }) => {
584
           resetUserPwd(row.userId, value).then(response => {
584
           resetUserPwd(row.userId, value).then(response => {
585
-            if (response.code === 200) {
586
-              this.msgSuccess("修改成功,新密码是:" + value);
587
-            }
585
+            this.msgSuccess("修改成功,新密码是:" + value);
588
           });
586
           });
589
         }).catch(() => {});
587
         }).catch(() => {});
590
     },
588
     },
@@ -594,19 +592,15 @@ export default {
594
         if (valid) {
592
         if (valid) {
595
           if (this.form.userId != undefined) {
593
           if (this.form.userId != undefined) {
596
             updateUser(this.form).then(response => {
594
             updateUser(this.form).then(response => {
597
-              if (response.code === 200) {
598
-                this.msgSuccess("修改成功");
599
-                this.open = false;
600
-                this.getList();
601
-              }
595
+              this.msgSuccess("修改成功");
596
+              this.open = false;
597
+              this.getList();
602
             });
598
             });
603
           } else {
599
           } else {
604
             addUser(this.form).then(response => {
600
             addUser(this.form).then(response => {
605
-              if (response.code === 200) {
606
-                this.msgSuccess("新增成功");
607
-                this.open = false;
608
-                this.getList();
609
-              }
601
+              this.msgSuccess("新增成功");
602
+              this.open = false;
603
+              this.getList();
610
             });
604
             });
611
           }
605
           }
612
         }
606
         }
@@ -624,7 +618,7 @@ export default {
624
         }).then(() => {
618
         }).then(() => {
625
           this.getList();
619
           this.getList();
626
           this.msgSuccess("删除成功");
620
           this.msgSuccess("删除成功");
627
-        }).catch(function() {});
621
+        })
628
     },
622
     },
629
     /** 导出按钮操作 */
623
     /** 导出按钮操作 */
630
     handleExport() {
624
     handleExport() {

+ 1 - 3
ruoyi-ui/src/views/system/user/profile/resetPwd.vue

@@ -57,9 +57,7 @@ export default {
57
         if (valid) {
57
         if (valid) {
58
           updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
58
           updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
59
             response => {
59
             response => {
60
-              if (response.code === 200) {
61
-                this.msgSuccess("修改成功");
62
-              }
60
+              this.msgSuccess("修改成功");
63
             }
61
             }
64
           );
62
           );
65
         }
63
         }

+ 4 - 6
ruoyi-ui/src/views/system/user/profile/userAvatar.vue

@@ -125,12 +125,10 @@ export default {
125
         let formData = new FormData();
125
         let formData = new FormData();
126
         formData.append("avatarfile", data);
126
         formData.append("avatarfile", data);
127
         uploadAvatar(formData).then(response => {
127
         uploadAvatar(formData).then(response => {
128
-          if (response.code === 200) {
129
-            this.open = false;
130
-            this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
131
-            store.commit('SET_AVATAR', this.options.img);
132
-            this.msgSuccess("修改成功");
133
-          }
128
+          this.open = false;
129
+          this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
130
+          store.commit('SET_AVATAR', this.options.img);
131
+          this.msgSuccess("修改成功");
134
           this.visible = false;
132
           this.visible = false;
135
         });
133
         });
136
       });
134
       });

+ 1 - 3
ruoyi-ui/src/views/system/user/profile/userInfo.vue

@@ -62,9 +62,7 @@ export default {
62
       this.$refs["form"].validate(valid => {
62
       this.$refs["form"].validate(valid => {
63
         if (valid) {
63
         if (valid) {
64
           updateUserProfile(this.user).then(response => {
64
           updateUserProfile(this.user).then(response => {
65
-            if (response.code === 200) {
66
-              this.msgSuccess("修改成功");
67
-            }
65
+            this.msgSuccess("修改成功");
68
           });
66
           });
69
         }
67
         }
70
       });
68
       });

+ 2 - 2
ruoyi-ui/src/views/tool/gen/index.vue

@@ -270,7 +270,7 @@ export default {
270
           return synchDb(tableName);
270
           return synchDb(tableName);
271
       }).then(() => {
271
       }).then(() => {
272
           this.msgSuccess("同步成功");
272
           this.msgSuccess("同步成功");
273
-      }).catch(function() {});
273
+      })
274
     },
274
     },
275
     /** 打开导入表弹窗 */
275
     /** 打开导入表弹窗 */
276
     openImportTable() {
276
     openImportTable() {
@@ -313,7 +313,7 @@ export default {
313
       }).then(() => {
313
       }).then(() => {
314
           this.getList();
314
           this.getList();
315
           this.msgSuccess("删除成功");
315
           this.msgSuccess("删除成功");
316
-      }).catch(function() {});
316
+      })
317
     }
317
     }
318
   }
318
   }
319
 };
319
 };