wei
2021-06-23 d4973876384be55df64de45db8a511d1e0330872
HDL_ON/UI/UI2/FuntionControlView/Video/VideoSend.cs
@@ -12,8 +12,6 @@
    public class VideoSend
    {
        /// <summary>
        /// 检查住宅是否绑定丰林,并获取门口机列表
        /// </summary>
@@ -24,23 +22,22 @@
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_Check);
            return responsePackNew;
        }
        /// <summary>
        /// 获取通话记录
        /// </summary>
        /// <returns></returns>
        public static ResponsePackNew GetCall(string flBindId)
        {
            var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", 100 } };
            var jObject = new JObject { { "homeId", PirSend.HomeId }, { "flBindId", flBindId }, { "pageSize", int.MaxValue } };
            var responsePackNew = RequestServerhomeId(jObject, NewAPI.API_POST_FL_GetCallList);
            return responsePackNew;
        }
        /// <summary>
        /// 获取门口机列表(1室内机,2室外机,3围墙机,4管理机,5二次确认机)
        /// </summary>
        public static List<VideoMethod.FlVideo> GetVideoInfoList(VideoMethod.VideoClouds video)
        public static List<FlVideo> GetVideoInfoList(VideoClouds video)
        {
            List<VideoMethod.FlVideo> eSVideoInfosList = new List<VideoMethod.FlVideo>();
            List<FlVideo> eSVideoInfosList = new List<FlVideo>();
            var jobject = new JObject();
            jobject.Add("cmtID", video.flCmtId);
            jobject.Add("unitno", video.flBuildingId);
@@ -61,7 +58,7 @@
                {
                    return eSVideoInfosList;
                }
                eSVideoInfosList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<VideoMethod.FlVideo>>(json["list"].ToString());
                eSVideoInfosList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<FlVideo>>(json["list"].ToString());
              
            }
            catch { }
@@ -70,12 +67,12 @@
        /// <summary>
        /// 上报动态开锁密码(注意:密码有可能延时1分钟生效)
        /// </summary>
        public static void GetQRcode(FrameLayout frame, VideoMethod.VideoClouds video, Action<bool, string> action)
        public static void GetQRcode(FrameLayout frame, VideoClouds video, Action<bool, string> action)
        {
            ///标记是否成功
            bool if_bool = false;
            //临时密码
            string pwd = VideoMethod.getCode();
            string pwd = VideoMethod.GetCode();
            var jobject = new JObject();             jobject.Add("communityID", video.flCmtId);//社区ID
            jobject.Add("fromTime", VideoMethod.GetCurrentTimeStamp());//开始时间
            jobject.Add("validTime", VideoMethod.GetTomorrowTimeStamp());//有效时间
@@ -93,13 +90,29 @@
                    var str = HttpWebRequest(NewAPI.API_POST_FL_QRcode, jobject.ToString(), "POST");
                    if (!string.IsNullOrEmpty(str))
                    {
                        var json = JObject.Parse(str);
                        if (json != null)
                        if (str.Contains("status"))
                        {
                            var stateCode = json["status"].ToString();
                            if (stateCode == "0")
                            //var json = JObject.Parse(str);
                            //if (json != null)
                            //{
                            //    var stateCode = json["status"].ToString();
                            //    if (stateCode == "0")
                            //    {
                            //        if_bool = true;
                            //    }
                            //}
                            if_bool = true;
                        }
                        else {
                            var json = JObject.Parse(str);
                            if (json != null)
                            {
                                if_bool = true;
                                var stateCode = json["desc"].ToString();
                                Application.RunOnMainThread(() =>
                                {
                                    //错误提示
                                    new Intelligence.Automation.LogicView.TipPopView().FlashingBox(stateCode);
                                });
                            }
                        }
                    }