diff --git a/frontend/index.html b/frontend/index.html
index eea14bc38..a07356c3f 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -6,7 +6,6 @@
-
权限中心 | 蓝鲸智云
diff --git a/frontend/src/common/util.js b/frontend/src/common/util.js
index 873fdf058..7c979018c 100644
--- a/frontend/src/common/util.js
+++ b/frontend/src/common/util.js
@@ -827,5 +827,5 @@ export function getCopyValue (value) {
*/
export const getRoutePath = (subPath) => {
const path = subPath.startsWith('/') ? subPath.slice(1) : subPath;
- return rootPath ? `${rootPath}${path}` : path;
+ return rootPath ? `${rootPath}${path}` : subPath;
};
diff --git a/frontend/src/router/ce.js b/frontend/src/router/ce.js
index 54413d7cd..87118155f 100644
--- a/frontend/src/router/ce.js
+++ b/frontend/src/router/ce.js
@@ -25,7 +25,6 @@
*/
import il8n from '@/language';
-import { rootPath } from '@blueking/sub-saas/dist/main.js';
import { getRoutePath } from '@/common/util';
// const SITE_URL = window.SITE_URL;
@@ -210,9 +209,11 @@ const NotFound = () => import(/* webpackChunkName: 'none' */ '../views/404');
// Main
const MainEntry = () => import(/* webpackChunkName: 'index' */ '../views');
+const SITE_URL = getRoutePath(window.SITE_URL);
+
export const routes = [
{
- path: rootPath,
+ path: SITE_URL,
name: 'iamMain',
component: MainEntry,
children: [
diff --git a/frontend/src/router/ee.js b/frontend/src/router/ee.js
index 4b5c4a988..cf90171ee 100644
--- a/frontend/src/router/ee.js
+++ b/frontend/src/router/ee.js
@@ -25,7 +25,6 @@
*/
import il8n from '@/language';
-import { rootPath } from '@blueking/sub-saas/dist/main.js';
import { getRoutePath } from '@/common/util';
// 系统接入
@@ -208,9 +207,11 @@ const NotFound = () => import(/* webpackChunkName: 'none' */ '../views/404');
// Main
const MainEntry = () => import(/* webpackChunkName: 'index' */ '../views');
+const SITE_URL = getRoutePath(window.SITE_URL);
+
export const routes = [
{
- path: rootPath,
+ path: SITE_URL,
name: 'iamMain',
component: MainEntry,
children: [
diff --git a/frontend/src/router/ieod.js b/frontend/src/router/ieod.js
index 6649378ef..016bc69dc 100644
--- a/frontend/src/router/ieod.js
+++ b/frontend/src/router/ieod.js
@@ -25,7 +25,6 @@
*/
import il8n from '@/language';
-import { rootPath } from '@blueking/sub-saas/dist/main.js';
import { getRoutePath } from '@/common/util';
// 系统接入
@@ -208,10 +207,13 @@ const NotFound = () => import(/* webpackChunkName: 'none' */ '../views/404');
// Main
const MainEntry = () => import(/* webpackChunkName: 'index' */ '../views');
+// 兼容容器化部署外部环境非根路径的path
+const SITE_URL = getRoutePath(window.SITE_URL);
+
export const routes = [
{
// path: window.SITE_URL,
- path: rootPath,
+ path: SITE_URL,
name: 'iamMain',
component: MainEntry,
children: [