fix: 修复 npm下钻tab为 Client Cities和Server Cities时,接口请求参数错误问题

This commit is contained in:
@changcode
2022-11-16 11:55:11 +08:00
parent 45c318b391
commit 8416060fc4
3 changed files with 17 additions and 0 deletions

View File

@@ -81,6 +81,10 @@ export default {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'`
} else if (type === 'clientCity') {
params.q = `client_city='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverCity') {
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'`
} else {
params.q = condition
}
@@ -103,6 +107,7 @@ export default {
if (type && condition) {
this.toggleLoading(true)
get(api.npm.overview.networkAnalysis, params).then(res => {
console.log(res)
if (res.code === 200) {
this.npmNetworkCycleData = res.data.result
}
@@ -153,6 +158,10 @@ export default {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverIp') {
params.q = `ip='${condition.split(/'(.*?)'/)[1]}' and side='server'`
} else if (type === 'clientCity') {
params.q = `client_city='${condition.split(/'(.*?)'/)[1]}' and side='client'`
} else if (type === 'serverCity') {
params.q = `server_city='${condition.split(/'(.*?)'/)[1]}' and side='server'`
} else {
params.q = condition
}