fix: 部分接口请求 noData 判断调整

This commit is contained in:
@changcode
2023-01-17 14:00:41 +08:00
parent 05677d5fb6
commit 38006bd964
6 changed files with 5 additions and 23 deletions

View File

@@ -66,12 +66,8 @@ export default {
get(api.netWorkOverview.ddosEventAnalysis, params).then(res => {
if (res.code === 200) {
this.showError = false
if (res.data.result.length === 0) {
this.isNoData = true
} else {
this.ddosData = res.data.result[0]
this.isNoData = false
}
this.isNoData = res.data.result.length === 0
this.ddosData = res.data.result[0]
} else {
this.isNoData = false
this.showError = true