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
9cefb64d
Commit
9cefb64d
authored
Dec 18, 2020
by
xierz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化获取栏目id获取第一行
parent
c1d15d68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+4
-3
main.ftl
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
+4
-1
No files found.
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
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