From 8e4ecc18726f32d208f9dc7f618926a292bc2fce Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 14 十一月 2024 16:24:46 +0800 Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test --- src/components/amis/AMISRenderer.vue | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/amis/AMISRenderer.vue b/src/components/amis/AMISRenderer.vue index ff4199b..f203bcd 100644 --- a/src/components/amis/AMISRenderer.vue +++ b/src/components/amis/AMISRenderer.vue @@ -12,6 +12,8 @@ import { NO_AUTH_API_LIST } from '/@/api/ai/chat'; import { LOGIN_URL, TEL_LOGIN_URL } from '/@/api/ai/user'; import { Local } from '/@/utils/storage'; +import { isSharePage } from '/@/stores/chatRoom'; + const amisRootRef = ref<HTMLDivElement>(null); const props = defineProps({ @@ -23,6 +25,10 @@ }), }, locals: { + type: Object, + default: () => ({}), + }, + context:{ type: Object, default: () => ({}), }, @@ -67,9 +73,7 @@ }); } -const context = reactive({ - siteName: 'AMIS DEMO', -}); + const current = router.currentRoute.value; const location = { @@ -86,9 +90,9 @@ const updateProps = () => { amisInstance.value?.updateProps({ data: { - ...props.locals, + // ...props.locals, }, - context: context, + context: props.context, ...props.props, }); }; @@ -127,9 +131,9 @@ props.schema, { data: { - ...props.locals, + // ...props.locals, }, - context: context, + context: props.context, location: location, // todo 涓嬪彂 location 瀵硅薄 @@ -142,7 +146,7 @@ // api.context 涓寘鍚彂閫佽姹傚墠鐨勪笂涓嬫枃淇℃伅 // 鑾峰彇鏈湴鐨� token const accessSession = Local.get(accessSessionKey); - if (!NO_AUTH_API_LIST.includes(api.url)) { + if (!NO_AUTH_API_LIST.includes(api.url) && !isSharePage.value) { if (accessSession) { // 灏� token 娣诲姞鍒拌姹傛姤鏂囧ご涓� api.headers['hswatersession'] = accessSession; -- Gitblit v1.9.3