From 1fcaddb5d59ca128da995699f4e36d4e0d2f2fbd Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sun, 15 Sep 2024 22:58:46 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E9=80=9A=E8=AE=AF=E5=BD=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/address-book/index.js | 30 ++ src/components/liveCall/LiveCallItem.vue | 9 +- src/fvcomponents/fvFormDialog/index.vue | 33 ++- .../address-book-management/index.vue | 261 +++++++++++++++--- src/views/system/user/index.vue | 45 +-- 5 files changed, 300 insertions(+), 78 deletions(-) create mode 100644 src/api/address-book/index.js diff --git a/src/api/address-book/index.js b/src/api/address-book/index.js new file mode 100644 index 0000000..c17fac9 --- /dev/null +++ b/src/api/address-book/index.js @@ -0,0 +1,30 @@ +import request from '@/utils/request.js' + +export const addContact = (data) => { + return request({ + url: '/contact/add', + method: 'post', + data + }) +} +export const getContactDetail = (contactId) => { + return request({ + url: `/contact/${contactId}`, + method: 'get' + }) +} + +export const editContact = (data) => { + return request({ + url: '/contact/update', + method: 'post', + data + }) +} + +export const deleteContact = (contactIds) => { + return request({ + url: `/contact/${contactIds}`, + method: 'delete' + }) +} diff --git a/src/components/liveCall/LiveCallItem.vue b/src/components/liveCall/LiveCallItem.vue index 9759e09..a03bb83 100644 --- a/src/components/liveCall/LiveCallItem.vue +++ b/src/components/liveCall/LiveCallItem.vue @@ -127,8 +127,11 @@ const initWebSocket = () => { } //接收到消息的回调方法 socket.onmessage = function (event) { - let data = JSON.parse(event.data) - console.log("服务器返回的信息: ", JSON.parse(event.data)); + let data = JSON.parse(event.data) + if(data.type!=='pong'){ + + console.log("服务器返回的信息: ", data); + } } //连接关闭的回调方法 socket.onclose = function () { @@ -137,7 +140,7 @@ const initWebSocket = () => { } setInterval(() => { socket.send(JSON.stringify(send)) - }, 3000) + }, 30000) } catch (e) { console.log(e) console.log("ws连接失败"); diff --git a/src/fvcomponents/fvFormDialog/index.vue b/src/fvcomponents/fvFormDialog/index.vue index 05eea47..9033d4c 100644 --- a/src/fvcomponents/fvFormDialog/index.vue +++ b/src/fvcomponents/fvFormDialog/index.vue @@ -1,10 +1,10 @@