|
@@ -80,7 +80,7 @@
|
|
|
import moment from 'moment'
|
|
|
import Chat from './parts/chat.vue'
|
|
|
import { SearchOutlined } from '@ant-design/icons-vue'
|
|
|
-import { sendWebsocket, closeWebsocket, websocketSendMess } from '@/utils/websocket'
|
|
|
+import { sendWebsocket, closeWebsocket } from '@/utils/websocket'
|
|
|
// 接口
|
|
|
import { ChatStore } from '@/store/api/platform/chat'
|
|
|
import { UsersStore } from '@/store/api/user/user'
|
|
@@ -116,8 +116,8 @@ const textarea = ref('')
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
|
loading.value = true
|
|
|
- sendWebsocket('ws://localhost:3000', wsMessage, wsError, succeed)
|
|
|
await search()
|
|
|
+ sendWebsocket('ws://localhost:9700', wsMessage, wsError, succeed)
|
|
|
loading.value = false
|
|
|
})
|
|
|
|
|
@@ -140,7 +140,7 @@ const wsMessage = async (data) => {
|
|
|
}
|
|
|
// ws连接失败,组件要执行的代码
|
|
|
const wsError = async () => {
|
|
|
- sendWebsocket('ws://localhost:3000', wsMessage, wsError, succeed)
|
|
|
+ sendWebsocket('ws://localhost:9700', wsMessage, wsError, succeed)
|
|
|
}
|
|
|
// ws连接成功,组件要执行的代码
|
|
|
const succeed = async () => {
|
|
@@ -155,10 +155,12 @@ const search = async () => {
|
|
|
searchChat({ skip, limit })
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
const searchList = async () => {
|
|
|
const res = await chatstore.chat()
|
|
|
if (res.errcode == '0') chatList.value = res.data
|
|
|
}
|
|
|
+
|
|
|
const toView = async (item) => {
|
|
|
id.value = item._id
|
|
|
info.value = item
|