|
@@ -499,6 +499,7 @@ import dayjs from 'dayjs';
|
|
import axios from 'axios';
|
|
import axios from 'axios';
|
|
import { useSocket } from '@/utils/websocket';
|
|
import { useSocket } from '@/utils/websocket';
|
|
import mittBus from '@/utils/mitt';
|
|
import mittBus from '@/utils/mitt';
|
|
|
|
+import { voiceAssistant } from "@/api/todo/voiceAssistant";
|
|
// 引入组件
|
|
// 引入组件
|
|
const CommonAdvice = defineAsyncComponent(() => import('@/components/CommonAdvice/index.vue')); // 常用意见
|
|
const CommonAdvice = defineAsyncComponent(() => import('@/components/CommonAdvice/index.vue')); // 常用意见
|
|
const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue'));
|
|
const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue'));
|
|
@@ -1474,8 +1475,7 @@ const connectVoiceAssistant = async (telNo: string) => {
|
|
socket.value = null;
|
|
socket.value = null;
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
- const { data } = await axios.get(`${import.meta.env.VITE_VOICE_ASSISTANT_API_URL}/users/getUserByAgentId/${telNo}`);
|
|
|
|
- const { result } = data;
|
|
|
|
|
|
+ const { result } = await voiceAssistant(telNo);
|
|
const uid = `8#User-${result.uid}`;
|
|
const uid = `8#User-${result.uid}`;
|
|
const subscribe = `/trans/${result.orgCode}/${result.groupUid}/${uid}`;
|
|
const subscribe = `/trans/${result.orgCode}/${result.groupUid}/${uid}`;
|
|
socket.value = useSocket(import.meta.env.VITE_VOICE_ASSISTANT_SOCKET_URL, { uid, subscribe });
|
|
socket.value = useSocket(import.meta.env.VITE_VOICE_ASSISTANT_SOCKET_URL, { uid, subscribe });
|