wxr
2021-08-28 098bc6e25ccaa85f056bd4bafe20cb669c785295
Merge branch 'CJL-Linphone' into wxr7
9个文件已修改
236 ■■■■ 已修改文件
DLL/Shared.Droid.HDLWidget.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/Constant.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewApiRes.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Shared.Droid.HDLWidget.dll
Binary files differ
HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202108273" android:versionName="1.2.202108273" package="com.hdl.onpro">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" />
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
    <!-- 乐橙可视对讲需要的权限 -->
    <!--<uses-permission android:name="android.permission.INTERNET" />-->
    <!--网络访问-->
HDL_ON/Common/Constant.cs
@@ -233,6 +233,18 @@
        /// 系统信息
        /// </summary>
        Prompt,
        /// <summary>
        /// 新闻
        /// </summary>
        News,
        /// <summary>
        /// 推荐
        /// </summary>
        Recommend,
        /// <summary>
        /// 物业通知,待确认修改
        /// </summary>
        Property,
    }
    /// <summary>
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1041,7 +1041,7 @@
        /// <summary>
        /// 查询推送信息列表
        /// </summary>
        /// <param name="queryType">0全部 1分享与功能 2报警类 3系统信息</param>
        /// <param name="queryType">0全部 1分享与功能 2报警类 3系统信息 4物业通知</param>
        /// <returns></returns>
        public ResponsePackNew PushSerivceGetPushmessagelist(int queryType = 0)
        {
@@ -1059,14 +1059,18 @@
            {
                pushType = PushType.Prompt.ToString();
            }
            else if (queryType == 4)
            {
                pushType = PushType.Property.ToString();
            }
            var requestJson = HttpUtil.GetSignRequestJson(new GetMessageListObj()
            {
                pushId = OnAppConfig.Instance.PushId,
                pushType = pushType,
                homeId = DB_ResidenceData.Instance.CurrentRegion.id,
            });
            return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist, requestJson);
            //2021-08-28 改为分页查询
            return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Getpushmessagelist_Paging, requestJson);
        }
        /// <summary>
@@ -2644,6 +2648,7 @@
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
            d.Add("userFace", @"data:image/jpg;base64,"+imageBytes);
            d.Add("houseId", DB_ResidenceData.Instance.CurrentRegion.id);
            //MainPage.Log(imageBytes);
HDL_ON/DAL/Server/NewAPI.cs
@@ -284,10 +284,14 @@
        /// 删除推送Token
        /// </summary>
        public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/delete";
        ///// <summary>
        /////// 获取推送消息记录
        /////// </summary>
        //public const string API_POST_PushSerivce_Getpushmessagelist = "/smart-footstone/app/message/list";
        /// <summary>
        /// 获取推送消息记录
        /// 获取推送消息记录 分页
        /// </summary>
        public const string API_POST_PushSerivce_Getpushmessagelist = "/smart-footstone/app/message/list";
        public const string API_POST_PushSerivce_Getpushmessagelist_Paging = "/smart-footstone/app/message/page";
        /// <summary>
        /// 清空推送的消息记录
        /// </summary>
@@ -665,7 +669,7 @@
        /// <summary>
        /// 人脸录入
        /// </summary>
        public const string Api_Post_InputUserFace = "/community-wisdom/app/doorDevice/inputUserFaceHouse";//"/community-wisdom/app/doorDevice/inputUserFace";
        public const string Api_Post_InputUserFace = "/community-wisdom/app/doorDevice/inputUserFaceHouse";
        /// <summary>
        /// 开关人脸功能
        /// </summary>
HDL_ON/DAL/Server/NewApiRes.cs
@@ -49,6 +49,17 @@
        public string regionUrl;
    }
    /// <summary>
    /// 分页
    /// </summary>
    public class BasePagingObj
    {
        public int totalCount = 0;
        public int totalPage = 0;
        public int pageNo = 0;
        public int pageSize = 0;
    }
    #endregion
    #region  ■ 登录 ____________________________
