|
@@ -271,7 +271,7 @@ const popConfirm = () => {
|
|
|
// 修改群个人昵称接口
|
|
|
funSelectEditnickname({
|
|
|
nickname: newName.value,
|
|
|
- groupId: wsStore.toUserInfo.id
|
|
|
+ groupId: wsStore.toUserInfo.groupId
|
|
|
});
|
|
|
information.nickname = newName.value;
|
|
|
// 同步更新 groupMembers 和 groupMembersNum(因为你两个地方用到)
|
|
@@ -292,7 +292,7 @@ const popConfirm = () => {
|
|
|
}
|
|
|
}, 1000);
|
|
|
};
|
|
|
-// 修改群聊名称接口
|
|
|
+// 修改群信息接口
|
|
|
const funSelectGroupName = async params => {
|
|
|
try {
|
|
|
const res = await selectGroupName(wsStore.uuid, params);
|
|
@@ -384,19 +384,30 @@ const popExit = async () => {
|
|
|
};
|
|
|
// 消息免打扰
|
|
|
const changeDisturb = async () => {
|
|
|
- const res = await setMessageDisturb(wsStore.toUserInfo.uuid,{friendUuid:walletStore.account});
|
|
|
- if(res.code == 200){
|
|
|
- wsStore.toUserInfo.slience = res.data;
|
|
|
- wsStore.updateSessionNewMessage({slience: res.data}, wsStore.toUserInfo.uuid);
|
|
|
+ try {
|
|
|
+ const res = await setMessageDisturb(wsStore.toUserInfo.uuid,{friendUuid:walletStore.account});
|
|
|
+ if(res.code == 200){
|
|
|
+ wsStore.toUserInfo.slience = res.data;
|
|
|
+ wsStore.updateSessionNewMessage({slience: res.data}, wsStore.toUserInfo.uuid);
|
|
|
+ }else{
|
|
|
+ showToast('设置失败');
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ showToast('设置失败');
|
|
|
}
|
|
|
- console.log(res)
|
|
|
}
|
|
|
// 置顶聊天
|
|
|
const changeStory = async () => {
|
|
|
- const res = await stickChat({friendUuid:walletStore.account,uuid:wsStore.toUserInfo.uuid});
|
|
|
- if(res.code == 200){
|
|
|
- wsStore.toUserInfo.stick = res.data;
|
|
|
- wsStore.updateSessionNewMessage({stick: res.data}, wsStore.toUserInfo.uuid);
|
|
|
+ try {
|
|
|
+ const res = await stickChat({friendUuid:walletStore.account,uuid:wsStore.toUserInfo.uuid});
|
|
|
+ if(res.code == 200){
|
|
|
+ wsStore.toUserInfo.stick = res.data;
|
|
|
+ wsStore.updateSessionNewMessage({stick: res.data}, wsStore.toUserInfo.uuid);
|
|
|
+ }else{
|
|
|
+ showToast('设置失败');
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ showToast('设置失败');
|
|
|
}
|
|
|
}
|
|
|
|