fix: axios response超时逻辑变更

This commit is contained in:
chenjinsong
2023-08-25 16:23:18 +08:00
parent 26352f1b9c
commit dc6b8e067c
13 changed files with 38 additions and 31 deletions

View File

@@ -67,9 +67,9 @@ export default {
endTime: this.timeFilter && this.timeFilter.endTime ? getSecond(this.timeFilter.endTime) : ''
}
this.toggleLoading(true)
axios.get(api.netWorkOverview.ddosEventAnalysis, { params: params }).then(res => {
res = res.data
if (res.code === 200) {
axios.get(api.netWorkOverview.ddosEventAnalysis, { params: params }).then(response => {
const res = response.data
if (response.status === 200) {
this.showError = false
this.isNoData = res.data.result.length === 0
this.ddosData = res.data.result[0]