public async Task <JsonResult> CheckLogin(LoginUser loginUser, string url)
        {
            var message = "";
            var status  = false;

            try
            {
                var checkUser = _userService.CheckLogin(loginUser.Username.Trim(), loginUser.Password.Trim(), UserRole.Customer);
                if (checkUser != null)
                {
                    if (!checkUser.Role.Equals(UserRole.Customer))
                    {
                        return(Json(new { status = false }));
                    }
                    if (checkUser.Status == Status.Inactive)
                    {
                        message = "Account locked";
                    }
                    else if (checkUser.ActiveMail != null && checkUser.Status == Status.Inactive)
                    {
                        message = "Account is not verify email!";
                    }
                    else
                    {
                        UserLoginCookie loginCookie = new UserLoginCookie();
                        loginCookie.Username     = checkUser.Username;
                        loginCookie.CustomerName = checkUser.Customer.CustomerName;
                        var cookie = CookieHelper.Create(AppSettingConstant.LoginCookieCustomer, Server.UrlEncode(JsonConvert.SerializeObject(loginCookie, Formatting.Indented)), DateTime.Now.AddDays(1));
                        Response.Cookies.Add(cookie);
                        UserSession userSession = new UserSession(checkUser.Username, checkUser.Role);
                        SessionHelper.SetSession(userSession, AppSettingConstant.LoginSessionCustomer);
                        SessionHelper.SetSession(userSession.Username, AppSettingConstant.NotifiSession);
                        checkUser.LastOnline = DateTime.Now;
                        await _userService.UpdateAsync(checkUser, checkUser.Username);

                        status = true;
                    }
                }
                else
                {
                    message = "Username password incorrect!";
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            return(Json(new { status = status, message, url = url }, JsonRequestBehavior.AllowGet));
        }
        /// <summary>
        /// 追加内容到cookie
        /// </summary>
        /// <param name="value"></param>
        private void AddAccountTokenToCookie(string value)
        {
            HttpCookie _cookie = CookieHelper.Create("AccountToken", value);

            Response.Cookies.Add(_cookie);
        }