feat(ai-chat): 添加聊天记录搜索与远程欢迎语功能
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Config from './config.js'
|
||||
import http from './http.js'
|
||||
import store from '@/store/index.js'
|
||||
import lang from './lang.js'
|
||||
|
||||
let currentConversationId = null;
|
||||
export const CONVERSATION_KEY = 'ai_conversation_id';
|
||||
@@ -524,6 +525,34 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取服务配置信息
|
||||
*/
|
||||
async getServiceConfig() {
|
||||
try {
|
||||
const params = {
|
||||
url: '/api/kefu/info',
|
||||
data: {
|
||||
uniacid: this.getUniacid(),
|
||||
token: store.state.token || 'test_token',
|
||||
user_id: getUserId(),
|
||||
member_id: getUserId(),
|
||||
locale: lang.getCurrentLocale()
|
||||
},
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
};
|
||||
const response = await http.sendRequest({
|
||||
...params,
|
||||
async: false,
|
||||
});
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 清除会话历史(调用后端接口)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user