JLChen
2021-09-14 12bda302564e919a0ba8157957df3d2ee7382909
2021-09-14 1.增加物业公告推送对接
10个文件已修改
160 ■■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Assets/Language.ini 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Resources/Language.ini 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/Constant.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/R.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpServerRequest.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewAPI.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/NewApiRes.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,11 +1,26 @@
<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.6242be7109c740c6cb8999a8904b6e0ea8d45192" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" />
  <MonoDevelop.Ide.Workbench>
    <Files>
      <File FileName="HDL_ON/DAL/DriverLayer/Control_Udp.cs" Line="1124" Column="21" IsPinned="True" />
      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="258" Column="59" />
      <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" Line="30" Column="16" />
      <File FileName="HDL_ON/DAL/DriverLayer/UdpSocket.cs" Line="56" Column="14" />
      <File FileName="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs" Line="467" Column="19" />
      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1209" Column="45" />
      <File FileName="HDL_ON/DAL/Server/NewApiRes.cs" Line="1122" Column="30" />
      <File FileName="HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs" Line="38" Column="33" />
    </Files>
    <Pads>
      <Pad Id="ProjectPad">
        <State name="__root__">
          <Node name="HDL_APP_Project" expanded="True">
            <Node name="HDL-ON_iOS" selected="True" />
            <Node name="HDL-ON_Android" expanded="True">
              <Node name="References" expanded="True">
                <Node name="Shared.Droid" selected="True" />
              </Node>
              <Node name="Packages" expanded="True" />
            </Node>
          </Node>
        </State>
      </Pad>
@@ -16,25 +31,12 @@
    <String>Shared.IOS.TBL/Shared.IOS.TBL.csproj</String>
    <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
    <String>Shared.IOS/Shared.IOS.csproj</String>
    <String>../Linphone/HDLLinphoneSDK_IOS/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK.csproj</String>
  </DisabledProjects>
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android AndroidDesignerPreferredDevice="Nexus 4" PreferredExecutionTarget="Android.Android_Accelerated_Oreo" />
  <MonoDevelop.Ide.DebuggingService.Breakpoints>
    <BreakpointStore>
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="431" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" line="758" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs" line="106" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" line="168" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="481" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="541" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="314" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/FunctionList.cs" relfile="HDL_ON/Entity/FunctionList.cs" line="492" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/FunctionList.cs" relfile="HDL_ON/Entity/FunctionList.cs" line="491" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" line="153" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/Function/Scene.cs" relfile="HDL_ON/Entity/Function/Scene.cs" line="338" column="1" />
      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="2144" column="1" />
    </BreakpointStore>
    <BreakpointStore />
  </MonoDevelop.Ide.DebuggingService.Breakpoints>
  <MultiItemStartupConfigurations />
</Properties>
HDL-ON_Android/Assets/Language.ini
@@ -1080,6 +1080,7 @@
9066=Remarks
9067=Remarks cannot be blank.
9068=Do you want to unbind?
9069=Property notice
    
10000=Invalid password, please log in again.
10001=Fail to request server, please try again later.
@@ -2178,6 +2179,7 @@
9066=备注
9067=备注不能为空
9068=是否解除绑定?
9069=物业通知
 
10000=无效登录密钥,请重新登录!
10001=请求服务器失败,请稍后再试!
HDL-ON_iOS/Resources/Language.ini
@@ -1080,6 +1080,7 @@
9066=Remarks
9067=Remarks cannot be blank.
9068=Do you want to unbind?
9069=Property notice
    
10000=Invalid password, please log in again.
10001=Fail to request server, please try again later.
@@ -2178,6 +2179,7 @@
9066=备注
9067=备注不能为空
9068=是否解除绑定?
9069=物业通知
 
10000=无效登录密钥,请重新登录!
10001=请求服务器失败,请稍后再试!
HDL_ON/Common/Constant.cs
@@ -244,7 +244,11 @@
        /// <summary>
        /// 物业通知,待确认修改
        /// </summary>
        Property,
        IMOU_VISAAL,
        /// <summary>
        /// 物业通知
        /// </summary>
        Notice,
    }
    /// <summary>
HDL_ON/Common/R.cs
@@ -2883,7 +2883,10 @@
        /// 是否解除绑定?
        /// </summary>
        public const int DoYouWantToUnbind = 9068;
        /// <summary>
        /// 物业通知
        /// </summary>
        public const int Propertynotice = 9069;
        #region 网络请求响应错误提示信息
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1004,7 +1004,15 @@
                    deviceName = OnAppConfig.Instance.PhoneName,
                    deviceType = deviceType,
                    produce = isProduce,
                };
                mAddpushinfoObj.languageType = Utlis.GetPostLanguageType();
#if DEBUG
                //List<string> communityCodes = new List<string>();
                //communityCodes.Add("");
                //mAddpushinfoObj.communityCodes = communityCodes;
