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 @@