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
8a249af4
Commit
8a249af4
authored
Dec 26, 2019
by
tianbj
Browse files
静态化
parent
eeff1573
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
8a249af4
...
...
@@ -238,10 +238,10 @@
(select id FROM cms_category where
<include
refid=
"queryWhereCategoryId"
></include>
))
</if>
<if
test=
"beginTime!=null and beginTime!=''"
>
and content_
up
datetime
>
= #{beginTime}
and content_datetime
>
= #{beginTime}
</if>
<if
test=
"endTime!=null and endTime!=''"
>
and content_
up
datetime
>
= #{endTime}
and content_datetime
>
= #{endTime}
</if>
<if
test=
"orderBy!=null and order!=null and orderBy!='' and order!=''"
>
ORDER BY `${orderBy}` ${order}
...
...
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
8a249af4
...
...
@@ -72,7 +72,7 @@
<el-form-item prop="categoryUrl" :label="form.categoryType =='1'? '内容模板' : '封面模板'">
<el-select v-model="form.categoryUrl"
:style="
{
width
:
'
100
%'
}
"
:filterable="
fals
e"
:filterable="
tru
e"
:disabled="false"
:multiple="false" :clearable="true"
placeholder="请选择内容模板">
...
...
@@ -112,7 +112,7 @@
</template>
<el-select v-model="form.categoryListUrl"
:style="
{
width
:
'
100
%'
}
"
:filterable="
fals
e"
:filterable="
tru
e"
:disabled="false"
:multiple="false" :clearable="true"
placeholder="请选择列表模板">
...
...
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
View file @
8a249af4
...
...
@@ -27,7 +27,8 @@
<div class="class-4" >
<el-form-item label="主题模板">
<el-select v-model="template"
:clearable="true"
:filterable="true"
:clearable="false"
placeholder="请选择主题模板">
<el-option v-for='item in templateOptions' :key="item" :value="item"
:label="item"></el-option>
...
...
@@ -80,8 +81,8 @@
end-placeholder=""
:readonly="false"
:disabled="false"
:editable="
tru
e"
:clearable="
tru
e"
:editable="
fals
e"
:clearable="
fals
e"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:style="
{
width
:
'
100
%'
}
"
...
...
@@ -125,14 +126,17 @@
},
data
:
{
loading
:
false
,
template
:
''
,
//主题模板
template
:
'
index
.htm
'
,
//主题模板
templateOptions
:
[]
,
position
:
'
index
.html
'
,
//位置
contentSection
:
''
,
//文章栏目
section
:
''
,
//栏目
position
:
'
index
'
,
//位置
contentSection
:
'
0
'
,
//文章栏目
section
:
'
0
'
,
//栏目
time
:
ms
.util.date.fmt
(
new
D
ate
(),
"yyyy-MM-dd"
),
treeList
:
[]
,
treeList
:
[
{
id
:
'
0
'
,
categoryTitle
:
'顶级栏目'
,
children
:
[]
,
}
]
,
},
methods
:
{
//更新主页
...
...
@@ -143,7 +147,7 @@
return
;
}
that
.loading
=
true
;
ms
.http.
ge
t
(
ms
.manager
+'/
cms
/
generate
//
generateIndex
.do
'
,
{
url
:
that
.template
,
position
:
that
.position
})
.then
(
function
(
data
)
{
ms
.http.
pos
t
(
ms
.manager
+'/
cms
/
generate
//
generateIndex
.do
'
,
{
url
:
that
.template
,
position
:
that
.position
})
.then
(
function
(
data
)
{
if
(
data
.result
){
that
.
$notify
({
title
:
'更新成功!'
,
type
:
'
success
'
})
;
}
...
...
@@ -165,12 +169,8 @@
//更新栏目
updateColumn
(){
var
that
=
this
;
if
(
!
that
.section
||
that
.section
==
''
){
that
.
$notify
({
title
:
'请选择栏目!'
,
type
:
'
warning
'
})
;
return
;
}
that
.loading
=
true
;
ms
.http.get
(
ms
.manager
+'/
cms
/
generate
/'+
that
.section
+'/
genernateColumn
.do
'
,
{
section
:
that
.section
}
)
.then
(
function
(
data
)
{
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
'
})
;
}
...
...
@@ -184,12 +184,8 @@
//生成文章栏目
updateArticle
(){
var
that
=
this
;
if
(
!
that
.contentSection
||
that
.contentSection
==
''
){
that
.
$notify
({
title
:
'请选择栏目!'
,
type
:
'
warning
'
})
;
return
;
}
that
.loading
=
true
;
ms
.http.
ge
t
(
ms
.manager
+'/
cms
/
generate
/'+
that
.contentSection
+'/
generateArticle
.do
'
,
{
contentSection
:
that
.contentSection
,
data
:
that
.time
})
.then
(
function
(
data
)
{
ms
.http.
pos
t
(
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
'
})
;
}
...
...
@@ -214,7 +210,7 @@
ms
.http.get
(
ms
.manager
+
"/cms/category/list.do"
,{
pageSize
:
9999
})
.then
(
function
(
res
){
if
(
res
.result
){
//
res
.data.rows.push
({
id
:
0
,
categoryId
:
null
,
categoryTitle
:
'顶级栏目管理'
})
;
that
.treeList
=
ms
.util.treeData
(
res
.data.rows
,
'
id
'
,
'
categoryId
'
,
'
children
'
)
;
that
.treeList
[
0
]
.children
= ms.util.treeData(res.data.rows,'id','categoryId','children');
}
})
.catch
(
function
(
err
){
console
.log
(
err
)
;
...
...
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