wujingjing
2024-11-14 7526074877d63a79b67d881a0f9182610d1989a0
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({
@@ -144,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;