// [MD5Sign(typeof(OrderChangAnHeXiaoInput))] //[MD5SignComm] public SurveyOutput GetSurvey([FromUri] wp_survey input, int pageIndex, int pageSize, int isGetQuestion = 0) { var ret = new SurveyOutput(); var list = new List <full_wp_survey>(); try { int count = 0; list = new Bll.WeChat.wp_surveybll().GetList(input, out count, isGetQuestion == 1, pageIndex, pageSize); ret.TotalCount = count; //ret.Data = list; } catch (Exception ex) { ret.IsSuccess = false; ret.Msg = "服务异常"; LogHandler.Error(ex); } ret.Data = JsonConvert.SerializeObject(list); return(ret); }
//public infolist() //{ // this.IsNeedUserInfo = false; //} protected void Page_Load(object sender, EventArgs e) { type = RequestHelper.GetQueryInt("type", 2); //type = type == 1 ? 2 : type; pageIndex = RequestHelper.GetQueryInt("pageIndex", 1); pageSize = RequestHelper.GetQueryInt("pageSize", 5000); pageSize = 5000; var article_type = RequestHelper.GetQueryInt("article_type", 0); if (article_type > 0) { type = 1; } if (type > 4 || type < 1) { type = 1; } typename = Common.EnumHelper.GetEnumDesc((InfoTypeEnum)type); int count = 0; string url = ""; switch ((InfoTypeEnum)type) { case InfoTypeEnum.文章列表: IsArticle = true; int type_id = RequestHelper.GetQueryInt("article_type", 5); count = 0; wp_article_new query = new wp_article_new(); query.type_id = type_id; var article_list = new Bll.WeChat.wp_article_newbll().GetList(query, out count, pageIndex, pageSize); list = list_info.Instance.GetFromArticle(article_list); url = $"{BaseClass.CurrentDomin}home/infodetail.aspx?id="; list_type = new Bll.WeChat.wp_article_type_newbll().GetList(); if (list_type != null && list_type.Count > 0) { list_type.ForEach(s => { s.url = $"{BaseClass.CurrentDomin}home/infolist.aspx?article_type={s.Id}&type={type}"; }); } break; case InfoTypeEnum.投票列表: var vote_list = new Bll.WeChat.wp_shop_votebll().GetList(new Model.WeiXin.wp_shop_vote(), out count, pageIndex, pageSize); list = list_info.Instance.GetFromShopVote(vote_list); if (list != null && list.Count > 0) { list.ForEach(s => { s.img = "/img/vote.jpg"; }); } url = $"{BaseClass.CurrentDomin}home/votelist.aspx?vote_id="; break; case InfoTypeEnum.活动列表: var reserve_list = new Bll.WeChat.wp_reservebll().GetList(new Model.WeiXin.wp_reserve(), out count, pageIndex, pageSize); list = list_info.Instance.GetFromReserve(reserve_list); url = $"{BaseClass.CurrentDomin}index.php?s=/w16/Reserve/Wap/index/reserve_id/"; break; case InfoTypeEnum.问卷列表: var survey_list = new Bll.WeChat.wp_surveybll().GetList(new Model.WeiXin.wp_survey(), out count, false, pageIndex, pageSize); list = list_info.Instance.GetFromSurvey(survey_list); url = $"{BaseClass.CurrentDomin}index.php?s=/w16/Survey/Wap/index/id/"; break; default: break; } IsData = list != null && list.Count > 0; if (IsData) { list.ForEach(s => { s.url = url + s.id; }); } }