public ResultCode Login(UserViewDto mLogin)
        {
            User mUser  = null;
            var  result = CheckLogin(mLogin, ref mUser);

            if (result != ResultCode.Success)
            {
                return(result);
            }

            var loginInfo = new LoginInfo()
            {
                UserId = mUser.Id, UserName = mUser.UserName, NickName = mUser.NickName
            };

            AddLoginInfo(loginInfo);//添加用户信息到cookie

            //记住我
            if (mLogin.IsRemember)
            {
                CookieHelper.SetCookie(CookieHelper.RememberMe, mLogin.UserName, DateTime.Now.AddMonths(3));
            }
            else
            {
                var rememberMe = CookieHelper.GetCookie(CookieHelper.RememberMe);
                if (rememberMe == null)
                {
                    CookieHelper.Expires(new[] { CookieHelper.RememberMe });
                }
            }

            return(result);
        }