@@ -1085,6 +1096,14 @@
        /// "":全部;Default:分享与功能;Alarm:报警类;Prompt:系统消息
        /// </summary>
        public string pushType;
        /// <summary>
        ///  页面大小
        /// </summary>
        public int pageSize = 100;
        /// <summary>
        ///  页面序号
        /// </summary>
        public int pageNo = 1;
    }
    /// <summary>
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -635,12 +635,12 @@
                    {
                        //未读的消息列表
                        var unreadList = new List<PushMessageInfo>();
                        var pushMessageInfoList = Newtonsoft.Json.JsonConvert.DeserializeObject<PushMessageInfoList>(result.Data.ToString());
                        var pushMessageInfoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PushMessageInfo>>(result.Data.ToString());
                        if (pushMessageInfoList != null && pushMessageInfoList.Count > 0)
                        if (pushMessageInfoList != null && pushMessageInfoList.list != null && pushMessageInfoList.list.Count > 0)
                        {
                            foreach (var info in pushMessageInfoList)
                            foreach (var info in pushMessageInfoList.list)
                            {
                                if (!info.isRead)
                                {
@@ -660,7 +660,7 @@
                            {
                                Application.RunOnMainThread(() =>
                                {
                                    ShowMesBtnState(pushMessageInfoList[0], true);
                                    ShowMesBtnState(pushMessageInfoList.list[0], true);
                                });
                            }
                        }
HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
@@ -27,16 +27,17 @@
        /// <summary>
        /// menuView
        /// </summary>
        FrameLayout menuView;
        HorizontalScrolViewLayout menuView;//2021-08-27 增加多了一个菜单按钮所以改为滚动控件
        MenuButton allMenuButton;
        MenuButton shareMenuButton;
        MenuButton alarmMenuButton;
        MenuButton systemMenuButton;
        MenuButton propertyMenuButton;//增加物业通知按钮
        FrameLayout messageView;
        /// <summary>
        /// 显示的消息类型
        /// 0全部 1分享与功能 2报警类 3系统信息
        /// 0全部 1分享与功能 2报警类 3系统信息 4物业公告
        /// </summary>
        int showMesType = 0;
        /// <summary>
@@ -89,14 +90,21 @@
        void AddTopMenuView()
        {
            menuView = new FrameLayout()
            menuView = new HorizontalScrolViewLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealWidth(117),
                BackgroundColor = CSS_Color.MainBackgroundColor,
                HorizontalScrollBarEnabled = false//隐藏滚动条
            };
            bodyView.AddChidren(menuView);
            //左padding View
            menuView.AddChidren(new Button()
            {
                Width = Application.GetRealWidth(15),
                BackgroundColor = CSS_Color.viewTranslucence
            });
            #region 全部按钮
            allMenuButton = new MenuButton()
@@ -184,7 +192,31 @@
                MenuButtonSelect(3);
            };
            systemMenuButton.SelectAction = systemAction;
#endregion
            #endregion
            #region 物业通知
            propertyMenuButton = new MenuButton()
            {
                X = systemMenuButton.Right,
                Y = Application.GetRealWidth(16),
            };
            //menuView.AddChidren(propertyMenuButton); //先屏蔽
            propertyMenuButton.ImageButton.SelectedImagePath = "Collection/MesCenter/SystemOn.png";
            propertyMenuButton.ImageButton.UnSelectedImagePath = "Collection/MesCenter/System.png";
            propertyMenuButton.TextButton.TextID = StringId.SystemMessage;
            Action propertyAction = () =>
            {
                MenuButtonSelect(4);
            };
            propertyMenuButton.SelectAction = propertyAction;
            #endregion
            //先屏蔽
            ////右paddingView
            //menuView.AddChidren(new Button() {
            //    Width = Application.GetRealWidth(15),
            //    BackgroundColor = CSS_Color.viewTranslucence
            //});
        }
@@ -214,7 +246,7 @@
        /// <summary>
        /// 
        /// </summary>
        /// <param name="selectId">0全部 1分享与功能 2报警类 3系统信息</param>
        /// <param name="selectId">0全部 1分享与功能 2报警类 3系统信息 4物业通知</param>
        void MenuButtonSelect(int selectId)
        {
            showMesType = selectId;
@@ -225,6 +257,7 @@
                shareMenuButton.IsSelected = true;
                alarmMenuButton.IsSelected = true;
                systemMenuButton.IsSelected = true;
                propertyMenuButton.IsSelected = true;
            }
            else if (selectId == 1)
@@ -233,6 +266,7 @@
                shareMenuButton.IsSelected = true;
                alarmMenuButton.IsSelected = false;
                systemMenuButton.IsSelected = false;
                propertyMenuButton.IsSelected = false;
            }
            else if (selectId == 2)
@@ -241,6 +275,7 @@
                shareMenuButton.IsSelected = false;
                alarmMenuButton.IsSelected = true;
                systemMenuButton.IsSelected = false;
                propertyMenuButton.IsSelected = false;
            }
            else if (selectId == 3)
            {
@@ -248,6 +283,16 @@
                shareMenuButton.IsSelected = false;
                alarmMenuButton.IsSelected = false;
                systemMenuButton.IsSelected = true;
                propertyMenuButton.IsSelected = false;
            }
            else if (selectId == 4)
            {
                allMenuButton.IsSelected = false;
                shareMenuButton.IsSelected = false;
                alarmMenuButton.IsSelected = false;
                systemMenuButton.IsSelected = false;
                propertyMenuButton.IsSelected = true;
            }
