diff --git a/manager/src/views/live/components/LiveChatPanel.vue b/manager/src/views/live/components/LiveChatPanel.vue
index 8b8dff4b..508fbea0 100644
--- a/manager/src/views/live/components/LiveChatPanel.vue
+++ b/manager/src/views/live/components/LiveChatPanel.vue
@@ -27,18 +27,6 @@
{{ unreadCount }} 条新消息
-
-
-
-
- 发送
-
-
@@ -144,9 +132,6 @@ export default {
this.cleanup();
},
methods: {
- handleSend() {
- this.createTextMessageByInput();
- },
async bootstrapChat() {
if (!this.liveId || this.chatInited || this.initializing || !this.canInitChat) {
return;
@@ -259,7 +244,7 @@ export default {
.chat-unread {
position: absolute;
left: 50%;
- bottom: 56px;
+ bottom: 12px;
transform: translateX(-50%);
padding: 4px 12px;
background: $theme_color;
@@ -270,13 +255,4 @@ export default {
z-index: 2;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
-
-.chat-input-bar {
- flex-shrink: 0;
- display: flex;
- gap: 8px;
- padding-top: 12px;
- border-top: 1px solid #ebeef5;
- background: #fff;
-}
diff --git a/manager/src/views/live/composables/useChat.js b/manager/src/views/live/composables/useChat.js
index 6f3e74b8..307e6f53 100644
--- a/manager/src/views/live/composables/useChat.js
+++ b/manager/src/views/live/composables/useChat.js
@@ -1,7 +1,5 @@
/* eslint-disable no-console */
import { nextTick, ref, unref, watch } from "vue";
-import { postSendMessage } from "@/api/live";
-import { Message } from "@/utils/message";
import TencentCloudChat from "@tencentcloud/chat";
import { resolveImConfigFromDetail } from "./useLiveSetting";
import { genTestUserSig } from "../utils/GenerateTestUserSig";
@@ -13,7 +11,6 @@ export function useChat(liveId, userInfo, liveDetail) {
const chat = ref(null);
const groupID = ref("");
const messageList = ref([]);
- const messageContent = ref("");
const chatListRef = ref(null);
const bottomAnchorRef = ref(null);
const isAtBottom = ref(true);
@@ -346,33 +343,6 @@ export function useChat(liveId, userInfo, liveDetail) {
messageList.value.sort((a, b) => a.time - b.time);
}
- async function createTextMessageByInput() {
- const content = messageContent.value.trim();
- if (!content) {
- return;
- }
- if (!imReady.value) {
- Message.error("IM 未就绪,请稍后再试");
- return;
- }
-
- try {
- const res = await postSendMessage({
- liveRoomId: unref(liveId),
- message: content,
- });
-
- if (res?.success) {
- messageContent.value = "";
- isAtBottom.value = true;
- unreadCount.value = 0;
- scrollToBottom(true);
- }
- } catch {
- Message.error("发送失败");
- }
- }
-
function scrollToBottom(force = false) {
if (!force && !isAtBottom.value) {
return;
@@ -458,7 +428,6 @@ export function useChat(liveId, userInfo, liveDetail) {
chat,
groupID,
messageList,
- messageContent,
chatListRef,
bottomAnchorRef,
isAtBottom,
@@ -468,7 +437,6 @@ export function useChat(liveId, userInfo, liveDetail) {
imReady,
initError,
initTencentIm,
- createTextMessageByInput,
scrollToBottom,
scrollToBottomAndClearUnread,
onScroll,