/// <summary> /// 图片列表接口 /// </summary> /// <returns></returns> public void GetList(HttpContext context) { int pageIndex = GetInt("start"); int pageSize = GetInt("limit"); int sellerId = GetInt("sellerid"); PagResults <SourceMaterial> results = SourceMaterialHelper.GetPaging(pageIndex * pageSize, pageSize, sellerId); var data = new List <object>(); foreach (var r in results.Results) { var imgurl = Utility.GetSizePicUrl(r.Url, 200, 0, context); var d = new { pid = r.Id, img = imgurl, height = Utility.GetImgHeight(imgurl, context), title = r.Title }; r.Views += 1; SourceMaterialHelper.Update(r); data.Add(d); } JsonTransfer jt = new JsonTransfer(); jt.AddSuccessParam(); jt.Add("data", data); Response.Write(DesEncrypt(jt).ToLower()); Response.End(); }
/// <summary> /// 图片列表接口 /// </summary> /// <returns></returns> public void GetList() { int pageIndex = GetInt("start"); int pageSize = GetInt("limit"); int sellerId = GetInt("sellerid"); PagResults <SourceMaterial> data = SourceMaterialHelper.GetPaging(pageIndex * pageSize, pageSize, sellerId); JsonTransfer jt = new JsonTransfer(); jt.AddSuccessParam(); jt.Add("data", data); Response.Write(DesEncrypt(jt).ToLower()); Response.End(); }