Added the function of obtaining user information on the network

This commit is contained in:
xyz
2025-06-11 11:21:08 +08:00
parent 68cd53a80c
commit 24536ca80f
6 changed files with 116 additions and 28 deletions

View File

@ -284,8 +284,14 @@ void MainWidget::initSignalSlot()
/////////////////////////////////////
// 获取个人的信息
/////////////////////////////////////
//dataCenter
//提供一个具体的方法,来获取到网络的数据
connect(dataCenter, &DataCenter::getMyselfDone, this, [=]() {
//从DataCenter中拿到响应的结果myself把里面的头像取出来显示到界面上
//由于响应的逻辑已经执行完毕,说明从网络拿到了信息,则直接同步获取即可
auto myself = dataCenter->getMyselfsync();
userAvatar->setIcon(myself->avatar);
});
dataCenter->getMyselfAsync();
}
void MainWidget::switchTabToSession()