zhangqun 11 months ago
parent 71027731ef
commit 1950f47e09
  1. 4
      common/globalJs/globalJs.js
  2. 4
      manifest.json
  3. 39
      pages/index/detail.vue
  4. 3
      pages/knowledge/index.vue

@ -2,8 +2,8 @@
// #ifdef APP-PLUS || MP
// const baseUrl = "http://116.62.210.143:9002";
// const baseUrl = "http://118.89.79.160:8800/HiatmpPro";
const baseUrl = "http://49.235.207.167:8800/HiatmpPro";
// const baseUrl = "http://219.147.31.25:30001/tht-app-api/HiatmpPro";
// const baseUrl = "http://49.235.207.167:8800/HiatmpPro";
const baseUrl = "http://219.147.31.25:30001/tht-app-api/HiatmpPro";
const chatUrl = "http://219.147.31.25:30001/hitap";
// #endif
// #ifdef H5

@ -135,8 +135,8 @@
"https" : false,
"proxy" : {
"/HiatmpPro" : {
"target" : "http://49.235.207.167:8800",
// "target" : "http://219.147.31.25:30001/tht-app-api",
// "target" : "http://49.235.207.167:8800",
"target" : "http://219.147.31.25:30001/tht-app-api",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {

@ -229,7 +229,7 @@ export default {
};
},
onLoad(options) {
console.log(options)
console.log(options);
let params = options;
// params.deptId = "3702000000";
// params.id = "37020017609";
@ -243,7 +243,7 @@ export default {
str += "路段名:" + params.roadName;
this.title = params.roadName + "智能排查";
}
if (params.id) {
if (params.id != "undefined") {
str += ",id:" + params.id; //params.id
}
console.log(params);
@ -251,7 +251,12 @@ export default {
this.queryChat("开始隐患排查," + str);
} else {
// this.SSE("," + str, "1");
this.queryChat("开始隐患排查," + str);
if (params.id != "undefined") {
this.queryChat("开始隐患排查," + str);
} else {
this.$.toast('缺少相关信息');
}
// if(this.msgListA.length==0){
// this.SSE("," + str, '1')
// }else{
@ -373,7 +378,7 @@ export default {
async queryChat(voiceText) {
// console.log(voiceText,"voiceText");
this.loading = true;
const [err, res] = await uni.request({
// url: 'http://10.16.3.159:8777/api/local_doc_qa/local_doc_chat',
url: $.chatUrl + "/chat",
@ -403,7 +408,7 @@ export default {
// "history": []
},
});
if (res && res.data && res.data.code == 200) {
// console.log('request success', res.data)
const { result = {} } = res.data;
@ -445,20 +450,17 @@ export default {
};
this.msgList.push(newQuestion); //
// this.$store.commit('setMSg_List', this.msgList);
},
scrollBottom() {
this.$nextTick(() => {
// const height =
// this.$refs.scrollView &&
// this.$refs.scrollView.$refs &&
// this.$refs.scrollView.$refs.content
// ? this.$refs.scrollView.$refs.content.scrollHeight
// : 0;
// this.scrollTop = height;
this.scrollTop = this.scrollTop + 1
// const height =
// this.$refs.scrollView &&
// this.$refs.scrollView.$refs &&
// this.$refs.scrollView.$refs.content
// ? this.$refs.scrollView.$refs.content.scrollHeight
// : 0;
// this.scrollTop = height;
this.scrollTop = this.scrollTop + 1;
});
},
//
@ -525,7 +527,6 @@ export default {
}
clearInterval(timer);
}
}, 50);
} else {
this.msgList = [
@ -584,7 +585,9 @@ export default {
// this.addQuestion(str, "0");
// this.SSE(jsonArr, "0");
this.changeMsgList("0", str);
this.queryChat(jsonArr);
let j = jsonArr.join(",");
this.queryChat(j);
}
}
},

@ -336,7 +336,8 @@ export default {
// this.addQuestion(str, "0");
// this.SSE(jsonArr, "0");
this.changeMsgList("0", str);
this.queryChat(jsonArr);
let j = jsonArr.join(',')
this.queryChat(j);
}
}
},

Loading…
Cancel
Save