// 获取当前的服务器 public async Task <Server> GetCurrentClientServerByUserId(int userId) { var server = await _httpService.Get( new CoreUri( _configuration.GetConnectionString("TrackerConnection") + "/ServerClient/CurrentServerByUserId", new { userId = userId, })); var jResult = JsonConvert.DeserializeObject <Server>(server); return(jResult); }
// 获取未读消息 public async Task <List <Message> > GetUnreadMessages(string messagerIp, int userId) { var server = await _httpService.Get( new CoreUri( messagerIp + "/Chat/GetUnreadMessages", new { userId = userId, })); var jResult = JsonConvert.DeserializeObject <List <Message> >(server); return(jResult); }