mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 12:13:46 +08:00
fixed bug for websocket message handler rebind
This commit is contained in:
@@ -689,7 +689,7 @@ const sendMessage = function () {
|
||||
return;
|
||||
}
|
||||
|
||||
if (store.socket.readyState !== WebSocket.OPEN) {
|
||||
if (store.socket.conn.readyState !== WebSocket.OPEN) {
|
||||
ElMessage.warning("连接断开,正在重连...");
|
||||
return
|
||||
}
|
||||
@@ -727,7 +727,7 @@ const sendMessage = function () {
|
||||
|
||||
showHello.value = false
|
||||
disableInput(false)
|
||||
store.socket.send(JSON.stringify({
|
||||
store.socket.conn.send(JSON.stringify({
|
||||
channel: 'chat',
|
||||
type:'text',
|
||||
body:{
|
||||
@@ -825,7 +825,7 @@ const reGenerate = function (prompt) {
|
||||
icon: loginUser.value.avatar,
|
||||
content: text
|
||||
});
|
||||
store.socket.send(JSON.stringify({
|
||||
store.socket.conn.send(JSON.stringify({
|
||||
channel: 'chat',
|
||||
type:'text',
|
||||
body:{
|
||||
|
||||
@@ -512,7 +512,7 @@ const sendMessage = () => {
|
||||
return
|
||||
}
|
||||
|
||||
if (store.socket.readyState !== WebSocket.OPEN) {
|
||||
if (store.socket.conn.readyState !== WebSocket.OPEN) {
|
||||
showToast("连接断开,正在重连...");
|
||||
return
|
||||
}
|
||||
@@ -536,7 +536,7 @@ const sendMessage = () => {
|
||||
})
|
||||
|
||||
disableInput(false)
|
||||
store.socket.send(JSON.stringify({
|
||||
store.socket.conn.send(JSON.stringify({
|
||||
channel: 'chat',
|
||||
type:'text',
|
||||
body:{
|
||||
@@ -569,7 +569,7 @@ const reGenerate = () => {
|
||||
icon: loginUser.value.avatar,
|
||||
content: renderInputText(text)
|
||||
});
|
||||
store.socket.send(JSON.stringify({
|
||||
store.socket.conn.send(JSON.stringify({
|
||||
channel: 'chat',
|
||||
type:'text',
|
||||
body:{
|
||||
|
||||
Reference in New Issue
Block a user