Wpf mvvm [continued]: some users cannot obtain the list. wpfmvvm
A friend who has read my article about wpf mvvm should know that I mentioned that I cannot obtain the list because I have a small account, and I still cannot find the reason.
Two days ago, I went through the guidance of the great god on GitHub and learned the reason because after logging on, the web adopted different domain names to be compatible with various users.
Below are the js Code and C # code provided by the great gods.
Function () {var e = location. host, t = 'weixin .qq.com ', o = 'file .wx.qq.com', n = 'webpush .weixin.qq.com '; e. indexOf ('wx2 .qq.com ')>-1? (T = 'weixin .qq.com ', o = 'file2 .wx.qq.com', n = 'webpush2 .weixin.qq.com '): e. indexOf ('qq. com')>-1? (T = 'weixin .qq.com ', o = 'file .wx.qq.com', n = 'webpush .weixin.qq.com '): e. indexOf ('web1 .wechat.com')>-1? (T = 'wechat. com', o = 'file1 .wechat.com ', n = 'webpush1 .wechat.com'): e. indexOf ('web2 .wechat.com ')>-1? (T = 'wechat. com', o = 'file2 .wechat.com ', n = 'webpush2 .wechat.com'): e. indexOf ('wechat. com')>-1? (T = 'wechat. com', o = 'file .wechat.com ', n = 'webpush .wechat.com'): e. indexOf ('web1 .wechatapp.com ')>-1? (T = 'wechatapp. com ', o = 'file1 .wechatapp.com', n = 'webpush1 .wechatapp.com '): (t = 'wechatapp. com ', o = 'file .wechatapp.com', n = 'webpush .wechatapp.com ');}Jspublic object LoginCheck () {if (this. string_0! = Null) {string [] strArray = new string [6]; strArray [0] = this. string_7; strArray [1] = this. string_0; strArray [2] = "& tip = 0 & r ="; TimeSpan span = (TimeSpan) (DateTime. now. toUniversalTime ()-new DateTime (0x7b2, 1, 1); long totalMilliseconds = (long) span. totalMilliseconds; strArray [3] = totalMilliseconds. toString (); strArray [4] = "& _ ="; span = (TimeSpan) (DateTime. now. toUniversalTime ()-new DateTime (0x7b2, 1, 1); strArray [5] = (long) span. totalMilliseconds ). toString (); byte [] bytes = this. httpService_0.SendGetRequest (string. concat (strArray); string str2 = Encoding. UTF8.GetString (bytes); if (str2.Contains ("= 201") {string s = str2.Split (new string [] {"'"}, StringSplitOptions. none) [1]. split (new char [] {','}) [1]; byte [] buffer = Convert. fromBase64String (s); MemoryStream stream = new MemoryStream (buffer, 0, buffer. length); stream. write (buffer, 0, buffer. length); return Image. fromStream (stream);} if (str2.Contains ("= 200") {string str3 = str2.Split (new string [] {"\" "}, StringSplitOptions. none) [1]; string domain = CheckData. getdomain (str3); if (domain. indexOf ("wx2.qq.com")>-1) {this. string_1 =" https://wx2.qq.com /"; This. string_2 =" https://wx2.qq.com "; This. string_4 =" https://file2.wx.qq.com "; This. string_3 =" https://webpush2.weixin.qq.com "; Return str3;} if (domain. IndexOf (" qq.com ")>-1) {this. string_2 =" https://wx.qq.com "; This. string_4 =" https://file.wx.qq.com "; This. string_3 =" https://webpush.weixin.qq.com "; Return str3;} if (domain. IndexOf (" web1.wechat.com ")>-1) {this. string_2 =" https://web.wechat.com "; This. string_4 =" https://file1.wechat.com "; This. string_3 =" https://webpush1.wechat.com "; Return str3;} if (domain. IndexOf (" web2.wechat.com ")>-1) {this. string_2 =" https://web.wechat.com "; This. string_4 =" https://file2.wechat.com "; This. string_3 =" https://webpush2.wechat.com "; Return str3;} if (domain. IndexOf (" wechat.com ")>-1) {this. string_2 =" https://web.wechat.com "; This. string_4 =" https://file.wechat.com "; This. string_3 =" https://webpush.wechat.com "; Return str3;} if (domain. IndexOf (" web1.wechatapp.com ")>-1) {this. string_2 =" https://web.wechatapp.com "; This. string_4 =" https://file1.wechatapp.com "; This. string_3 =" https://webpush1.wechatapp.com "; Return str3;} this. string_2 =" https://web.wechatapp.com "; This. string_4 =" https://file.wechatapp.com "; This. string_3 =" https://webpush.wechatapp.com "; Return str3 ;}} return null ;}C #
According to the method, I modified it to implement subsequent operations after logon.
That is, after logging on to the account, you can obtain the list.
The modified code has been uploaded to GitHub.