diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 25f4147cb..44ec7cc13 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -370,10 +370,7 @@ export default { } }).catch((error) => { if (error) { - this.$message.error({ - content: this.$t("tip.refreshLater"),//'Please refesh later',//请稍后刷新 - duration: 3, - }); + this.$message.error(error.toString()); } }); }); diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index 6d720f309..172c147d3 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -458,8 +458,21 @@ this.$store.state.showPanel.id = 0; this.$store.state.showPanel.name = ''; + }else { + if(response.msg){ + this.$message.error(response.msg); + }else if(response.error){ + this.$message.error(response.error); + }else { + this.$message.error(response); + } } - }) + }).catch((error) => { + //console.log('error................'+JSON.stringify(error)); + if (error) { + this.$message.error(error.toString()); + } + }); }, //定期刷新 selectInterval(val) {