|
@@ -27,6 +27,8 @@ import MessageInputButton from "./message-input-button.vue";
|
|
|
import MessageInputReferenceOrReply from "./message-input-reference-or-reply.vue";
|
|
|
import { JSONToObject } from "../utils/utils";
|
|
|
import { handleErrorPrompts } from "../../utils";
|
|
|
+import { useStore } from "vuex";
|
|
|
+import { eventGlobal } from "@/helpers";
|
|
|
|
|
|
const props = defineProps({
|
|
|
placeholder: {
|
|
@@ -83,7 +85,7 @@ const emit = defineEmits(["sendMessage", "resetReplyOrReference", "onTyping"]);
|
|
|
const { placeholder, isGroup, memberList, conversation, replyOrReference, env, enableTyping } = toRefs(props);
|
|
|
const editor = ref();
|
|
|
const isH5 = ref(props?.env?.isH5);
|
|
|
-
|
|
|
+const store = useStore && useStore();
|
|
|
watch(
|
|
|
() => conversation.value,
|
|
|
(newVal: any, oldVal: any) => {
|
|
@@ -98,6 +100,12 @@ watch(
|
|
|
);
|
|
|
|
|
|
const sendMessage = async () => {
|
|
|
+ console.log(store.state.imConnent, "store.imConnent");
|
|
|
+ if (!store.state.imConnent) {
|
|
|
+ eventGlobal.emit("reConnectIm", true);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
const TUIServer = (window as any)?.TUIKitTUICore?.TUIServer?.TUIChat;
|
|
|
const messageList = editor?.value?.getEditorContent();
|
|
|
const replyOrReferenceObject = replyOrReference.value;
|