Esempio n. 1
0
        public static ResMsg CheckLoginState(string loginIdentifer, bool isWaitMainLibInit)
        {
            if (loginIdentifer == null)
            {
                return(new ResMsg(false, "未登录"));
            }
            LoginUser loginUser = GlobalAppModule.GetLoginUser(loginIdentifer);

            if (loginUser == null)
            {
                return(new ResMsg(false, "未登录"));
            }
            if (loginUser.LoginTimeout)
            {
                return(new ResMsg(false, "登录超时"));
            }
            loginUser.LastOperateTime = DateTime.Now;
            if (isWaitMainLibInit)
            {
                WaitMainLibInit();
            }
            return(new ResMsg(true, loginUser.UserId.ToString()));
        }