diff --git a/src/store/conversation.ts b/src/store/conversation.ts index 1825f86641cbc9fa0cdebc26c9b6086823da93ac..8847cae1cc876377f2d632d0d390ed3df9f8a32d 100644 --- a/src/store/conversation.ts +++ b/src/store/conversation.ts @@ -126,12 +126,12 @@ export const useSessionStore = defineStore('conversation', () => { conversationId: params.conversationId, groupId: params.groupId, // record_id: params.qaRecordId, - app:[{ + app:{ appId:params.user_selected_app[0], flowId: params.user_selected_flow, params: pp, auth:{}, - }], + }, features:features, }), }); @@ -149,12 +149,12 @@ export const useSessionStore = defineStore('conversation', () => { language, groupId: params.groupId, // record_id: params.qaRecordId, - app:[{ + app:{ appId:params.user_selected_app[0], flowId: "", params: pp, auth:{}, - }], + }, features:features, }), }); @@ -173,12 +173,12 @@ export const useSessionStore = defineStore('conversation', () => { language, groupId: params.groupId, // record_id: params.qaRecordId, - app:[{ + app:{ appId:"", flowId: "", params: {}, auth:{}, - }], + }, features:features, }), }); diff --git a/src/views/dialogue/dialogueView.vue b/src/views/dialogue/dialogueView.vue index 2e7a4f80dc28d763b9616b787fe9a7643e0fb7bf..558e50eeb151db287b6d40e41f7265bc45cdb0dc 100644 --- a/src/views/dialogue/dialogueView.vue +++ b/src/views/dialogue/dialogueView.vue @@ -21,6 +21,8 @@ import WitchainDIcon from '@/assets/images/witchainD.png'; import WitchainDIconSelected from '@/assets/svgs/WitchainDSelected.svg'; import { useRouter } from 'vue-router'; import { reactive } from 'vue'; +const { createNewSession } = useHistorySessionStore(); + // 挂载全局事件 window.onHtmlEventDispatch = onHtmlEventDispatch as any; const { logout } = useAccountStore(); @@ -177,6 +179,13 @@ onMounted(() => { } }); +const addNewSession = async(routerName: string) => { + console.log(router.currentRoute.value.name, routerName) + if(router.currentRoute.value.name === routerName){ + await createNewSession(); + } +} + watch( ruleForm, () => { @@ -238,7 +247,7 @@ watch(