/// <summary> /// 加载常用标签 /// </summary> /// <returns></returns> string LoadCommonTags() { string tagA = "<a href=\"javascript:addTag('{0}')\" title=\"为文章添加标签 {0}?\" >{0}</a> "; StringBuilder sb = new StringBuilder(); List <Tags> tagsList = TagsHelper.GetTags(1, 10); if (tagsList != null) { List <string> tags = new List <string>(); foreach (Tags tag in tagsList) { sb.AppendLine(string.Format(tagA, tag.Identifier)); } } return(sb.ToString()); }
string GetTags() { int pageIndex = We7Request.GetInt("pi", 1); int pageSize = We7Request.GetInt("ps", 10); List <Tags> list = TagsHelper.GetTags(pageIndex, pageSize); if (list != null && list.Count > 0) { string json = JavaScriptConvert.SerializeObject(list).Replace("null", "\"\""); return("{\"success\":true,\"msg\":\"操作成功!\",\"Data\":" + json + "}"); } else { return("{\"success\":true,\"msg\":\"无数据!\"}"); } }