From a3f524e3458c5cbce973870501b21d62f1565630 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Wed, 2 Oct 2024 19:09:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BE=A4=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=B8=BA=E5=88=B0=E5=BA=95=E9=83=A8=EF=BC=8C=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=BE=A4=E5=8F=8A=E4=BF=AE=E6=94=B9=E7=BE=A4?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/group.js | 17 +- src/api/user.js | 1 + src/views/Chat.vue | 786 ++++++++++++++++++++++++-------------------- src/views/Group.vue | 94 ++---- 4 files changed, 478 insertions(+), 420 deletions(-) diff --git a/src/api/group.js b/src/api/group.js index f9fd9dc..02e4c76 100644 --- a/src/api/group.js +++ b/src/api/group.js @@ -10,7 +10,7 @@ export const updateDeviceService = (data) => { return request.post('/device/update_device', params, { "headers": { 'token': data.token } }); } -export const deleteDeviceService = (data) => { +export const deleteGroupService = (data) => { const params = new URLSearchParams(); for (let key in data) { params.append(key, data[key]) @@ -39,4 +39,19 @@ export const getGroupListService = (data) => { } } ); +} + +export const getGroupReqService = (data) => { + const params = new URLSearchParams(); + for (let d in data) { + params.append(d, data[d]); + } + // request.headers["Content-Type"] = "application/json"; + request.defaults.headers["token"] = data.token.value; + return request.post('/im/get_group', params, { + headers: { + 'token': data.token, // 将 token 替换为您的令牌值 + } + } + ); } \ No newline at end of file diff --git a/src/api/user.js b/src/api/user.js index 308b04c..2405ff2 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -75,6 +75,7 @@ export const GetUserInfoService = (Data) => { }) } +//删除好友或者群组 export const DelFGService =(Data) =>{ const params = new URLSearchParams(); for (let key in Data) { diff --git a/src/views/Chat.vue b/src/views/Chat.vue index 238c79e..599abac 100644 --- a/src/views/Chat.vue +++ b/src/views/Chat.vue @@ -1,142 +1,213 @@