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
9cefb64d
Commit
9cefb64d
authored
Dec 18, 2020
by
xierz
Browse files
优化获取栏目id获取第一行
parent
c1d15d68
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
9cefb64d
...
...
@@ -286,7 +286,7 @@
//
文章标题
contentTitle
:
''
,
//
所属栏目
categoryId
:
''
,
categoryId
:
undefined
,
//
文章类型
contentType
:
[]
,
//
是否显示
...
...
@@ -675,8 +675,9 @@
this
.type
=
ms
.util.getParameter
(
"type"
)
;
//在指定栏目下新增或编辑文章时
if
(
ms
.util.getParameter
(
"categoryId"
))
{
this
.form.categoryId
=
ms
.util.getParameter
(
"categoryId"
)
;
var
categoryId
=
ms
.util.getParameter
(
"categoryId"
)
;
if
(
categoryId
)
{
this
.form.categoryId
=
categoryId
;
//如果是封面栏目直接跳转
if
(
this
.type
)
{
this
.getFromFengMian
(
this
.form.categoryId
)
;
...
...
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
9cefb64d
...
...
@@ -11,7 +11,7 @@
<el-header class="ms-header" height="50px">
<el-col :span="12">
<@shiro.hasPermission name="cms:content:save">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="save()">新增</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="save(
0
)">新增</el-button>
</@shiro.hasPermission>
<@shiro.hasPermission name="cms:content:del">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="del(selectionList)" :disabled="!selectionList.length">删除</el-button>
...
...
@@ -370,6 +370,9 @@
save
:
function
(
id
)
{
if
(
id
)
{
location
.href
=
this
.manager
+
"/cms/content/form.do?id="
+
id
;
}
else
if
(
id
==
0
){
//在全部栏目下新增文章
location
.href
=
this
.manager
+
"/cms/content/form.do"
;
}
else
{
location
.href
=
this
.manager
+
"/cms/content/form.do?categoryId="
+
this
.form.categoryId
;
}
...
...
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