接口返回判断 #748

Merged
Eeeros merged 1 commits from Eeeros/forgeplus-react:feature_sonar into feature_sonar 2024-06-20 11:13:22 +08:00
1 changed files with 11 additions and 7 deletions

View File

@ -60,14 +60,18 @@ function IssueList(props) {
setPageLoading(true)
getActionList(owner, projectsId).then(res => {
setPageLoading(false)
if (res.runs.length === 0) {
setAnalysisStatus(actionStatus.none)
} else {
setAnalysisStatus(res.runs[0].status)
if (res.runs[0].status) {
getData()
getIssueList()
if (res.status === 0) {
if (res.runs.length === 0) {
setAnalysisStatus(actionStatus.none)
} else {
setAnalysisStatus(res.runs[0].status)
if (res.runs[0].status) {
getData()
getIssueList()
}
}
} else {
message.error(res.message)
}
})
}