11wqe1 1 周之前
父節點
當前提交
37d44d8fce
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/common/axios.config.js

+ 3 - 0
src/common/axios.config.js

@@ -26,6 +26,9 @@ axios.interceptors.request.use((config) => {
     // } else if (config.method === 'post') {
     //     config.data = qs.stringify(config.data)//序列化post 参数
     // }
+    if (config.url.includes('getUser') || config.url.includes('selectUser')) {
+        config.withCredentials = true
+    }
     if (config.url.includes('knowledge-base') || config.url === 'https://gpt.cocorobo.cn/search_image' || config.url === 'https://gpt.cocorobo.cn/chat' || config.url === 'https://gpt4.cocorobo.cn/create_free_assistants' || config.url === 'https://gpt4.cocorobo.cn/assistants_completion_response') {
         config.data = config.data//序列化post 参数
     } else if (config.url.indexOf('http://localhost:7004') != -1 || config.url.indexOf('https://r2rserver.cocorobo.cn') != -1) {