From 6659e35887736adeb1be8d2fde9e3631e4d47262 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 11:50:19 +0800 Subject: [PATCH] 完成住宅交付功能 --- HDL-ON_Android/HDL-ON_Android.csproj | 8 +++- HDL_ON/UI/BindingResidence/BindingResidencePage.cs | 21 ++++++++-- HDL-ON_iOS/Resources/Language.ini | 3 + HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs | 10 +++-- HDL-ON_iOS/HDL-ON_iOS.csproj | 27 ++----------- HDL_ON/UI/BindingResidence/WellcomToHomeForm.cs | 1 HDL_ON/DAL/Server/HttpServerRequest.cs | 5 ++ HDL-ON_iOS/Resources/Phone/ErrorIcon.png | 0 HDL_ON/UI/MainPage.cs | 45 +++++++++------------- 9 files changed, 59 insertions(+), 61 deletions(-) diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index 6d0da70..b4e0080 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -219,7 +219,9 @@ </Generator> </AndroidResource> </ItemGroup> - <ItemGroup /> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\LogicIcon\selected+.png" /> + </ItemGroup> <ItemGroup> <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" /> <PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" /> @@ -660,7 +662,6 @@ <AndroidAsset Include="Assets\Phone\LogicIcon\-.png" /> <AndroidAsset Include="Assets\Phone\LogicIcon\+.png" /> <AndroidAsset Include="Assets\Phone\LogicIcon\point.png" /> - <AndroidAsset Include="Assets\Phone\LogicIcon\ selected+.png" /> <AndroidAsset Include="Assets\Phone\LogicIcon\selected-.png" /> <AndroidAsset Include="Assets\Phone\LogicIcon\link.png" /> <AndroidAsset Include="Assets\Phone\LogicIcon\selectTheFun.png" /> @@ -679,6 +680,9 @@ <ItemGroup> <AndroidAsset Include="Assets\Phone\RoomListBg.png" /> </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\ErrorIcon.png" /> + </ItemGroup> <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index d3e03fb..3f19fec 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +锘�<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -253,29 +253,7 @@ </ImageAsset> </ItemGroup> <ItemGroup> - <Folder Include="Resources\" /> - <Folder Include="Resources\Phone\" /> <Folder Include="Assets.xcassets\LaunchImage.launchimage\" /> - <Folder Include="Resources\Phone\Public\" /> - <Folder Include="Resources\Phone\PersonalCenter\" /> - <Folder Include="Resources\Phone\Navigation\" /> - <Folder Include="Resources\Phone\PersonalCenter\PersonalData\" /> - <Folder Include="Resources\Phone\Classification\" /> - <Folder Include="Resources\Phone\Classification\Room\" /> - <Folder Include="Resources\Phone\Collection\" /> - <Folder Include="Resources\Phone\Public\DeviceInfoIcon\" /> - <Folder Include="Resources\Phone\FunctionIcon\" /> - <Folder Include="Resources\Phone\FunctionIcon\Scene\" /> - <Folder Include="Resources\Phone\Public\MsgIcon\" /> - <Folder Include="Resources\Phone\PersonalCenter\AppUnlockSetting\" /> - <Folder Include="Resources\Phone\FunctionIcon\Electrical\" /> - <Folder Include="Resources\Phone\FunctionIcon\Socket\" /> - <Folder Include="Resources\Phone\FunctionIcon\EnvironmentalScience\" /> - <Folder Include="Resources\Phone\Public\AirIcon\" /> - <Folder Include="Resources\Phone\PersonalCenter\ResetPassword\" /> - <Folder Include="Resources\Phone\Intelligence\Gallery\" /> - <Folder Include="Resources\Phone\FunctionIcon\DeviceIcon\" /> - <Folder Include="Other\" /> </ItemGroup> <ItemGroup> <InterfaceDefinition Include="LaunchScreen.storyboard" /> @@ -728,6 +706,9 @@ <ITunesArtwork Include="iTunesArtwork" /> <ITunesArtwork Include="iTunesArtwork%402x" /> </ItemGroup> + <ItemGroup> + <BundleResource Include="Resources\Phone\ErrorIcon.png" /> + </ItemGroup> <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> </Project> \ No newline at end of file diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 0c26a51..eb71aaa 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -395,6 +395,9 @@ 373=娣诲姞妤煎眰澶辫触銆� 374=浣忓畢鏁版嵁宸茶鍒犻櫎锛孉PP灏嗚嚜鍔ㄥ垏鎹㈠埌鍙︿竴浣忓畢銆� 375=缃戝叧鏈繛鎺ユ湇鍔″櫒锛屾棤娉曞垱寤哄満鏅�� +376=娆㈣繋鍥炲 +377=浜岀淮鐮佸け鏁堬紝璇烽噸璇� +378=閲嶈瘯 5000=闊充箰 5001=缁勫悎 diff --git a/HDL-ON_iOS/Resources/Phone/ErrorIcon.png b/HDL-ON_iOS/Resources/Phone/ErrorIcon.png new file mode 100644 index 0000000..e917933 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/ErrorIcon.png Binary files differ diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 66f61fc..a1a4a83 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -135,6 +135,11 @@ { try { + if (strUrl.Contains("app/home/deliver") == false) + { + //闈炴硶鐨刄RL 杩斿洖涓�涓嚜瀹氫箟鐨勭姸鎬佺爜 + return new ResponsePackNew() { Code = "-100" }; + } var client = new RestSharp.RestClient(strUrl); var request = new RestSharp.RestRequest(RestSharp.Method.GET); diff --git a/HDL_ON/UI/BindingResidence/BindingResidencePage.cs b/HDL_ON/UI/BindingResidence/BindingResidencePage.cs index 9c47c9b..92e3bfe 100644 --- a/HDL_ON/UI/BindingResidence/BindingResidencePage.cs +++ b/HDL_ON/UI/BindingResidence/BindingResidencePage.cs @@ -124,11 +124,21 @@ if (result.Code == DAL.Server.StateCode.SUCCESS) { + //璋冪敤On鍘熸潵鐨勬柟娉�,鍒锋柊浣忓畢鍒楄〃鍙婂叾缂撳瓨 + pm.GetHomePager(); //璺宠浆椤甸潰---- - MainPage.GoUserPage(); - //鏄剧ず娆㈣繋鍥炲鐨勫脊绐楃晫闈� - var form = new WellcomToHomeForm(); - form.ShowForm(); + MainPage.GoUserPage(false, () => + { + //鏄剧ず娆㈣繋鍥炲鐨勫脊绐楃晫闈� + var form = new WellcomToHomeForm(); + form.ShowForm(); + }); + } + //鍏朵粬鎯呭喌鍏ㄩ儴鎻愮ず澶辨晥 + else + { + //鏄剧ず浜岀淮鐮佸凡缁忚繃鏈熺殑寮圭獥 + this.ShowQrCodeTimeOutView(); } } @@ -139,6 +149,7 @@ { //鏁翠釜鐣岄潰鐨勭伆鑹茶儗鏅� var frameBack = new Dialog(); + frameBack.Show(); //涓棿鐧借壊鍖哄煙 var frameWite = new FrameLayout(); @@ -156,7 +167,7 @@ picIcon.Height = Application.GetRealWidth(160); picIcon.Width = Application.GetRealWidth(160); picIcon.Gravity = Gravity.CenterHorizontal; - picIcon.UnSelectedImagePath = "oRobot.png"; + picIcon.UnSelectedImagePath = "ErrorIcon.png"; frameBack.AddChidren(picIcon); //浜岀淮鐮佸け鏁堬紝璇烽噸璇� diff --git a/HDL_ON/UI/BindingResidence/WellcomToHomeForm.cs b/HDL_ON/UI/BindingResidence/WellcomToHomeForm.cs index 187c6d5..a6e0426 100644 --- a/HDL_ON/UI/BindingResidence/WellcomToHomeForm.cs +++ b/HDL_ON/UI/BindingResidence/WellcomToHomeForm.cs @@ -18,6 +18,7 @@ { //鏁翠釜鐣岄潰鐨勭伆鑹茶儗鏅� var frameBack = new Dialog(); + frameBack.Show(); //涓棿鐧借壊鍖哄煙 var frameWite = new FrameLayout(); diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index 51f1f50..eb169f9 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -147,42 +147,30 @@ /// 杩涘叆涓婚〉 /// </summary> /// <param name="isFirstOpen">濡傛灉鏄涓�娆″惎鍔� 妫�娴嬫牎楠屽瘑鐮�</param> - public static void GoUserPage(bool isFirstOpen = false) + /// <param name="pageShowEvent">涓婚〉鏄剧ず涔嬪悗瑙﹀彂鐨勪簨浠�(娌℃湁浣忓畢鐨勮瘽,鍒欎笉浼氳Е鍙�)</param> + public static void GoUserPage(bool isFirstOpen = false, Action pageShowEvent = null) { //鍔犺浇Loading鏁堟灉 var waitPage = new Loading(); BaseView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); + + //褰撴病鏈変綇瀹呮椂,涓嶈兘璁╁畠寰�涓嬭蛋 + if (UserInfo.Current.regionList.Count == 0) + { + waitPage.Hide(); + var addResidencePage = new BindingResidencePage(); + BaseView.AddChidren(addResidencePage); + addResidencePage.LoadView(); + return; + } + new System.Threading.Thread(() => { try { - if (UserInfo.Current.regionList.Count == 0) - { - bool loadPage = true; - var pm = new DAL.Server.HttpServerRequest(); - while (UserInfo.Current.regionList.Count == 0) - { - pm.GetHomePager();//鍒锋柊浣忓畢淇℃伅 - System.Threading.Thread.Sleep(2000); - if (loadPage) - { - loadPage = false; - Application.RunOnMainThread(() => - { - waitPage.Hide(); - var addResidencePage = new BindingResidencePage(); - BaseView.AddChidren(addResidencePage); - addResidencePage.LoadView(); - }); - } - } - } - else - { - Entity.FunctionList.List.Clear(); - Entity.SpatialInfo.CurrentSpatial.Clear(); - } + Entity.FunctionList.List.Clear(); + Entity.SpatialInfo.CurrentSpatial.Clear(); ///绛夊緟鑾峰彇浣忓畢淇℃伅 Application.RunOnMainThread(() => { @@ -224,6 +212,9 @@ //鍚姩瀵嗙爜楠岃瘉 new AppUnlockPage().LoadPage(isFirstOpen); } + //涓婚〉鍔犺浇瀹屾垚,鍥炶皟浜嬩欢 + pageShowEvent?.Invoke(); + pageShowEvent = null; }); } catch (Exception ex) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs index 3a7283d..f5e52e8 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/MyQRCodePage.cs @@ -148,10 +148,12 @@ Application.RunOnMainThread(() => { //璺宠浆椤甸潰---- - MainPage.GoUserPage(); - //鏄剧ず娆㈣繋鍥炲鐨勫脊绐楃晫闈� - var form = new WellcomToHomeForm(); - form.ShowForm(); + MainPage.GoUserPage(false, () => + { + //鏄剧ず娆㈣繋鍥炲鐨勫脊绐楃晫闈� + var form = new WellcomToHomeForm(); + form.ShowForm(); + }); }); break; } -- Gitblit v1.8.0