Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
5b7e4fa2
Commit
5b7e4fa2
authored
Mar 06, 2019
by
sunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
方法优化
parent
c4ea16f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
CmsParserUtil.java
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
+3
-3
No files found.
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
.
isMob
ile
(
templatePath
))
{
if
(
ParserUtil
.
hasMobileF
ile
(
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
.
isMob
ile
(
column
.
getColumnListUrl
()))
{
if
(
ParserUtil
.
hasMobileF
ile
(
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
.
isMob
ile
(
columnUrl
))
{
if
(
ParserUtil
.
hasMobileF
ile
(
columnUrl
))
{
writePath
=
ParserUtil
.
buildMobileHtmlPath
(
articleColumnPath
+
File
.
separator
+
articleId
);
//如果是封面就生成index.html
if
(
articleIdList
.
get
(
ai
).
getColumnType
()
==
ColumnTypeEnum
.
COLUMN_TYPE_COVER
.
toInt
())
{
...
...
Write
Preview
Markdown
is supported
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