提交 8629493c authored 作者: lidongxu's avatar lidongxu

test(entry): 测试:积木报表新增编辑预览添加路径

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