Ver Fonte

接口超时时间设置为600秒、AI问答超时给提示

jwyu há 11 meses atrás
pai
commit
4d82f96b42
2 ficheiros alterados com 6 adições e 2 exclusões
  1. 2 2
      src/api/http.js
  2. 4 0
      src/views/operation_manage/AIQA/AIQA.vue

+ 2 - 2
src/api/http.js

@@ -77,7 +77,7 @@ const cancelTimeoutUrlPost = ["/cloud_disk/resource/upload"];
 export default {
   post(url, data) {
     //post请求方式
-    let timeout = cancelTimeoutUrlPost.includes(url) ? 0 : 100000;
+    let timeout = cancelTimeoutUrlPost.includes(url) ? 0 : 600000;
     return axios({
       method: "post",
       url: url,
@@ -100,7 +100,7 @@ export default {
       baseURL: process.env.VUE_APP_API_ROOT,
       url: url,
       params: getData(data, url),
-      timeout: 100000,
+      timeout:600000,
       headers: {
         "Content-type": "application/x-www-form-urlencoded; charset=utf-8",
       },

+ 4 - 0
src/views/operation_manage/AIQA/AIQA.vue

@@ -380,6 +380,10 @@ export default {
                 this.historyList.splice(this.historyList.length-1,1,msg)
             }).catch(()=>{
                 this.answerLoading=false
+                const msg = this.historyList[this.historyList.length-1]
+                msg.Answer = '回答超时,请重试!'
+                msg.isPlay = true
+                this.historyList.splice(this.historyList.length-1,1,msg)
             })
         },
         //获取窗口列表