示例#1
0
        public JsonResult GetAdverLogo(decimal latitude, decimal longitude, int pageIndex, int pageSize)
        {
            JsonStateResult r      = new JsonStateResult();
            int             areaId = _service.GetAreaByPosition(latitude, longitude);
            int             count  = 0;
            var             list   = _service.GetUserByAreaId(out count, areaId: areaId, pageIndex: pageIndex, pageSize: pageSize);

            if (list != null && list.Count() > 0)
            {
                r.Data  = list.Where(l => l.Level == 0);
                r.Data2 = list.Where(l => l.Level == 1);
                if (pageSize > 50)
                {
                    r.Data4 = list.Where(t => string.IsNullOrEmpty(t.Company) == false).Select(t => t.Company);
                }
                else
                {
                    r.Data4 = _service.GetUserByAreaId(out count, areaId: areaId, pageIndex: 1, pageSize: 999).Where(t => string.IsNullOrEmpty(t.Company) == false).Select(t => t.Company);
                }
                r.Msg   = areaId.ToString();
                r.Error = 0;
            }
            r.Data3 = _service.GetBanner().Select(t => t.Url);

            return(Json(r));
        }
示例#2
0
        public JsonResult AjaxGetPropagandaBanner()
        {
            JsonStateResult j    = new JsonStateResult();
            var             list = _propagandaUserService.GetBanner();

            if (list != null && list.Count() > 0)
            {
                j.Error = 0;
                j.Data  = list;
            }
            return(Json(j));
        }