提交 1f10b5d5 authored 作者: lidongxu's avatar lidongxu

test(entry): 测试:积木地址

上级 4b10a703
...@@ -9,13 +9,14 @@ const reportBaseDomain = import.meta.env.VITE_APP_REPORT_URL // 基础域名 ...@@ -9,13 +9,14 @@ const reportBaseDomain = import.meta.env.VITE_APP_REPORT_URL // 基础域名
const reportViewURL = import.meta.env.VITE_APP_REPORT_PREVIEW_URL // 预览 const reportViewURL = import.meta.env.VITE_APP_REPORT_PREVIEW_URL // 预览
const reportEditURL = import.meta.env.VITE_APP_REPORT_EDIT_URL // 新增/编辑 const reportEditURL = import.meta.env.VITE_APP_REPORT_EDIT_URL // 新增/编辑
const route = useRoute() const route = useRoute()
const subUrl = route.fullPath.split('?')[1] const targetUrl = route.fullPath.split('?')[0]
let openUrl = reportBaseDomain const queryStr = route.fullPath.split('?')[1] || ''
let openUrl = targetUrl
// 判断路由上是否包含新建/编辑/预览积木的地址,需要携带 token // 判断路由上是否包含新建/编辑/预览积木的地址,需要携带 token
if (route.fullPath.includes(reportViewURL.substring(1)) || route.fullPath.includes(reportEditURL.substring(1))) { if (route.fullPath.includes(reportViewURL.substring(1)) || route.fullPath.includes(reportEditURL.substring(1))) {
openUrl += `?token=${getToken()}&${subUrl}` openUrl += `?token=${getToken()}&${queryStr}`
} else { } else {
openUrl += `${reportViewURL}?${subUrl}` openUrl += `?${queryStr}`
} }
console.log(openUrl) console.log(openUrl)
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论