.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,25 +1,17 @@ <Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008030-00014C392121802E" /> <MonoDevelop.Ide.Workbench> <MonoDevelop.Ide.Workbench ActiveDocument="HDL-ON_iOS/AppDelegate.cs"> <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" /> <File FileName="HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs" Line="346" Column="5" /> <File FileName="HDL-ON_iOS/Info.plist" /> <File FileName="HDL-ON_iOS/AppDelegate.cs" Line="303" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="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 name="HDL-ON_iOS" expanded="True"> <Node name="AppDelegate.cs" selected="True" /> </Node> </Node> </State> DLL/Shared.Droid.dllBinary files differ
DLL/Shared.Droid.xml
@@ -1311,6 +1311,11 @@ 点击弹起事件 </summary> </member> <member name="F:Shared.View.MouseUpOutsideEventHandler"> <summary> 点击弹起事件 UpOutside </summary> </member> <member name="F:Shared.View.MouseLongEventHandler"> <summary> 长按点击事件 @@ -4323,6 +4328,12 @@ 加载本地HTML </summary> </member> <member name="M:Shared.WebView.LoadHTMLString(System.String)"> <summary> 加载Html标签的富文本 </summary> <param name="htmlStr"></param> </member> <member name="T:Shared.WebView.MyWebViewClient"> <summary> MyWebViewClient DLL/Shared.IOS.dllBinary files differ
DLL/Shared.IOS.xml
@@ -1720,6 +1720,12 @@ 加载本地HTML </summary> </member> <member name="M:Shared.WebView.LoadHTMLString(System.String)"> <summary> 加载Html标签的富文本 </summary> <param name="htmlStr"></param> </member> <member name="T:Shared.WebView.OnWKNavigationDelegate"> <summary> OnWKNavigationDelegate HDL-ON_Android/Assets/Phone/Collection/MesCenter/Property.png
HDL-ON_Android/Assets/Phone/Collection/MesCenter/PropertyOn.png
HDL-ON_Android/HDL-ON_Android.csproj
@@ -462,6 +462,8 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" /> <AndroidAsset Include="Assets\Phone\LogicIcon\security.png" /> <AndroidAsset Include="Assets\Phone\Collection\MesCenter\Property.png" /> <AndroidAsset Include="Assets\Phone\Collection\MesCenter\PropertyOn.png" /> </ItemGroup> <ItemGroup> <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" /> HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1353,6 +1353,8 @@ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\electricalbreaker_white.png" /> <BundleResource Include="Resources\Phone\LogicIcon\security.png" /> <BundleResource Include="Resources\Phone\Collection\MesCenter\Property.png" /> <BundleResource Include="Resources\Phone\Collection\MesCenter\PropertyOn.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> HDL-ON_iOS/Resources/Phone/Collection/MesCenter/Property.png
HDL-ON_iOS/Resources/Phone/Collection/MesCenter/PropertyOn.png
HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1271,6 +1271,18 @@ { IsBackground = true }.Start(); } /// <summary> /// 获取物业公告详情 /// </summary> /// <param name="noticeId"></param> /// <returns></returns> public ResponsePackNew GetPropertyNoticeDetails(string noticeId) { Dictionary<string, object> d = new Dictionary<string, object>(); d.Add("noticeId", noticeId); var requestJson = HttpUtil.GetSignRequestJson(d); return HttpUtil.RequestHttpsPost(NewAPI.API_POST_PushSerivce_GetNoticeInfo, requestJson); } #endregion #region 检测更新 HDL_ON/DAL/Server/NewAPI.cs
@@ -322,6 +322,11 @@ /// 通过主键id删除一条推送记录 /// </summary> public const string API_POST_PushSerivce_Deletepushinfo = "/smart-footstone/app/message/delete_by_id"; /// <summary> /// 获取物业公告详情 /// </summary> public const string API_POST_PushSerivce_GetNoticeInfo = "/community-footstone/app/notice/info"; #endregion #region ■ -- 检测更新接口___________________________ HDL_ON/UI/UI0-Public/Widget/WebViewDialog.cs
@@ -14,6 +14,10 @@ /// bodyView /// </summary> FrameLayout bodyView; /// <summary> /// mWebView /// </summary> public WebView mWebView; /// <summary> /// WebViewDialog @@ -26,28 +30,37 @@ /// <summary> /// 加载页面 /// </summary> /// <param name="titleStr"></param> /// <param name="url"></param> public void LoadPage(string titleStr, string url) void AddBodyViewWithTittle(string titleStr) { bodyView.BackgroundColor = CSS_Color.MainBackgroundColor; this.AddChidren(bodyView); new TopViewDiv(this, bodyView, titleStr).LoadTopView(); //WebView var webView = new WebView() { mWebView = new WebView() { Y = Application.GetRealHeight(64), Height = bodyView.Height - Application.GetRealHeight(64), X = Application.GetRealWidth(16), Width = bodyView.Width - Application.GetRealWidth(32) }; bodyView.AddChidren(webView); bodyView.AddChidren(mWebView); } /// <summary> /// 加载页面 /// </summary> /// <param name="titleStr"></param> /// <param name="url"></param> public void LoadPage(string titleStr, string url) { AddBodyViewWithTittle(titleStr); try { if (!string.IsNullOrEmpty(url)) { //加载网址 webView.LoadRequest(url); mWebView.LoadRequest(url); } } catch @@ -57,5 +70,34 @@ this.Show(); } /// <summary> /// 加载页面 /// html富文本 /// </summary> /// <param name="titleStr"></param> /// <param name="htmlStr"></param> public void LoadPageWithHtmlStr(string titleStr, string htmlStr) { AddBodyViewWithTittle(titleStr); try { if (!string.IsNullOrEmpty(htmlStr)) { //html富文本 mWebView.LoadHTMLString(htmlStr); } } catch { } this.Show(); } } } HDL_ON/UI/UI2/1-HomePage/MessageCenterPage.cs
@@ -194,15 +194,15 @@ systemMenuButton.SelectAction = systemAction; #endregion #region 物业通知 #region 物业通知 2021-09-15增加 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"; menuView.AddChidren(propertyMenuButton); propertyMenuButton.ImageButton.SelectedImagePath = "Collection/MesCenter/PropertyOn.png"; propertyMenuButton.ImageButton.UnSelectedImagePath = "Collection/MesCenter/Property.png"; propertyMenuButton.TextButton.TextID = StringId.Propertynotice; propertyMenuButton.TextButton.IsMoreLines = true; Action propertyAction = () => @@ -212,7 +212,6 @@ propertyMenuButton.SelectAction = propertyAction; #endregion //先屏蔽 //右paddingView menuView.AddChidren(new Button() { @@ -408,14 +407,15 @@ btnDatetime.Text = GetUnixToDateTime(pushMessageInfo.createTime); //2020-12-23 去掉点击弹窗事件 //EventHandler<MouseEventArgs> eventHandler = (sender, e) => //{ EventHandler<MouseEventArgs> eventHandler = (sender, e) => { OnClickPushMessageInfo(pushMessageInfo); // new Alert(pushMessageInfo.messageTitle, pushMessageInfo.messageContent, Language.StringByID(StringId.Close)).Show(); //}; //rowView.MouseUpEventHandler = eventHandler; //btnTilte.MouseUpEventHandler = eventHandler; //btnSubtitle.MouseUpEventHandler = eventHandler; }; rowView.MouseUpEventHandler = eventHandler; btnTilte.MouseUpEventHandler = eventHandler; btnSubtitle.MouseUpEventHandler = eventHandler; } @@ -624,6 +624,106 @@ } } /// <summary> /// 获取物业通知详情 /// </summary> /// <param name="noticeId"></param> void GetPropertyNoticeDetails(string noticeId) { var waitPage = new Loading(); bodyView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); new Thread(() => { try { var result = new HttpServerRequest().GetPropertyNoticeDetails(noticeId); if (result.Code == StateCode.SUCCESS) { var mPushNoticeInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<PushNoticeInfo>(result.Data.ToString()); if (mPushNoticeInfo != null) { Application.RunOnMainThread(() => { new WebViewDialog().LoadPageWithHtmlStr(mPushNoticeInfo.title, mPushNoticeInfo.content); }); } } } catch (Exception ex) { } finally { Application.RunOnMainThread(() => { if (waitPage != null) { waitPage.RemoveFromParent(); waitPage = null; } }); } }) { IsBackground = true }.Start(); } /// <summary> /// 通知信息点击事件 /// </summary> /// <param name="pushMessageInfo"></param> void OnClickPushMessageInfo(PushMessageInfo pushMessageInfo) { if (pushMessageInfo.pushType == PushType.Notice.ToString()) { //Utlis.WriteLine("物业通知"); string noticeId = GetNoticeId(pushMessageInfo.messageExpand); if (!string.IsNullOrEmpty(noticeId)) { GetPropertyNoticeDetails(noticeId); } else { Utlis.WriteLine("noticeId null"); } } else { Utlis.WriteLine("其它通知类型"); } } /// <summary> /// 解析messageExpand 提取targetId /// </summary> /// <param name="messageExpand"></param> /// <returns></returns> string GetNoticeId(string messageExpand) { try { if (!string.IsNullOrEmpty(messageExpand)) { var mMessageExpandInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<MessageExpandInfo>(messageExpand); if (mMessageExpandInfo != null) { var mExpantContentInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<ExpantContentInfo>(mMessageExpandInfo.expantContent); if(mExpantContentInfo != null) { return mExpantContentInfo.targetId; } } } return null; } catch { return null; } } #region 测试 #if DEBUG /// <summary> @@ -789,10 +889,10 @@ /// 消息内容 /// </summary> public string messageContent; ///// <summary> ///// 扩展数据 ///// </summary> //public string messageExpand; /// <summary> /// 扩展数据 /// </summary> public string messageExpand; ///// <summary> ///// 消息类型;0:提示;1:报警;2:丰林可是对讲呼叫;3:强制下线推送 ///// </summary> @@ -817,4 +917,56 @@ } /// <summary> /// 物业公告详情 /// </summary> [System.Serializable] public class PushNoticeInfo { /// <summary> /// 消息ID /// </summary> public string noticeId; /// <summary> /// 消息标题 /// </summary> public string title; /// <summary> /// 富文本内容 /// </summary> public string content; } /// <summary> /// 推送扩展信息 /// </summary> [System.Serializable] public class MessageExpandInfo { /// <summary> /// expantContent /// </summary> public string expantContent; } /// <summary> /// 推送扩展信息 /// </summary> [System.Serializable] public class ExpantContentInfo { /// <summary> /// targetId /// </summary> public string targetId; /// <summary> /// messageType /// </summary> public string messageType; } }