/// <summary> /// 文章对象转换为相册对象 /// </summary> public AlbumModel GetAlbum(blog_varticle varticle) { AlbumModel album = new AlbumModel(); AlbumImageModel cover = new AlbumImageModel(); if (varticle != null) { album.Id = varticle.id; album.ImageList = GetAlbumImageList(varticle.content, out cover); album.Cover = cover; album.Title = varticle.title; album.ReName = varticle.rename; album.Description = Utils.RemoveHtml(varticle.summary); album.ImgCount = album.ImageList.Count(); album.CommentCount = varticle.subcount; album.ViewCount = varticle.viewcount; album.AlbumPath = GetCategoryPathUrl2(varticle.catepath); album.AlbumCategory = GetCategoryByID(varticle.cateid).CateName; album.Createdate = varticle.createdate; album.Favor = varticle.favor; album.Against = varticle.against; album.Url = varticle.url; } return album; }
/// <summary> /// album页面url /// </summary> public static string YQUrl(this HtmlHelper helper, AlbumModel album) { return WebUtils.GetYQUrl(album.Url, 4); }