更新伪静态文章栏目规则,生成伪静态页面分页代码

This commit is contained in:
2020-05-26 15:15:32 +08:00
parent 4f48e1dbaa
commit 92fb899d89
20 changed files with 287 additions and 122 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="NewLife.Core" Version="8.7.2020.403" />
<PackageReference Include="NewLife.Core" Version="8.7.2020.501" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="PinYinConverterCore" Version="1.0.2" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
+10 -9
View File
@@ -43,17 +43,11 @@ namespace COMCMS.Common
pageLink = url + "?" + strQueryString;
string currPage = MyHttpContext.Current.Request.Query["page"];
string id = MyHttpContext.Current.Request.Query["id"];
if (isRewrite == 5)
{
url = $"/{filepath}/index.html";
}
if (url == "memberdownloads.aspx" && isRewrite == 2)
{
string t = MyHttpContext.Current.Request.Query["t"];
if (string.IsNullOrEmpty(t) || !Utils.IsInt(t))
t = "1";
url = string.Format("memberdownloads-{0}.aspx", t);
}
switch (isRewrite)
{
@@ -71,8 +65,15 @@ namespace COMCMS.Common
pageLink = url.Replace(".", "-{0}.");
break;
case 3:
url = url.Replace(".aspx", ".html");//避免设置错之后出现问题
pageLink = url.Replace(".", "-{0}.");
if(url.EndsWith(".html") || url.EndsWith(".aspx"))
{
url = url.Replace(".aspx", ".html");//避免设置错之后出现问题
pageLink = url.Replace(".", "-{0}.");
}
else
{
pageLink = url + "?page={0}";
}
break;
case 5:
pageLink = url.Replace(".", "-{0}.");