fix: iframe 调整
parent
d95dc1ebcc
commit
e6fa0f0848
|
@ -68,8 +68,8 @@ export default {
|
|||
token: getTrxToken()
|
||||
}
|
||||
const url = appendParamsToUrl(item.appAddress, '', params)
|
||||
console.log('跳转应用时完整地址: ', url.toString())
|
||||
window.open(url.toString(), '_blank')
|
||||
console.log('跳转应用时完整地址: ', url)
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -9,10 +9,13 @@ export function appendParamsToUrl(url: string, pathname: string, params: Record<
|
|||
for (const key in params) {
|
||||
searchParams.append(key, params[key])
|
||||
}
|
||||
|
||||
// 设置URL的查询参数
|
||||
urlObject.search = searchParams.toString()
|
||||
|
||||
let result = urlObject.toString()
|
||||
if (result.endsWith('?')) {
|
||||
result += searchParams.toString()
|
||||
} else {
|
||||
result += '?' + searchParams.toString()
|
||||
}
|
||||
// 返回处理后的URL字符串
|
||||
return urlObject.toString()
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue