fix: modify
parent
ebc386133f
commit
f01f306449
|
@ -1,4 +1,4 @@
|
||||||
export function appendParamsToUrl(url: string, pathname: string, params: Record<string, string>) {
|
export function appendParamsToUrl(url = '', pathname = '', params: Record<string, string> = {}) {
|
||||||
// 创建一个新的URL对象,在末尾添加 pathname
|
// 创建一个新的URL对象,在末尾添加 pathname
|
||||||
const urlObject = new URL(pathname, url)
|
const urlObject = new URL(pathname, url)
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ export default {
|
||||||
token: getToken(),
|
token: getToken(),
|
||||||
...(this.$route.query || {})
|
...(this.$route.query || {})
|
||||||
}
|
}
|
||||||
const url = appendParamsToUrl(this.url, this.$route.path + this.$route.meta?.pathname, params)
|
const url = appendParamsToUrl(this.url, this.$route.path + (this.$route.meta?.pathname || ''), params)
|
||||||
console.log('iframeUrl: ', url)
|
console.log('iframeUrl: ', url)
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ export default {
|
||||||
token: getToken(),
|
token: getToken(),
|
||||||
...(this.$route.query || {})
|
...(this.$route.query || {})
|
||||||
}
|
}
|
||||||
const url = appendParamsToUrl(this.url, this.$route.path + this.$route.meta?.pathname, params)
|
const url = appendParamsToUrl(this.url, this.$route.path + (this.$route.meta?.pathname || ''), params)
|
||||||
console.log('iframeUrl: ', url)
|
console.log('iframeUrl: ', url)
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue