コード例 #1
0
        public JsonResult SaveLogResult(string model)
        {
            string userId        = this.PKSUser.Identity.Id;
            var    searchHistory = JsonConvert.DeserializeObject <PKS_SearchHistory>(model);

            if (!string.IsNullOrEmpty(searchHistory.SourceWayEnum))
            {
                searchHistory.SourceTime  = DateTime.Now;
                searchHistory.ClientIP    = GetIp();
                searchHistory.BrowserName = Request.Browser.Type;
                searchHistory.UserId      = userId;
                _searchHistoryService.SaveClickLog(searchHistory, "false");
            }
            else
            {
                _searchHistoryService.SaveLoginLog(searchHistory, "false");
            }
            return(Json("", JsonRequestBehavior.AllowGet));
        }