解决方法,DAL-->Module-->ArticleDAL.cs
增加下面的红色代码
public virtual void CreateContent(string _ChannelId, string _ContentId, int _CurrentPage)
{
using (DbOperHandler _doh = new Common().Doh())
{
_doh.Reset();
_doh.SqlCmd = "SELECT [Content],[FirstPage] FROM [jcms_module_article] WHERE [ChannelId]=" + _ChannelId + " and [Id]=" + _ContentId;
DataTable dtContent = _doh.GetDataTable();
string ArticleContent = dtContent.Rows[0]["Content"].ToString();
string ContentFirstPage = dtContent.Rows[0]["FirstPage"].ToString();
dtContent.Clear();
dtContent.Dispose();
if (ArticleContent != "")
{
int pageCount = 1;
//处理文章内容分页
if (ArticleContent.Contains("[Jumbot_PageBreak]"))
{
string[] ContentArr = ArticleContent.Split(new string[] { "[Jumbot_PageBreak]" }, StringSplitOptions.RemoveEmptyEntries);
pageCount = ContentArr.Length;
}
if (ContentFirstPage.Length == 0)
{
_doh.Reset();
_doh.SqlCmd = "UPDATE [jcms_module_article] SET [FirstPage]='" + Go2View(1, true, _ChannelId, _ContentId, false) + "' WHERE [ChannelId]=" + _ChannelId + " and [IsPass]=1 and [Id]=" + _ContentId;
_doh.ExecuteSqlNonQuery();
}
//weiyezh
if (ContentFirstPage.StartsWith("http://") || ContentFirstPage.StartsWith("https://"))
return;
//weiyezh
for (int j = 1; j < (pageCount + 1); j++)
{
JumboTCMS.Utils.DirFile.SaveFile(GetContent(_ChannelId, _ContentId, j), Go2View(j, true, _ChannelId, _ContentId, true));
}
}
}
}