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
4c05f02b
Commit
4c05f02b
authored
Dec 27, 2019
by
tianbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
静态化
parent
e6d18407
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
+22
-17
CmsParserUtil.java
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
+4
-1
index.ftl
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
+18
-16
No files found.
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
4c05f02b
...
...
@@ -213,7 +213,10 @@ public class CmsParserUtil extends ParserUtil {
// 文章的模板路径
String
columnUrl
=
articleIdList
.
get
(
artId
).
getCategoryUrl
();
// 文章的栏目模型编号
String
columnContentModelId
=
articleIdList
.
get
(
artId
).
getMdiyModelId
();
String
columnContentModelId
=
""
;
if
(
StringUtils
.
isNotBlank
(
articleIdList
.
get
(
artId
).
getMdiyModelId
())
&&
Integer
.
parseInt
(
articleIdList
.
get
(
artId
).
getMdiyModelId
())>
0
){
columnContentModelId
=
articleIdList
.
get
(
artId
).
getMdiyModelId
();
}
// 文章是否已经生成了,生成了就跳过
if
(
generateIds
.
contains
(
articleId
))
{
artId
++;
...
...
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
View file @
4c05f02b
...
...
@@ -17,11 +17,11 @@
:closable=
"false"
show-icon
>
更新主页,如果系统存在引导页面可以手动修改主页位置文件名,default.html引导页面index.html主页。
<br/>
更新栏目列表,推荐使用指定栏目更新。系统提示“更新中
...
”请不要刷新页面或点击其他菜单。
<br/>
更新栏目列表,推荐使用指定栏目更新。系统提示“更新中”请不要刷新页面或点击其他菜单。
<br/>
根据时间与栏目类型生成文章
</el-alert>
</div>
<el-form
ref=
"form"
label-width=
"
90px"
size=
"mini"
v-loading=
"loading
"
>
<el-form
ref=
"form"
label-width=
"
100px"
size=
"mini
"
>
<div
class=
"class-2"
>
<div
class=
"class-3"
>
<div
class=
"class-4"
>
...
...
@@ -37,10 +37,10 @@
</div>
<div
class=
"class-7"
>
<el-form-item>
<template
slot=
'label'
>
<template
slot=
'label'
>
主页位置
<el-popover
slot=
"label"
placement=
"top-start"
title=
"提示"
width=
"200"
trigger=
"hover"
content=
"主页位置htm文件名一般为index.html或default.html"
>
<i
class=
"el-icon-question"
slot=
"reference"
></i>
</el-popover>
主页位置
</el-popover>
</template>
<el-input
v-model=
"position"
:disabled=
"false"
...
...
@@ -52,7 +52,7 @@
</div>
<div
class=
"class-10"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"updataIndex"
>
生成主页
</el-button>
<el-button
type=
"primary"
@
click=
"updataIndex"
:loading=
"homeLoading"
>
{{homeLoading?'更新中':'生成主页'}}
</el-button>
<el-button
plain
@
click=
"viewIndex"
>
预览主页
</el-button>
</el-form-item>
</div>
...
...
@@ -69,10 +69,10 @@
</div>
<div
class=
"class-17"
>
<el-form-item>
<template
slot=
'label'
>
<template
slot=
'label'
>
指定时间
<el-popover
slot=
"label"
placement=
"top-start"
title=
"提示"
width=
"200"
trigger=
"hover"
content=
"指定时间需要小于生成文章的发布时间"
>
<i
class=
"el-icon-question"
slot=
"reference"
></i>
</el-popover>
指定时间
</el-popover>
</template>
<el-date-picker
v-model=
"time"
...
...
@@ -92,7 +92,7 @@
</div>
<div
class=
"class-20"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"updateArticle"
>
生成文章
</el-button>
<el-button
type=
"primary"
@
click=
"updateArticle"
:loading=
"articleLoading"
>
{{articleLoading?'更新中':'生成文章'}}
</el-button>
</el-form-item>
</div>
</div>
...
...
@@ -109,7 +109,7 @@
<div
class=
"class-30"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"updateColumn"
>
生成栏目
</el-button>
<el-button
type=
"primary"
@
click=
"updateColumn"
:loading=
"columnLoading"
>
{{columnLoading?'更新中':'生成栏目'}}
</el-button>
</el-form-item>
</div>
</div>
...
...
@@ -125,7 +125,9 @@
},
data
:
{
loading
:
false
,
homeLoading
:
false
,
articleLoading
:
false
,
columnLoading
:
false
,
template
:
'index.htm'
,
//主题模板
templateOptions
:[],
position
:
'index'
,
//位置
...
...
@@ -146,7 +148,7 @@
this
.
$notify
({
title
:
'请输入主页位置!'
,
type
:
'warning'
});
return
;
}
that
.
l
oading
=
true
;
that
.
homeL
oading
=
true
;
ms
.
http
.
post
(
ms
.
manager
+
'/cms/generate//generateIndex.do'
,
{
url
:
that
.
template
,
position
:
that
.
position
}).
then
(
function
(
data
)
{
if
(
data
.
result
){
that
.
$notify
({
title
:
'更新成功!'
,
type
:
'success'
});
...
...
@@ -155,7 +157,7 @@
that
.
$notify
({
title
:
'更新失败!'
,
message
:
err
,
type
:
'error'
});
console
.
log
(
err
);
}).
finally
(()
=>
{
that
.
l
oading
=
false
;
that
.
homeL
oading
=
false
;
});
},
//预览主页
...
...
@@ -169,7 +171,7 @@
//更新栏目
updateColumn
(){
var
that
=
this
;
that
.
l
oading
=
true
;
that
.
columnL
oading
=
true
;
ms
.
http
.
get
(
ms
.
manager
+
'/cms/generate/'
+
(
that
.
section
?
that
.
section
:
0
)
+
'/genernateColumn.do'
).
then
(
function
(
data
)
{
if
(
data
.
result
){
that
.
$notify
({
title
:
'更新成功!'
,
type
:
'success'
});
...
...
@@ -178,13 +180,13 @@
that
.
$notify
({
title
:
'更新失败!'
,
message
:
err
,
type
:
'error'
});
console
.
log
(
err
);
}).
finally
(()
=>
{
that
.
l
oading
=
false
;
that
.
columnL
oading
=
false
;
});
},
//生成文章栏目
updateArticle
(){
var
that
=
this
;
that
.
l
oading
=
true
;
that
.
articleL
oading
=
true
;
ms
.
http
.
post
(
ms
.
manager
+
'/cms/generate/'
+
(
that
.
contentSection
?
that
.
contentSection
:
0
)
+
'/generateArticle.do'
,
{
dateTime
:
that
.
time
}).
then
(
function
(
data
)
{
if
(
data
.
result
){
that
.
$notify
({
title
:
'更新成功!'
,
type
:
'success'
});
...
...
@@ -193,7 +195,7 @@
that
.
$notify
({
title
:
'更新失败!'
,
message
:
err
,
type
:
'error'
});
console
.
log
(
err
);
}).
finally
(()
=>
{
that
.
l
oading
=
false
;
that
.
articleL
oading
=
false
;
});
},
//获取主题模板数据源
...
...
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