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
7d024091
Commit
7d024091
authored
Dec 11, 2020
by
xierz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章初始化问题
parent
fa9cd60c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
16 deletions
+29
-16
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+29
-16
No files found.
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
7d024091
...
@@ -559,8 +559,8 @@
...
@@ -559,8 +559,8 @@
that
.
returnIsShow
=
false
;
that
.
returnIsShow
=
false
;
}
}
}
}
that
.
changeModel
();
}
}
that
.
changeModel
();
}
else
{
}
else
{
that
.
$notify
({
that
.
$notify
({
title
:
'失败'
,
title
:
'失败'
,
...
@@ -586,7 +586,9 @@
...
@@ -586,7 +586,9 @@
});
});
that
.
contentCategoryIdOptions
=
ms
.
util
.
treeData
(
res
.
data
.
rows
,
'id'
,
'categoryId'
,
'children'
);
that
.
contentCategoryIdOptions
=
ms
.
util
.
treeData
(
res
.
data
.
rows
,
'id'
,
'categoryId'
,
'children'
);
that
.
categoryIdOptions
=
res
.
data
.
rows
;
that
.
categoryIdOptions
=
res
.
data
.
rows
;
that
.
changeModel
();
//获取到栏目数据之后再进行初始化
that
.
init
();
}
}
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
...
@@ -666,25 +668,36 @@
...
@@ -666,25 +668,36 @@
}).
catch
(
function
(
err
)
{
}).
catch
(
function
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
});
});
},
//只有在渲染完栏目数据之后才会初始化
init
:
function
()
{
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
this
.
type
=
ms
.
util
.
getParameter
(
"type"
);
//在指定栏目下新增或编辑文章时
if
(
ms
.
util
.
getParameter
(
"categoryId"
))
{
this
.
form
.
categoryId
=
ms
.
util
.
getParameter
(
"categoryId"
);
//如果是封面栏目直接跳转
if
(
this
.
type
)
{
this
.
getFromFengMian
(
this
.
form
.
categoryId
);
this
.
returnIsShow
=
false
;
//指定非封面栏目编辑文章
}
else
if
(
this
.
form
.
id
)
{
this
.
get
(
this
.
form
.
id
);
//指定栏目新增文章渲染自定义模型
}
else
{
this
.
changeModel
();
}
//不指定栏目编辑文章
}
else
if
(
this
.
form
.
id
)
{
this
.
get
(
this
.
form
.
id
);
}
//else 如果即不指定栏目新增文章,又不是编辑文章就不渲染自定义模型
}
}
},
},
created
:
function
()
{
created
:
function
()
{
this
.
contentCategoryIdOptionsGet
();
this
.
contentCategoryIdOptionsGet
();
this
.
contentTypeOptionsGet
();
this
.
contentTypeOptionsGet
();
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
if
(
ms
.
util
.
getParameter
(
"categoryId"
))
{
this
.
form
.
categoryId
=
ms
.
util
.
getParameter
(
"categoryId"
);
}
this
.
type
=
ms
.
util
.
getParameter
(
"type"
);
if
(
this
.
form
.
id
)
{
this
.
get
(
this
.
form
.
id
);
}
if
(
this
.
type
)
{
this
.
getFromFengMian
(
this
.
form
.
categoryId
);
this
.
returnIsShow
=
false
;
}
}
}
});
});
</script>
</script>
...
...
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