#endif
                //var mAddpushinfoJson = Newtonsoft.Json.JsonConvert.SerializeObject(mAddpushinfoObj);
                var mAddpushinfoJson = HttpUtil.GetSignRequestJson(mAddpushinfoObj);
@@ -1061,7 +1069,7 @@
            }
            else if (queryType == 4)
            {
                pushType = PushType.Property.ToString();
                pushType = PushType.Notice.ToString();
            }
            var requestJson = HttpUtil.GetSignRequestJson(new GetMessageListObj()
            {
@@ -1198,16 +1206,13 @@
        /// </summary>
        /// <param name="msgId"></param>
        /// <returns></returns>
        public bool PushSerivceDeleteMessage(string msgId)
        public bool PushSerivceDeleteMessage(PushMsgIdObj mPushMsgIdObj)
        {
            if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) return false;
            if (mPushMsgIdObj == null) return false;
            try
            {
                var requestJson = HttpUtil.GetSignRequestJson(new PushMsgIdObj()
                {
                    msgId = msgId
                });
                var requestJson = HttpUtil.GetSignRequestJson(mPushMsgIdObj);
                var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_Deletepushinfo, requestJson);
                if (revertObj.Code == StateCode.SUCCESS)
HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
        /// <summary>
        /// RegionMark
        /// </summary>
@@ -26,7 +26,7 @@
        /// <summary>
        /// 请求超时时间
        /// </summary>
        public const int TIME_OUT = 10;
        public const int TIME_OUT = 15;
        /// <summary>
        /// 特殊接口请求超时时间
        /// </summary>
@@ -50,7 +50,7 @@
        /// <param name="replaceToken"></param>
        /// <param name="mTimeout"></param>
        /// <returns></returns>
        public static ResponsePackNew RequestHttpsGet(string apiPath, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
        public static ResponsePackNew RequestHttpsGet(string apiPath, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
        {
            return RequestHttps(Method.GET, apiPath, null, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
        }
@@ -67,7 +67,7 @@
        ///// <param name="mTimeout">请求超时时间,默认10</param>
        ///// <param name="urlHead"></param>
        ///// <returns></returns>
        //public static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10, bool needErrorTip = true)
        //public static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT, bool needErrorTip = true)
        //{
        //    var mResponsePackNew = RequestHttps(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
        //    if (needErrorTip)
@@ -90,7 +90,7 @@
        /// <param name="bodyParameterJson"></param>
        /// <param name="mTimeout"></param>
        /// <returns></returns>
        public static ResponsePackNew RequestHttpsPostFroHome(string apiPath, string bodyParameterJson, int mTimeout = 10)
        public static ResponsePackNew RequestHttpsPostFroHome(string apiPath, string bodyParameterJson, int mTimeout = TIME_OUT)
        {
            string urlHead = DB_ResidenceData.Instance.CurrentRegion.regionUrl;
            //var replaceToken = "";
@@ -111,7 +111,7 @@
        /// <param name="replaceToken"></param>
        /// <param name="mTimeout"></param>
        /// <returns></returns>
        public static ResponsePackNew RequestHttpsPost(string apiPath, string bodyParameterJson, string urlHead = "", string replaceToken = "", int mTimeout = 10)
        public static ResponsePackNew RequestHttpsPost(string apiPath, string bodyParameterJson, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
        {
            return RequestHttps(Method.POST, apiPath, bodyParameterJson, null, null, urlHead, replaceToken, mTimeout);
        }
@@ -126,7 +126,7 @@
        /// <param name="replaceToken"></param>
        /// <param name="mTimeout"></param>
        /// <returns></returns>
        public static ResponsePackNew RequestHttpsPost(string apiPath, Dictionary<string, object> queryDictionary, string urlHead = "", string replaceToken = "", int mTimeout = 10)
        public static ResponsePackNew RequestHttpsPost(string apiPath, Dictionary<string, object> queryDictionary, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
        {
            return RequestHttps(Method.POST, apiPath, null, queryDictionary, null, urlHead, replaceToken, mTimeout);
        }
@@ -143,7 +143,7 @@
        /// <param name="replaceToken"></param>
        /// <param name="mTimeout"></param>
        /// <returns></returns>
        static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
        static ResponsePackNew RequestHttpsBase(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
        {
            //Dome模式登录
@@ -258,7 +258,7 @@
        /// <param name="replaceToken"></param>
        /// <param name="mTimeout"></param>
        /// <returns></returns>
        public static ResponsePackNew RequestHttps(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
        public static ResponsePackNew RequestHttps(Method method, string apiPath, string bodyParameterJson = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
        {
            var responsePackNew = RequestHttpsBase(method, apiPath, bodyParameterJson, queryDictionary, urlSegmentDictionary, urlHead, replaceToken, mTimeout);
            //*****************Token过期处理*****************
@@ -383,7 +383,7 @@
        /// <param name="replaceToken"></param>
        /// <param name="mTimeout"></param>
        /// <returns></returns>
        public static ResponsePackNew RequestHttpsUpload(Method method, string apiPath, object bodyParameterObject = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = 10)
        public static ResponsePackNew RequestHttpsUpload(Method method, string apiPath, object bodyParameterObject = null, Dictionary<string, object> queryDictionary = null, Dictionary<string, object> urlSegmentDictionary = null, string urlHead = "", string replaceToken = "", int mTimeout = TIME_OUT)
        {
            #region HttpWebRequest
            try
HDL_ON/DAL/Server/NewAPI.cs
@@ -276,14 +276,28 @@
        #endregion
        #region ■ PushSerivce -- 推送服务接口___________________________
        /// <summary>
        /// 添加推送Token
        /// 注册推送接口
        /// 批量推送绑定家居社区接口
        /// 2021-09-09 对接新接口支持物业公告推送
        /// communityCodes 不传 默认所有住宅或者小区都收到推送
        /// </summary>
        public const string API_POST_PushSerivce_AddToken = "/smart-footstone/app/push-information/add";
        public const string API_POST_PushSerivce_AddToken = "/smart-footstone/app/push-information/addPushToken";
        /// <summary>
        /// 删除推送Token
        /// 注销推送接口
        /// 批量解绑家居社区
        /// 2021-09-09 对接新接口支持物业公告推送
        /// </summary>
        public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/delete";
        public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/unBindPushToken";
        ///// <summary>
        ///// 添加推送Token
        ///// </summary>
        //public const string API_POST_PushSerivce_AddToken = "/smart-footstone/app/push-information/add";
        ///// <summary>
        ///// 删除推送Token
        ///// </summary>
        //public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/delete";
        ///// <summary>
        /////// 获取推送消息记录
        /////// </summary>
HDL_ON/DAL/Server/NewApiRes.cs
@@ -1067,6 +1067,15 @@
        /// 软件来源,Evoyo、ON、ON_Plus
        /// </summary>
        public string software = SoftwareType.ON_Plus.ToString();
        /// <summary>
        /// 小区codes(不传,默认绑定所有住宅和小区的推送)
        /// </summary>
        public List<string> communityCodes;
        /// <summary>
        /// 指定推送语言 (目前该参数还没用)
        /// 2021-09-13 增加当前APP使用的语言参数, 目前云端接口还没支持
        /// </summary>
        public string languageType;
    }
    /// <summary>
@@ -1116,6 +1125,10 @@
        /// 消息记录Id
        /// </summary>
        public string msgId;
        /// <summary>
        /// 删除物业公告要这个
        /// </summary>
        public string pushType;
    }
HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
@@ -200,10 +200,11 @@
                X = systemMenuButton.Right,
                Y = Application.GetRealWidth(16),
            };
            //menuView.AddChidren(propertyMenuButton); //先屏蔽
            menuView.AddChidren(propertyMenuButton); //先屏蔽
            propertyMenuButton.ImageButton.SelectedImagePath = "Collection/MesCenter/SystemOn.png";
            propertyMenuButton.ImageButton.UnSelectedImagePath = "Collection/MesCenter/System.png";
            propertyMenuButton.TextButton.TextID = StringId.SystemMessage;
            propertyMenuButton.TextButton.TextID = StringId.Propertynotice;
            propertyMenuButton.TextButton.IsMoreLines = true;
            Action propertyAction = () =>
            {
                MenuButtonSelect(4);
@@ -212,11 +213,12 @@
            #endregion
            //先屏蔽
            ////右paddingView
            //menuView.AddChidren(new Button() {
            //    Width = Application.GetRealWidth(15),
            //    BackgroundColor = CSS_Color.viewTranslucence
            //});
            //右paddingView
            menuView.AddChidren(new Button()
            {
                Width = Application.GetRealWidth(15),
                BackgroundColor = CSS_Color.viewTranslucence
            });
        }
@@ -295,6 +297,8 @@
                propertyMenuButton.IsSelected = true;
            }
            menuView.ScrollToX(selectId * Application.GetRealWidth(40));
            GetPushMessageList(showMesType);
        }
@@ -447,7 +451,13 @@
            {
                try
                {
                    var result = new HttpServerRequest().PushSerivceDeleteMessage(pushMessageInfo.id);
                    var delPush = new PushMsgIdObj()
                    {
                        msgId = pushMessageInfo.id,
                        pushType = pushMessageInfo.pushType
                    };
                    var result = new HttpServerRequest().PushSerivceDeleteMessage(delPush);
                    if (result)
                    {
                        PushMessageInfoList.Remove(pushMessageInfo);
@@ -542,7 +552,8 @@
                        //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) {
                        if (mPushMesList != null)
                        {
                            PushMessageInfoList = mPushMesList.list;
                        }