@@ -494,7 +539,13 @@
                    var result = new HttpServerRequest().PushSerivceGetPushmessagelist(queryType);
                    if (result.Code == StateCode.SUCCESS)
                    {
                        PushMessageInfoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PushMessageInfo>>(result.Data.ToString());
                        //PushMessageInfoList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PushMessageInfo>>(result.Data.ToString());
                        //2021-08-28 改为分页接口
                        var mPushMesList = Newtonsoft.Json.JsonConvert.DeserializeObject<PushMessageInfoList>(result.Data.ToString());
                        if(mPushMesList != null) {
                            PushMessageInfoList = mPushMesList.list;
                        }
                        Application.RunOnMainThread(() =>
                        {
                            if (PushMessageInfoList != null && PushMessageInfoList.Count > 0)
@@ -745,4 +796,14 @@
        public long createTime;
    }
    /// <summary>
    // 推送消息分页对象
    /// </summary>
    public class PushMessageInfoList : BasePagingObj
    {
        public List<PushMessageInfo> list = new List<PushMessageInfo>();
    }
}
HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
@@ -63,7 +63,7 @@
            contentView = new FrameLayout()
            {
                Y = Application.GetRealHeight(64),
                Height = Application.GetRealHeight(667-64),
                Height = Application.GetRealHeight(667 - 64),
            };
            bodyView.AddChidren(contentView);
@@ -96,7 +96,7 @@
            };
            topView.AddChidren(btnText1);
            topView.AddChidren(new Button() { Height = 1,BackgroundColor = CSS_Color.DividingLineColor,Y = Application.GetRealHeight(188) ,X = Application.GetRealWidth(16),Width = Application.GetRealWidth(359)});
            topView.AddChidren(new Button() { Height = 1, BackgroundColor = CSS_Color.DividingLineColor, Y = Application.GetRealHeight(188), X = Application.GetRealWidth(16), Width = Application.GetRealWidth(359) });
            #region 社区门禁通行
            var communityRow = new FrameLayout()
