From c5cb6840bd986bbd71a9ebc232bbf44ed0e1fc3d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 23 五月 2024 17:43:11 +0800
Subject: [PATCH] jpush更新完成

---
 HDL_ON/UI/UI2/UserPage.cs |   52 +++++++++++++++++++++++++++++-----------------------
 1 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/HDL_ON/UI/UI2/UserPage.cs b/HDL_ON/UI/UI2/UserPage.cs
index fc552fb..a1748ae 100644
--- a/HDL_ON/UI/UI2/UserPage.cs
+++ b/HDL_ON/UI/UI2/UserPage.cs
@@ -91,7 +91,8 @@
         {
             try
             {
-                bodyView = this;
+
+                bodyView = this;//1
                 bodyView.BackgroundColor = CSS_Color.MainBackgroundColor;
                 ContextView = new FrameLayout()
                 {
@@ -104,12 +105,10 @@
                 {
                     Y = Application.GetRealHeight(607),
                     Height = Application.GetMinRealAverage(60),
-                    //BackgroundColor = CSS_Color.BackgroundColor
                 };
                 bodyView.AddChidren(navigationView);
                 if (MainPage.Increase)
                 {
-                    //ContextView.Height = Application.GetRealHeight(618 + 20);
                     navigationView.Y = Application.GetRealHeight(597 + 5);
                     navigationView.Height = Application.GetRealHeight(70 - 5);
                 }
@@ -117,40 +116,46 @@
 
                 LoadEventList();
 
-                var homePage = new HomePage();
-                ContextView.AddChidren(homePage);
-                homePage.LoadPage();
+                //var homePage = new HomePage();
+                //ContextView.AddChidren(homePage);
+                //homePage.LoadPage();
 
                 if (!MainPage.NoLoginMode)
                 {
                     //娉ㄥ唽鎺ㄩ�両D
                     RegisteredPush();
+                    //2020-12-07 澧炲姞鐗堟湰妫�娴嬫洿鏂版柟娉�
+                    HDLCommon.Current.CheckIfNeedForceUpdate();
                 }
-                //2020-12-07 澧炲姞鐗堟湰妫�娴嬫洿鏂版柟娉�
-                HDLCommon.Current.CheckIfNeedForceUpdate();
-
 #if __Android__
                 //寮�鍚畾浣嶆湇鍔�
                 try
                 {
-                    Shared.Application.StartGPSLocationService();
-                }catch(Exception ex)
+                    if (DB_ResidenceData.Instance.CheckGPS_IsFirst)
+                    {
+                        DB_ResidenceData.Instance.CheckGPS_IsFirst = false;
+                       (Shared.Application.Activity as BaseActivity).CheckLocationPermission();
+                    }
+                        Shared.Application.StartGPSLocationService();
+
+                }
+                catch (Exception ex)
                 {
                     MainPage.Log("寮�鍚畾浣嶆湇鍔″紓甯�:" + ex.Message);
                 }
                 if (DB_ResidenceData.Instance.NeedTip) {
                     DB_ResidenceData.Instance.LastTipTime = DateTime.Now;
-                    if (CN.Jpush.Android.Api.JPushInterface.IsNotificationEnabled(Shared.Application.Activity) != 1)
-                    {
-                        Action action = () =>
-                        {
-                            CN.Jpush.Android.Api.JPushInterface.GoToAppNotificationSettings(Shared.Application.Activity);
-                        };
-                        Shared.Application.RunOnMainThread(() =>
-                        {
-                            new HDL_ON.UI.ConfirmDialog().ShowDialog(StringId.Tip, StringId.Android_MessagePushTip, action);
-                        });
-                    }
+                    //if (CN.Jpush.Android.Api.JPushInterface.IsNotificationEnabled(Shared.Application.Activity) != 1)
+                    //{
+                    //    Action action = () =>
+                    //    {
+                    //        CN.Jpush.Android.Api.JPushInterface.GoToAppNotificationSettings(Shared.Application.Activity);
+                    //    };
+                    //    Shared.Application.RunOnMainThread(() =>
+                    //    {
+                    //        new HDL_ON.UI.ConfirmDialog().ShowDialog(StringId.Tip, StringId.Android_MessagePushTip, action);
+                    //    });
+                    //}
                 }
 #endif
 
@@ -486,9 +491,10 @@
                 {
                     btnNavigationSelectionIcon.SetRotation(0f);
                     ContextView.RemoveAll();
-                    var classificaitionView = new ClassificationPage();
+                    var classificaitionView = new ClassificationPage(); 
                     ContextView.AddChidren(classificaitionView);
                     classificaitionView.LoadPage();
+                    
                 });
             })
             { IsBackground = true, Priority = System.Threading.ThreadPriority.Lowest }.Start();

--
Gitblit v1.8.0