Пример #1
0
        public ActionResult Index(string domain = "www.baidu.com", string date = "")
        {
            if (string.IsNullOrEmpty(domain))
            {
                domain = "www.baidu.com";
            }

            var currentDate = DateTime.Now.AddDays(-1);

            try
            {
                currentDate = DateTime.Parse(date);
            }
            catch { }

            var pageResult = _visitorService.GetVisitorLoyaltyListByDay(domain, DateTime.Parse(currentDate.ToString("yyyy-MM-dd")));

            ViewBag.Date       = currentDate.ToString("yyyy-MM-dd");
            ViewBag.SiteDomain = domain;
            ViewBag.AllDomain  = _domainService.GetAllList();

            return(View(pageResult));
        }