@@ -130,19 +130,21 @@
            };
            communityRow.AddChidren(btnCommunityAccessControlIcon);
            btnCommunityAccessControlIcon.MouseUpEventHandler = (sender, e) => {
                if(customerObj.faceClose == 3)//没有人脸数据不能开启人脸通行功能
            btnCommunityAccessControlIcon.MouseUpEventHandler = (sender, e) =>
            {
                if (customerObj.faceClose == 3)//没有人脸数据不能开启人脸通行功能
                {
                    return;
                }
                btnCommunityAccessControlIcon.IsSelected = !btnCommunityAccessControlIcon.IsSelected;
                int switchStatus = btnCommunityAccessControlIcon.IsSelected == true ? 1 :2;
                int switchStatus = btnCommunityAccessControlIcon.IsSelected == true ? 1 : 2;
                //失败回调
                Action action = () => {
                    btnCommunityAccessControlIcon.IsSelected = !btnCommunityAccessControlIcon.IsSelected;
                //刷新回调
                Action action = () =>
                {
                    initButtonStatus();
                };
                editFaceInfo(switchStatus,action);
                editFaceInfo(switchStatus, action);
            };
            #endregion
@@ -175,7 +177,8 @@
                IsBold = true,
            };
            contentView.AddChidren(btnSetFaceId);
            btnSetFaceId.MouseUpEventHandler = (sender, e) => {
            btnSetFaceId.MouseUpEventHandler = (sender, e) =>
            {
                LoadPictureOptionView();
            };
@@ -193,11 +196,13 @@
                TextAlignment = TextAlignment.Center,
                IsBold = true,
            };
            btnEraseData.MouseUpEventHandler = (sender,e) => {
                Action action = () => {
            btnEraseData.MouseUpEventHandler = (sender, e) =>
            {
                Action action = () =>
                {
                    initButtonStatus();
                };
                editFaceInfo(3,action);
                editFaceInfo(3, action);
            };
            ReadFaceInfo();
@@ -206,10 +211,15 @@
        /// <summary>
        /// 获取人脸信息
        /// </summary>
        void ReadFaceInfo()
        void ReadFaceInfo(bool isLoading = true)
        {
            var waitPage = new Loading();
            waitPage.Start();
            Loading waitPage = null;
            if (isLoading)
            {
                waitPage = new Loading();
                waitPage.Start();
            }
            new Thread(() =>
            {
                try
@@ -232,13 +242,15 @@
                        }
                    }
                }catch(Exception ex)
                }
                catch (Exception ex)
                {
                    MainPage.Log($"读取人脸信息异常:{ex.Message}");
                }
                finally
                {
                    Application.RunOnMainThread(() => {
                    Application.RunOnMainThread(() =>
                    {
                        if (waitPage != null)
                        {
                            waitPage.RemoveFromParent();
@@ -252,7 +264,7 @@
        /// <summary>
        /// 清除人脸数据
        /// </summary>
        void editFaceInfo(int status,Action action)
        void editFaceInfo(int status, Action action)
        {
            var waitPage = new Loading();
            waitPage.Start();
@@ -283,7 +295,8 @@
                }
                finally
                {
                    Application.RunOnMainThread(() => {
                    Application.RunOnMainThread(() =>
                    {
                        if (waitPage != null)
                        {
                            waitPage.RemoveFromParent();
@@ -311,9 +324,9 @@
                    return;
                }
            }
                btnCommunityAccessControlIcon.IsSelected = false;
                btnEraseData.RemoveFromParent();
                btnSetFaceId.TextID = StringId.SetFace;
            btnCommunityAccessControlIcon.IsSelected = false;
            btnEraseData.RemoveFromParent();
            btnSetFaceId.TextID = StringId.SetFace;
        }
@@ -332,7 +345,7 @@
            pictureOptionView = new FrameLayout()
            {
                Y = Application.GetRealHeight(445+50),
                Y = Application.GetRealHeight(445 + 50),
                Height = Application.GetRealHeight(250),
                AnimateSpeed = 0.3f,
                Animate = Animate.DownToUp,
@@ -411,7 +424,8 @@
            {
                pictureOptionView.Parent.RemoveFromParent();
            };
            btnTakePicture.MouseDownEventHandler = (sender, e) => {
            btnTakePicture.MouseDownEventHandler = (sender, e) =>
            {
                btnTakePicture.IsSelected = true;
            };
            btnTakePicture.MouseUpEventHandler = (sender, e) =>
@@ -420,12 +434,13 @@
                var imageName = Guid.NewGuid().ToString();
                CropImage.TakePicture((imagePath) =>
                {
                    CropImageCallBack(imagePath,1,imageName);
                }, imageName, 4, 6, 1000);
                    CropImageCallBack(imagePath, 1, imageName);
                }, imageName, 4, 6, 400);
                pictureOptionView.Parent.RemoveFromParent();
            };
            btnAlbum.MouseDownEventHandler = (sender, e) => {
            btnAlbum.MouseDownEventHandler = (sender, e) =>
            {
                btnAlbum.IsSelected = true;
            };
@@ -437,8 +452,8 @@
                //var imageName = scene.sid;
                CropImage.SelectPicture((imagePath) =>
                {
                    CropImageCallBack(imagePath,2,imageName);
                }, imageName, 4, 6,1000);
                    CropImageCallBack(imagePath, 2, imageName);
                }, imageName, 4, 6, 400);//OutputYSize目前仅对Android有些 400代表Y的最多分辨率,所以最终得到图片的分辨率为:266*400
                pictureOptionView.Parent.RemoveFromParent();
            };
@@ -446,14 +461,12 @@
        }
        /// <summary>
        /// 裁剪完照片回调,统一处理
        /// </summary>
        /// <param name="imagePath">裁剪后的真实路径</param>
        /// <param name="imageSource">照片来源;1:拍照;2:图库</param>
        void CropImageCallBack(string selectImagePath,int imageSource,string imageName)
        void CropImageCallBack(string selectImagePath, int imageSource, string imageName)
        {
            if (string.IsNullOrEmpty(selectImagePath) == true)
            {
@@ -462,7 +475,9 @@
            //上传成功到回调
            Action<bool> uploadSuccessAction = (isSuccess) =>
            {
                Action action = () => {
                //点击重新录入事件
                Action action = () =>
                {
                    if (!isSuccess)
                    {
                        if (imageSource == 1)
@@ -470,20 +485,23 @@
                            CropImage.TakePicture((imagePath) =>
                            {
                                CropImageCallBack(imagePath, 2, imageName);
                            }, imageName, 4, 6);
                            }, imageName, 4, 6, 400);
                        }
                        else
                        {
                            CropImage.SelectPicture((imagePath) =>
                            {
                                CropImageCallBack(imagePath, 1,imageName);
                            }, imageName, 4, 6);
                                CropImageCallBack(imagePath, 1, imageName);
                            }, imageName, 4, 6, 400);
                        }
                    }else
                    {
                        ReadFaceInfo();
                    }
                };
                if (isSuccess)
                {
                    ReadFaceInfo(false);
                }
                Application.RunOnMainThread(() =>
                {
                    var page = new FaceSettingResultPage(action);
@@ -522,6 +540,7 @@
                        var pack = new HttpServerRequest().FaceSetting(base64string);
                        if (pack != null)
                        {
                            Utlis.WriteLine("上传结果:" + pack.message);
                            uploadResultAction?.Invoke(pack.Code == StateCode.SUCCESS);
                        }