fix: NpmNetworkQuantity模块去除模拟数据
This commit is contained in:
@@ -126,13 +126,8 @@ export default {
|
|||||||
const packetPercent = get(api.npm.overview.packetRetransPercent, params)
|
const packetPercent = get(api.npm.overview.packetRetransPercent, params)
|
||||||
this.toggleLoading(true)
|
this.toggleLoading(true)
|
||||||
Promise.all([tcp, http, ssl, tcpPercent, packetPercent]).then(res => {
|
Promise.all([tcp, http, ssl, tcpPercent, packetPercent]).then(res => {
|
||||||
// todo 模拟数据,记得删
|
|
||||||
res[0] = {
|
|
||||||
code: 50001,
|
|
||||||
msg: 'jhgfdfghjklkjhg'
|
|
||||||
}
|
|
||||||
this.npmNetworkCycleData = []
|
this.npmNetworkCycleData = []
|
||||||
res.forEach((t, index) => {
|
res.forEach(t => {
|
||||||
if (t.code === 200) {
|
if (t.code === 200) {
|
||||||
this.npmNetworkCycleData.push(t.data.result)
|
this.npmNetworkCycleData.push(t.data.result)
|
||||||
} else {
|
} else {
|
||||||
@@ -145,7 +140,7 @@ export default {
|
|||||||
// 此时e为数组
|
// 此时e为数组
|
||||||
if (e instanceof Array) {
|
if (e instanceof Array) {
|
||||||
this.npmNetworkCycleData = []
|
this.npmNetworkCycleData = []
|
||||||
e.forEach((t) => {
|
e.forEach(t => {
|
||||||
this.npmNetworkCycleData.push(t)
|
this.npmNetworkCycleData.push(t)
|
||||||
})
|
})
|
||||||
this.npmNetworkLastCycleQuery()
|
this.npmNetworkLastCycleQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user