优艾设计网

c# 其他信息: 已添加了具有相同键的项。 求帮忙 财富值80?

优艾设计网 https://www.uibq.com 2023-04-24 12:06 出处:网络 作者:在线设计
public JObject WxInit() { string init_json = \"{{\"BaseRequest\":{{\"Uin\":\"{0}\",\"Sid\":\"{1}\",\"Skey\":\"\",\"DeviceID\":\"e1615250492\"}}}}\"; Cookie sid = BaseService.GetCookie(\"wxsid\"); Cook

public JObject WxInit() { string init_json = "{{"BaseRequest":{{"Uin":"{0}","Sid":"{1}","Skey":"","DeviceID":"e1615250492"}}}}"; Cookie sid = BaseService.GetCookie("wxsid"); Cookie uin = BaseService.GetCookie("wxuin");if (sid != null && uin != null) { init_json = string.Format(init_json, uin.Value, sid.Value); byte[] bytes = BaseService.SendPostRequest(_init_url + "&pass_ticket=" + LoginService.Pass_Ticket, init_json); string init_str = Encoding.UTF8.GetString(bytes);JObject init_result = JsonConvert.DeserializeObject(init_str) as JObject;foreach (JObject synckey in init_result["SyncKey"]["List"])//同步键值 {_syncKey.Add(synckey["Key"].ToString(), synckey["Val"].ToString()); //已添加了具有相同键的项 求帮忙下,我是在winform想实现 } return init_result; } else { return null; } } /// <summary> /// 获取好友头像 /// </summary> /// <param name="username"></param> /// <returns></returns> public Image GetIcon(string username) { byte[] bytes = BaseService.SendGetRequest(_geticon_url + username); return Image.FromStream(new MemoryStream(bytes)); } /// <summary> /// 获取微信讨论组头像 /优艾设计网_设计圈// </summary> /// <param name="usename"></param> /// <returns></returns> public Image GetHeadImg(string usename) { byte[] bytes = BaseService.SendGetRequest(_getheadimg_url + usename);return Image.FromStream(new MemoryStream(bytes)); }


qkoufu6415 2022-09-07 14:54

优艾设计网_平面设计

_syncKey是字典对象吗?


203****233 2022-09-07 14:55

优艾设计网_设计模板

_syncKey[synckey["Key"].ToString()] = synckey["Val"].ToString();这样改动的话,后面获取到的信息会覆盖掉之前的信息


微微一笑再倾城i 2022-09-07 15:01

优艾设计网_设计客

_syncKey.Add(synckey["Key"].ToString(), synckey["Val"].ToString());改成


0

精彩评论

暂无评论...
验证码 换一张
取 消