From 12bda302564e919a0ba8157957df3d2ee7382909 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 14 九月 2021 15:27:51 +0800 Subject: [PATCH] 2021-09-14 1.增加物业公告推送对接 --- HDL-ON_iOS/Resources/Language.ini | 2 HDL_ON/DAL/Server/NewAPI.cs | 22 ++++- HDL_ON/Common/Constant.cs | 6 + HDL_ON/DAL/Server/NewApiRes.cs | 13 +++ HDL-ON_Android/Assets/Language.ini | 2 HDL_ON/DAL/Server/HttpUtil.cs | 22 ++-- HDL_ON/Common/R.cs | 5 + HDL_ON/DAL/Server/HttpServerRequest.cs | 73 +++++++++-------- .vs/HDL_APP_Project/xs/UserPrefs.xml | 40 +++++---- HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs | 47 +++++++---- 10 files changed, 144 insertions(+), 88 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 7d46711..c00177e 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.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> \ No newline at end of file diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 5bbb86e..ee0462f 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/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=鏄惁瑙i櫎缁戝畾锛� +9069=鐗╀笟閫氱煡 10000=鏃犳晥鐧诲綍瀵嗛挜锛岃閲嶆柊鐧诲綍锛� 10001=璇锋眰鏈嶅姟鍣ㄥけ璐ワ紝璇风◢鍚庡啀璇曪紒 diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 5bbb86e..ee0462f 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/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=鏄惁瑙i櫎缁戝畾锛� +9069=鐗╀笟閫氱煡 10000=鏃犳晥鐧诲綍瀵嗛挜锛岃閲嶆柊鐧诲綍锛� 10001=璇锋眰鏈嶅姟鍣ㄥけ璐ワ紝璇风◢鍚庡啀璇曪紒 diff --git a/HDL_ON/Common/Constant.cs b/HDL_ON/Common/Constant.cs index 06fb199..d4080b3 100644 --- a/HDL_ON/Common/Constant.cs +++ b/HDL_ON/Common/Constant.cs @@ -244,7 +244,11 @@ /// <summary> /// 鐗╀笟閫氱煡锛屽緟纭淇敼 /// </summary> - Property, + IMOU_VISAAL, + /// <summary> + /// 鐗╀笟閫氱煡 + /// </summary> + Notice, } /// <summary> diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index 3eef3cc..cc085bf 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -2883,7 +2883,10 @@ /// 鏄惁瑙i櫎缁戝畾锛� /// </summary> public const int DoYouWantToUnbind = 9068; - + /// <summary> + /// 鐗╀笟閫氱煡 + /// </summary> + public const int Propertynotice = 9069; #region 缃戠粶璇锋眰鍝嶅簲閿欒鎻愮ず淇℃伅 diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 32868bd..48f2b5f 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/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) @@ -1266,9 +1271,9 @@ { IsBackground = true }.Start(); } - #endregion +#endregion - #region 妫�娴嬫洿鏂� +#region 妫�娴嬫洿鏂� /// <summary> /// /// </summary> @@ -1286,9 +1291,9 @@ - #endregion +#endregion - #region 鑾峰彇澶╂皵閮ㄥ垎 +#region 鑾峰彇澶╂皵閮ㄥ垎 /// <summary> /// 鑾峰彇鎸囧畾缁忕含搴︾殑鍩庡競淇℃伅 /// </summary> @@ -1356,10 +1361,10 @@ }); } - #endregion +#endregion - #region 澶囦唤閮ㄥ垎 +#region 澶囦唤閮ㄥ垎 ///// <summary> ///// 鑾峰彇浣忓畢澶囦唤鍒楄〃 ///// </summary> @@ -1405,11 +1410,11 @@ var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(d); var revertObj = RequestHttps("https://developer.hdlcontrol.com/api/UserBackupList", requestJson, true); var jt = Newtonsoft.Json.JsonConvert.DeserializeObject<List<JObject>>(revertObj.ResponseData.ToString()); - #region 鎭㈠鎴块棿鏁版嵁 +#region 鎭㈠鎴块棿鏁版嵁 GetBackupRoom(jt,loading); - #endregion +#endregion Application.RunOnMainThread(() => { loading.Hide(); @@ -1830,10 +1835,10 @@ } */ - #endregion +#endregion - #region Kaede --璁惧鍔熻兘鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� +#region Kaede --璁惧鍔熻兘鈥斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�斺�� /// <summary> /// 鑾峰彇璁惧鍒楄〃 /// </summary> @@ -2063,9 +2068,9 @@ return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectDevice, requestJson); } - #endregion +#endregion - #region Kaede --鍦烘櫙鍔熻兘-------------------------- +#region Kaede --鍦烘櫙鍔熻兘-------------------------- /// <summary> /// 鑾峰彇鍦烘櫙鍒楄〃 /// 鎴块棿ID鍙┖锛岄粯璁ゆ煡璇綇瀹呬笅鎵�鏈夋埧闂� @@ -2197,9 +2202,9 @@ var requestJson = HttpUtil.GetSignRequestJson(d); return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CancelCollectScene, requestJson).Code; } - #endregion +#endregion - #region Kaede --鎴块棿鍔熻兘-------------------------- +#region Kaede --鎴块棿鍔熻兘-------------------------- /// <summary> /// 鑾峰彇鎴块棿鍒楄〃 /// </summary> @@ -2274,10 +2279,10 @@ return pack; } - #endregion +#endregion - #region Kaede -- 瀹夐槻鎺ュ彛____________________________ +#region Kaede -- 瀹夐槻鎺ュ彛____________________________ /// <summary> /// 鑾峰彇瀹夐槻鍒楄〃 /// </summary> @@ -2441,10 +2446,10 @@ return pack; } - #endregion +#endregion - #region Kaede --绗笁鏂瑰搧鐗屽姛鑳�-------------------------- +#region Kaede --绗笁鏂瑰搧鐗屽姛鑳�-------------------------- /// <summary> /// 鑾峰彇绗笁鏂瑰搧鐗屽垪琛� /// </summary> @@ -2469,9 +2474,9 @@ return pack; } - #endregion +#endregion - #region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________ +#region 鈻� 钀ょ煶浜慡DK鐩稿叧鎺ュ彛_________________________ /// <summary> /// 娌充笢鑾峰彇钀ょ煶浜戝瓙璐﹀彿token鐨勬帴鍙� /// 2021-07-07 鏂版柟妗堟帴鍙h皟鏁村鎺� @@ -2484,10 +2489,10 @@ var requestJson = HttpUtil.GetSignRequestJson(d); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_EZ_GetChildToken, requestJson); } - #endregion +#endregion - #region 鈻� 鍙瀵硅_________________________ +#region 鈻� 鍙瀵硅_________________________ /// <summary> /// 妫�鏌ヤ綇瀹呮槸鍚︾粦瀹氫赴鏋� /// </summary> @@ -2500,9 +2505,9 @@ var pack = HttpUtil.RequestHttpsPostFroHome( NewAPI.API_POST_FL_Check, requestJson); return pack; } - #endregion +#endregion - #region 鈻� 闂ㄩ攣鐩稿叧____________________________ +#region 鈻� 闂ㄩ攣鐩稿叧____________________________ /// <summary> /// 鑾峰彇闂ㄩ攣鍘嗗彶璁板綍(鎸夋棩鏈熼檷搴�) @@ -2571,8 +2576,8 @@ return listSortLog; } - #endregion - #region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________ +#endregion +#region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________ /// <summary> /// 鑾峰彇宸叉巿鏉冪殑闊崇鍒楄〃 /// </summary> @@ -2636,7 +2641,7 @@ var requestJson = HttpUtil.GetSignRequestJson(updateSpeakerDeviceListObj); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Speaker_DeviceList_Update, requestJson); } - #endregion +#endregion /// <summary> diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 67c665d..cf4a06a 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -17,8 +17,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </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 diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs index e43aa25..0c9455e 100644 --- a/HDL_ON/DAL/Server/NewAPI.cs +++ b/HDL_ON/DAL/Server/NewAPI.cs @@ -276,14 +276,28 @@ #endregion #region 鈻� PushSerivce -- 鎺ㄩ�佹湇鍔℃帴鍙__________________________ + /// <summary> - /// 娣诲姞鎺ㄩ�乀oken + /// 娉ㄥ唽鎺ㄩ�佹帴鍙� + /// 鎵归噺鎺ㄩ�佺粦瀹氬灞呯ぞ鍖烘帴鍙� + /// 2021-09-09 瀵规帴鏂版帴鍙f敮鎸佺墿涓氬叕鍛婃帹閫� + /// 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> - /// 鍒犻櫎鎺ㄩ�乀oken + /// 娉ㄩ攢鎺ㄩ�佹帴鍙� + /// 鎵归噺瑙g粦瀹跺眳绀惧尯 + /// 2021-09-09 瀵规帴鏂版帴鍙f敮鎸佺墿涓氬叕鍛婃帹閫� /// </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> + ///// 娣诲姞鎺ㄩ�乀oken + ///// </summary> + //public const string API_POST_PushSerivce_AddToken = "/smart-footstone/app/push-information/add"; + ///// <summary> + ///// 鍒犻櫎鎺ㄩ�乀oken + ///// </summary> + //public const string API_POST_PushSerivce_DeleteToken = "/smart-footstone/app/push-information/delete"; ///// <summary> /////// 鑾峰彇鎺ㄩ�佹秷鎭褰� /////// </summary> diff --git a/HDL_ON/DAL/Server/NewApiRes.cs b/HDL_ON/DAL/Server/NewApiRes.cs index a5a3fc7..055a093 100644 --- a/HDL_ON/DAL/Server/NewApiRes.cs +++ b/HDL_ON/DAL/Server/NewApiRes.cs @@ -1067,6 +1067,15 @@ /// 杞欢鏉ユ簮锛孍voyo銆丱N銆丱N_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; } diff --git a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs index eb5f464..152714a 100644 --- a/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs @@ -140,7 +140,7 @@ #endif }; -#endregion + #endregion #region 鍒嗕韩涓庡姛鑳� shareMenuButton = new MenuButton() @@ -160,7 +160,7 @@ shareMenuButton.SelectAction = shateAction; #endregion -#region 鎶ヨ绫� + #region 鎶ヨ绫� alarmMenuButton = new MenuButton() { X = shareMenuButton.Right, @@ -175,9 +175,9 @@ MenuButtonSelect(2); }; alarmMenuButton.SelectAction = alarmAction; -#endregion + #endregion -#region 绯荤粺淇℃伅 + #region 绯荤粺淇℃伅 systemMenuButton = new MenuButton() { X = alarmMenuButton.Right, @@ -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 //鍏堝睆钄� - ////鍙硃addingView - //menuView.AddChidren(new Button() { - // Width = Application.GetRealWidth(15), - // BackgroundColor = CSS_Color.viewTranslucence - //}); + //鍙硃addingView + 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); } @@ -413,7 +417,7 @@ //btnTilte.MouseUpEventHandler = eventHandler; //btnSubtitle.MouseUpEventHandler = eventHandler; - + } /// <summary> @@ -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); @@ -512,7 +522,7 @@ void GetPushMessageList(int queryType = 0) { bodyScrolView.RemoveAll(); - if(PushMessageInfoList == null) + if (PushMessageInfoList == null) { PushMessageInfoList = new List<PushMessageInfo>(); } @@ -520,7 +530,7 @@ { PushMessageInfoList.Clear(); } - + YearMark = "";//鏍囪娓呯┖ if (string.IsNullOrEmpty(OnAppConfig.Instance.PushId)) { @@ -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; } @@ -613,7 +624,7 @@ } } -#region 娴嬭瘯 + #region 娴嬭瘯 #if DEBUG /// <summary> /// @@ -688,7 +699,7 @@ #endif -#endregion + #endregion /// <summary> /// 鏍囪鎵�鏈夋帹閫佹秷鎭凡璇� -- Gitblit v1.8.0