| | |
| | | var responeObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString()); |
| | | foreach (var mInfo in responeObj) |
| | | { |
| | | ResponsePack memberInfoResponePack = new HttpServerRequest().GetResidenceMemberAccountInfo(mInfo.childAccountId); |
| | | var dataStr = JObject.FromObject(memberInfoResponePack.ResponseData); |
| | | FileStream fs = null; |
| | | //ResponsePack memberInfoResponePack = new HttpServerRequest().GetResidenceMemberAccountInfo(mInfo.childAccountId); |
| | | //var dataStr = JObject.FromObject(memberInfoResponePack.ResponseData); |
| | | //FileStream fs = null; |
| | | try |
| | | { |
| | | var headImageString = dataStr.GetValue("HeadImage").ToString(); |
| | | if (!string.IsNullOrEmpty(headImageString)) |
| | | { |
| | | var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(headImageString); |
| | | var headImageBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<byte[]>(jsonString); |
| | | var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", mInfo.childAccountId + ".png"); |
| | | fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); |
| | | fs.Write(headImageBytes, 0, headImageBytes.Length); |
| | | fs.Flush(); |
| | | mInfo.headImagePagePath = filePath; |
| | | } |
| | | //var headImageString = dataStr.GetValue("HeadImage").ToString(); |
| | | //if (!string.IsNullOrEmpty(headImageString)) |
| | | //{ |
| | | // var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(headImageString); |
| | | // var headImageBytes = Newtonsoft.Json.JsonConvert.DeserializeObject<byte[]>(jsonString); |
| | | // var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", mInfo.childAccountId + ".png"); |
| | | // fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); |
| | | // fs.Write(headImageBytes, 0, headImageBytes.Length); |
| | | // fs.Flush(); |
| | | // mInfo.headImagePagePath = filePath; |
| | | //} |
| | | if(string.IsNullOrEmpty(mInfo.nickName)) |
| | | { |
| | | mInfo.nickName = mInfo.UserName; |
| | |
| | | } |
| | | finally |
| | | { |
| | | if (fs != null) |
| | | { |
| | | fs.Close(); |
| | | } |
| | | //-----------获取住宅下子账号的共享数据列表 |
| | | //if (fs != null) |
| | | //{ |
| | | // fs.Close(); |
| | | //} |
| | | ////-----------获取住宅下子账号的共享数据列表 |
| | | LoadMethod_GetMemberSharedDataList(mInfo); |
| | | } |
| | | residenceMemberInfos.Add(mInfo); |