Merge branch 'dev-3.7' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.8

This commit is contained in:
zhangyu
2023-05-26 09:37:34 +08:00

View File

@@ -345,7 +345,14 @@ export default {
let str = '' let str = ''
if (!lodash.isEmpty(params)) { if (!lodash.isEmpty(params)) {
for (const key in params) { for (const key in params) {
str += key + '=' + params[key] + '&' const arr = params[key]
if (arr.length > 1) {
arr.forEach(item => {
str += key + '=' + item + '&'
})
} else {
str += key + '=' + params[key][0] + '&'
}
} }
} }
const linkTarget = `${protocol}://${host}:${port + metricsPath}${str ? '?' + str.slice(0, str.length - 1) : ''}` const linkTarget = `${protocol}://${host}:${port + metricsPath}${str ? '?' + str.slice(0, str.length - 1) : ''}`