陈嘉乐
2021-01-27 122dc4312c72b2d2aaa50a2adf84165f5600b99a
HDL_ON/Common/HDLCommon.cs
@@ -258,11 +258,11 @@
                {
                    Shared.Application.RunOnMainThread(() =>
                    {
                        //账号在别处登陆,被踢下线 跳转到登录页面
                        new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
                        ////账号在别处登陆,被踢下线 跳转到登录页面
                        //new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
                        //退出登录操作
                        CheckLogout();
                    });
                    return;
                }
@@ -290,6 +290,8 @@
        }
        /// <summary>
        /// 账号在别处登陆,被踢下线 跳转到登录页面
        /// 要在主线程调用
        /// 退出登录操作
        /// </summary>
        public void CheckLogout()
@@ -297,9 +299,12 @@
            //未登录不用处理
            if (!UserInfo.Current.IsLogin) return;
#if DEBUG
            //账号在别处登陆,被踢下线 跳转到登录页面
            new Alert(Language.StringByID(StringId.Tip), Language.StringByID(StringId.LoggedOnOtherDevices), Language.StringByID(StringId.Close)).Show();
//#if DEBUG
            return;
#endif
//#endif
            Logout();
        }
@@ -450,9 +455,16 @@
            //网络状态变化 重置网关状态重新搜索
            Control.Ins.GatewayOnline = false;
            //网络变化,断开重连一次
            if (Control.Ins.IsRemote)
            {
                Control.Ins.IsRemote = false;
                DAL.Mqtt.MqttClient.DisConnectRemote("UpdateInternetStatus", false);
            }
            if (internetStatus == 0)//没有网络连接 0
            {
                //Control.Ins.GatewayOnline = false;
                Control.Ins.GatewayOnline = false;
                Control.Ins.IsRemote = false;
                MainPage.InternetStatus = 0;
            }