diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 9c54abb8..8ec8f4d0 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -819,7 +819,8 @@ "platform_disable": "{0} settings are not enabled!", "input_account": "Please enter account", "redirect_2_auth": "Redirecting to {0} authentication, {1} seconds...", - "redirect_immediately": "Redirecting immediately" + "redirect_immediately": "Redirecting immediately", + "permission_invalid": "Authentication invalid [Current account has insufficient permissions]" }, "supplier": { "alibaba_cloud_bailian": "Alibaba Cloud Bailian", diff --git a/frontend/src/i18n/ko-KR.json b/frontend/src/i18n/ko-KR.json index f1a9647f..b3e7c2ff 100644 --- a/frontend/src/i18n/ko-KR.json +++ b/frontend/src/i18n/ko-KR.json @@ -819,7 +819,8 @@ "platform_disable": "{0} 설정이 활성화되지 않았습니다!", "input_account": "계정을 입력해 주세요", "redirect_2_auth": "{0} 인증으로 리디렉션 중입니다, {1}초...", - "redirect_immediately": "지금 이동" + "redirect_immediately": "지금 이동", + "permission_invalid": "인증 무효 [현재 계정의 권한이 부족합니다]" }, "supplier": { "alibaba_cloud_bailian": "알리바바 클라우드 바이리엔", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index c8d839ae..6efe4856 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -819,7 +819,8 @@ "platform_disable": "{0}设置未开启!", "input_account": "请输入账号", "redirect_2_auth": "正在跳转至 {0} 认证,{1} 秒...", - "redirect_immediately": "立即跳转" + "redirect_immediately": "立即跳转", + "permission_invalid": "认证无效【当前账号权限不够】" }, "supplier": { "alibaba_cloud_bailian": "阿里云百炼", diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 6392920d..f7b8d38d 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -16,6 +16,7 @@ import SystemEmbedded from '@/views/system/embedded/Page.vue' import assistantTest from '@/views/system/embedded/Test.vue' import assistant from '@/views/embedded/index.vue' import EmbeddedPage from '@/views/embedded/page.vue' +import EmbeddedCommon from '@/views/embedded/common.vue' import Member from '@/views/system/member/index.vue' import Professional from '@/views/system/professional/index.vue' import Training from '@/views/system/training/index.vue' @@ -251,6 +252,11 @@ export const routes = [ name: 'embeddedPage', component: EmbeddedPage, }, + { + path: '/embeddedCommon', + name: 'embeddedCommon', + component: EmbeddedCommon, + }, { path: '/assistantTest', name: 'assistantTest', diff --git a/frontend/src/router/watch.ts b/frontend/src/router/watch.ts index aa8f06e4..524ec576 100644 --- a/frontend/src/router/watch.ts +++ b/frontend/src/router/watch.ts @@ -11,7 +11,7 @@ const appearanceStore = useAppearanceStoreWithOut() const userStore = useUserStore() const { wsCache } = useCache() const whiteList = ['/login', '/admin-login'] -const assistantWhiteList = ['/assistant', '/embeddedPage', '/401'] +const assistantWhiteList = ['/assistant', '/embeddedPage', '/embeddedCommon', '/401'] export const watchRouter = (router: Router) => { router.beforeEach(async (to: any, from: any, next: any) => { await loadXpackStatic() diff --git a/frontend/src/views/embedded/common.vue b/frontend/src/views/embedded/common.vue new file mode 100644 index 00000000..ea825037 --- /dev/null +++ b/frontend/src/views/embedded/common.vue @@ -0,0 +1,111 @@ + + + + diff --git a/frontend/src/views/embedded/page.vue b/frontend/src/views/embedded/page.vue index bd8202fb..619a07bf 100644 --- a/frontend/src/views/embedded/page.vue +++ b/frontend/src/views/embedded/page.vue @@ -24,7 +24,8 @@ import { useAppearanceStoreWithOut } from '@/stores/appearance' import { useI18n } from 'vue-i18n' import { request } from '@/utils/request' import { setCurrentColor } from '@/utils/utils' - +import { useUserStore } from '@/stores/user' +const userStore = useUserStore() const { t } = useI18n() const chatRef = ref() const appearanceStore = useAppearanceStoreWithOut() @@ -64,6 +65,7 @@ const communicationCb = async (event: any) => { if (type === 4) { assistantStore.setToken(certificate) assistantStore.setAssistant(true) + await userStore.info() loading.value = false return }