增加文章栏目伪静态规则1

This commit is contained in:
comm5v8
2019-05-25 17:26:40 +08:00
parent 34fdb431d4
commit 993de032b9
9 changed files with 206 additions and 34 deletions
+29
View File
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using COMCMS.Core;
using COMCMS.Common;
using XCode;
namespace COMCMS.Web.Common
{
/// <summary>
/// 识图方法
/// </summary>
public class ViewsHelper
{
#region 获取分类链接
public static string EchoURL(ArticleCategory model)
{
if (model == null)
return "";
if (!string.IsNullOrEmpty(model.FilePath))
return model.FilePath + "/index.html";
else
return $"/article/index/{model.Id}";
}
#endregion
}
}