wjc
2022-05-24 a7f60b109fd33d6defe0d828a911f5cf449803d0
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -45,13 +45,17 @@
        /// <param name="deviceId">设备ID</param>
        /// <param name="deviceKey">功能查询类型:pm25</param>
        /// <returns></returns>
        public ResponsePackNew GetSensorHistory(string qType, string deviceId, string deviceKey)
        public ResponsePackNew GetSensorHistory(string qType, string deviceId, string deviceKey,string time = "")
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("type", qType);
            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
            d.Add("deviceId", deviceId);
            d.Add("key", deviceKey);
            if(time!= "")
            {
                d.Add("time", time);
            }
            var requestJson = HttpUtil.GetSignRequestJson(d);
            return HttpUtil.RequestHttpsPost(NewAPI.Api_Post_EnvironmentalSensorHistoricalData, requestJson);
@@ -152,6 +156,10 @@
                sdm.AccessToken = UserInfo.Current.LoginTokenString;
                sdm.RefreshToken = UserInfo.Current.RefreshToken;
#endif
            }
            else if (revertObj.Code == StateCode.PasswrodError)
            {
                UserInfo.Current.LastTime = DateTime.MinValue;
            }
            return revertObj.Code;
        }
@@ -1025,10 +1033,10 @@
#endif
                //是否生产模式
                bool isProduce = true;
#if DEBUG
                isProduce = false;
#endif
                if (HttpUtil.GlobalRequestHttpsHost == "https://test-gz.hdlcontrol.com")
                {
                    isProduce = false;
                }
                if (string.IsNullOrEmpty(OnAppConfig.Instance.PushDeviceToken))
                {
                    Utlis.WriteLine("PushDeviceToken 为空");