wxr
2020-11-20 716d1b3b705e7d37e6edebd7f60b7613ab5aee87
HDL_ON/UI/MainPage.cs
@@ -14,7 +14,7 @@
        public static bool DisplayCompleted = false;
        public static UserInfo LoginUser;
        //public static UserInfo LoginUser;
        public static string VersionString = "1.0.0924";
@@ -71,12 +71,12 @@
                //BusSocket.Start();
                //CommonPage.InitReceiveEvent();
                LoginUser = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInfo>(System.Text.Encoding.UTF8.GetString(FileUtils.ReadFile("UserInfo_File")));
                //LoginUser = Newtonsoft.Json.JsonConvert.DeserializeObject<UserInfo>(System.Text.Encoding.UTF8.GetString(FileUtils.ReadFile("UserInfo_File")));
                //判断需不需要登录,有没有登录,或者登录是否过期,
                if (LoginUser == null || !LoginUser.IsLogin)
                if (UserInfo.Current == null || !UserInfo.Current.IsLogin)
                {
                    GoLoginPage(LoginUser);
                    GoLoginPage(UserInfo.Current);
                }
                else
                {
@@ -130,7 +130,7 @@
        /// <summary>
        /// 进入登录界面
        /// </summary>
        public static void GoLoginPage(UserInfo userInfo =null)
        public static void GoLoginPage(UserInfo userInfo = null)
        {
            BaseView.RemoveAll();
            BaseView.BackgroundColor = CSS_Color.BackgroundColor;
@@ -185,16 +185,6 @@
#endif
        }
        /// <summary>
        /// 弹窗提示
        /// </summary>
        /// <param name="mes"></param>
        public static void ShowAlertOnMainThread(string mes)
        {
            Application.RunOnMainThread(() => {
                new Alert("", mes, Language.StringByID(StringId.Close)).Show();
            });
        }
    }
}