Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
5b7e4fa2
Commit
5b7e4fa2
authored
Mar 06, 2019
by
sunxin
Browse files
方法优化
parent
c4ea16f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
5b7e4fa2
...
...
@@ -46,7 +46,7 @@ public class CmsParserUtil extends ParserUtil {
FileUtil
.
writeString
(
content
,
ParserUtil
.
buildHtmlPath
(
targetPath
),
Const
.
UTF8
);
// 生成移动页面
if
(
ParserUtil
.
i
sMobile
(
templatePath
))
{
if
(
ParserUtil
.
ha
sMobile
File
(
templatePath
))
{
// 手机端m
map
.
put
(
ParserUtil
.
MOBILE
,
BasicUtil
.
getApp
().
getAppMobileStyle
());
content
=
CmsParserUtil
.
generate
(
templatePath
,
map
,
true
);
...
...
@@ -128,7 +128,7 @@ public class CmsParserUtil extends ParserUtil {
FileUtil
.
writeString
(
tag
.
rendering
(),
columnListPath
,
Const
.
UTF8
);
// 判断是手机端生成还是pc端,防止重复生成
if
(
ParserUtil
.
i
sMobile
(
column
.
getColumnListUrl
()))
{
if
(
ParserUtil
.
ha
sMobile
File
(
column
.
getColumnListUrl
()))
{
writer
=
new
StringWriter
();
mobileTemplate
.
process
(
null
,
writer
);
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
...
...
@@ -232,7 +232,7 @@ public class CmsParserUtil extends ParserUtil {
String
content
=
CmsParserUtil
.
generate
(
articleIdList
.
get
(
ai
).
getColumnUrl
(),
parserParams
,
false
);
FileUtil
.
writeString
(
content
,
writePath
,
Const
.
UTF8
);
// 手机端
if
(
ParserUtil
.
i
sMobile
(
columnUrl
))
{
if
(
ParserUtil
.
ha
sMobile
File
(
columnUrl
))
{
writePath
=
ParserUtil
.
buildMobileHtmlPath
(
articleColumnPath
+
File
.
separator
+
articleId
);
//如果是封面就生成index.html
if
(
articleIdList
.
get
(
ai
).
getColumnType
()
==
ColumnTypeEnum
.
COLUMN_TYPE_COVER
.
toInt
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment