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
93cf6547
Commit
93cf6547
authored
Mar 06, 2019
by
他是超人他会飞
Committed by
铭飞
Mar 06, 2019
Browse files
!150 方法优化
Merge pull request !150 from 他是超人他会飞/4.7.0
parents
6b874025
5b7e4fa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
93cf6547
...
@@ -46,7 +46,7 @@ public class CmsParserUtil extends ParserUtil {
...
@@ -46,7 +46,7 @@ public class CmsParserUtil extends ParserUtil {
FileUtil
.
writeString
(
content
,
ParserUtil
.
buildHtmlPath
(
targetPath
),
Const
.
UTF8
);
FileUtil
.
writeString
(
content
,
ParserUtil
.
buildHtmlPath
(
targetPath
),
Const
.
UTF8
);
// 生成移动页面
// 生成移动页面
if
(
ParserUtil
.
i
sMobile
(
templatePath
))
{
if
(
ParserUtil
.
ha
sMobile
File
(
templatePath
))
{
// 手机端m
// 手机端m
map
.
put
(
ParserUtil
.
MOBILE
,
BasicUtil
.
getApp
().
getAppMobileStyle
());
map
.
put
(
ParserUtil
.
MOBILE
,
BasicUtil
.
getApp
().
getAppMobileStyle
());
content
=
CmsParserUtil
.
generate
(
templatePath
,
map
,
true
);
content
=
CmsParserUtil
.
generate
(
templatePath
,
map
,
true
);
...
@@ -128,7 +128,7 @@ public class CmsParserUtil extends ParserUtil {
...
@@ -128,7 +128,7 @@ public class CmsParserUtil extends ParserUtil {
FileUtil
.
writeString
(
tag
.
rendering
(),
columnListPath
,
Const
.
UTF8
);
FileUtil
.
writeString
(
tag
.
rendering
(),
columnListPath
,
Const
.
UTF8
);
// 判断是手机端生成还是pc端,防止重复生成
// 判断是手机端生成还是pc端,防止重复生成
if
(
ParserUtil
.
i
sMobile
(
column
.
getColumnListUrl
()))
{
if
(
ParserUtil
.
ha
sMobile
File
(
column
.
getColumnListUrl
()))
{
writer
=
new
StringWriter
();
writer
=
new
StringWriter
();
mobileTemplate
.
process
(
null
,
writer
);
mobileTemplate
.
process
(
null
,
writer
);
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
tag
=
new
TagParser
(
writer
.
toString
(),
parserParams
);
...
@@ -232,7 +232,7 @@ public class CmsParserUtil extends ParserUtil {
...
@@ -232,7 +232,7 @@ public class CmsParserUtil extends ParserUtil {
String
content
=
CmsParserUtil
.
generate
(
articleIdList
.
get
(
ai
).
getColumnUrl
(),
parserParams
,
false
);
String
content
=
CmsParserUtil
.
generate
(
articleIdList
.
get
(
ai
).
getColumnUrl
(),
parserParams
,
false
);
FileUtil
.
writeString
(
content
,
writePath
,
Const
.
UTF8
);
FileUtil
.
writeString
(
content
,
writePath
,
Const
.
UTF8
);
// 手机端
// 手机端
if
(
ParserUtil
.
i
sMobile
(
columnUrl
))
{
if
(
ParserUtil
.
ha
sMobile
File
(
columnUrl
))
{
writePath
=
ParserUtil
.
buildMobileHtmlPath
(
articleColumnPath
+
File
.
separator
+
articleId
);
writePath
=
ParserUtil
.
buildMobileHtmlPath
(
articleColumnPath
+
File
.
separator
+
articleId
);
//如果是封面就生成index.html
//如果是封面就生成index.html
if
(
articleIdList
.
get
(
ai
).
getColumnType
()
==
ColumnTypeEnum
.
COLUMN_TYPE_COVER
.
toInt
())
{
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