wxr
2020-06-15 b8e94316e41eba72d927d5ca7d931b26139ee8ff
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -346,6 +346,31 @@
                }
                else
                {
                    //{
                    // {
                    //  "Id": "1107487",
                    //  "HomeStatus": 2,
                    //  "UserGuid": "22980",
                    //  "Name": "啊",
                    //  "Address": null,
                    //  "Longitude": 0.0,
                    //  "Latitude": 0.0,
                    //  "RegionName": null,
                    //  "Company": null,
                    //  "ContactPerson": null,
                    //  "ContactPersonPhone": null,
                    //  "Remarks": null,
                    //  "ChangeDate": null,
                    //  "AccountType": 0,
                    //  "CreatedOnUtc": "2020-05-27T06:52:03",
                    //  "IsOthreShare": false,
                    //  "MainUserDistributedMark": null,
                    //  "HomeGateways": [
                    //    {
                    //      "GatewayUniqueId": "4E47323347591243"
                    //    }
                    //  ]
                    //}}
                    MainPage.LoginUser.regionList = new List<RegionInfoRes>();
                    foreach (var jsonData in dataStr.GetValue("PageData"))
                    {
@@ -356,16 +381,19 @@
                            RegionName = homeJsonStr.GetValue("RegionName").ToString(),
                            Name = homeJsonStr.GetValue("Name").ToString(),
                            Address = homeJsonStr.GetValue("Address").ToString(),
                            IsOthreShare = (bool)homeJsonStr.GetValue("IsOthreShare"),
                        };
                        MainPage.LoginUser.regionList.Add(home);
                        if (string.IsNullOrEmpty(DB_ResidenceData.residenceData.CurReginID))
                        {
                            DB_ResidenceData.residenceData.CurReginID = MainPage.LoginUser.regionList[0].RegionID;
                        }
                    }
                    DB_ResidenceData.residenceData.SaveResidenceData();
                    MainPage.LoginUser.SaveUserInfo();
                }
            }
            return responsePack.StateCode;
        }
        /// <summary>
        /// 编辑住宅信息
@@ -573,9 +601,11 @@
                            responseString = Encoding.UTF8.GetString(webClient.DownloadData(url));
                            revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePack>(responseString);
                            jt = Newtonsoft.Json.JsonConvert.DeserializeObject<JObject>(revertObj.ResponseData.ToString());
                            MainPage.cityInfo.temperature = jt.GetValue("Temperature").ToString()+ "°";
                            MainPage.cityInfo.humidity = jt.GetValue("Humidity").ToString()+"%";
                            MainPage.cityInfo.temperature = jt.GetValue("Temperature").ToString();
                            MainPage.cityInfo.humidity = jt.GetValue("Humidity").ToString();
                            MainPage.cityInfo.pm25 = jt.GetValue("Air_Quality").ToString();
                            MainPage.cityInfo.windLevel = jt.GetValue("WindLevel").ToString();
                            MainPage.cityInfo.weather = jt.GetValue("Weather").ToString();
                            break;
                        }
                        catch (Exception ex)