| | |
| | | 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({ |
| | |
| | | // 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; |