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
60d3fd09
Commit
60d3fd09
authored
May 29, 2021
by
msgroup
Browse files
清理代码
parent
8230c3cd
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
60d3fd09
...
...
@@ -393,8 +393,6 @@
that.categoryList = res.data.rows;
that.treeList[0].children = ms.util.treeData(res.data.rows, 'id', 'categoryId', 'children');
}
}).catch(function (err) {
console.log(err);
});
},
save: function () {
...
...
@@ -465,8 +463,6 @@
if(data.result){
that.mdiyModelIdOptions = data.data.rows;
}
}).catch(function (err) {
console.log(err);
});
},
//获取当前分类
...
...
@@ -505,8 +501,6 @@
that.contentList(that.form.id);
}
}).catch(function (err) {
console.log(err);
});
},
contentList: function (id) {
...
...
@@ -521,8 +515,6 @@
that.categoryTypeDisabled = false;
}
}
}).catch(function (err) {
console.log(err);
});
},
//获取categoryListUrl数据源
...
...
@@ -530,8 +522,6 @@
var that = this;
ms.http.get(ms.manager + "
/
template
/
queryTemplateFileForColumn
.do
", {}).then(function (data) {
that.categoryListUrlOptions = data.data;
}).catch(function (err) {
console.log(err);
});
},
//获取categoryUrl数据源
...
...
@@ -539,8 +529,6 @@
var that = this;
ms.http.get(ms.manager + "
/
template
/
queryTemplateFileForColumn
.do
", {}).then(function (data) {
that.categoryUrlOptions = data.data;
}).catch(function (err) {
console.log(err);
});
},
//获取categoryFlag数据源
...
...
@@ -554,8 +542,6 @@
res = res.data;
that.categoryFlagOptions = res.rows;
}
}).catch(function (err) {
console.log(err);
});
},
//categoryImg文件上传完成回调
...
...
src/main/webapp/WEB-INF/manager/cms/category/index.ftl
View file @
60d3fd09
...
...
@@ -169,8 +169,6 @@
type
:
'
warning
'
})
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//应用子栏目模板
...
...
@@ -193,8 +191,6 @@
type
:
'
warning
'
})
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//根据字典数据值获取字典标签名
...
...
@@ -234,8 +230,6 @@
that
.emptyText
=
'';
that
.dataList
=
ms
.util.treeData
(
res
.data.rows
,
'
id
'
,
'
categoryId
'
,
'
children
'
)
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
setTimeout
(
function
()
{
if
(
that
.loadState
)
{
...
...
@@ -306,8 +300,6 @@
res
=
res
.data
;
that
.categoryFlagOptions
=
res
.rows
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//表格数据转换
...
...
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
60d3fd09
...
...
@@ -453,8 +453,6 @@
}
that
.changeModel
()
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//根据封面获取当前文章
...
...
@@ -499,8 +497,6 @@
type
:
'
warning
'
})
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//获取
contentCategoryId
数据源
...
...
@@ -521,8 +517,6 @@
//获取到栏目数据之后再进行初始化
that
.init
()
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//获取
contentType
数据源
...
...
@@ -536,8 +530,6 @@
data
=
data
.data
;
that
.contentTypeOptions
=
data
.rows
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//
contentImg
文件上传完成回调
...
...
@@ -598,8 +590,6 @@
that
.form
=
res
.data.rows
[
0
]
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//只有在渲染完栏目数据之后才会初始化
...
...
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
View file @
60d3fd09
...
...
@@ -86,8 +86,6 @@
children
:
that
.treeData
}
];
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
setTimeout
(
function
()
{
if
(
that
.loadState
)
{
...
...
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
60d3fd09
...
...
@@ -318,9 +318,8 @@
that
.total
=
res
.data.total
;
that
.dataList
=
res
.data.rows
;
}
})
.
catch
(
function
(
err
)
{
})
.
finally
(
function
()
{
that
.loading
=
false
;
console
.log
(
err
)
;
})
;
setTimeout
(
function
()
{
if
(
that
.loadState
)
{
...
...
@@ -451,8 +450,6 @@
}
that
.list
()
;
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
//获取
contentType
数据源
...
...
@@ -466,8 +463,6 @@
data
=
data
.data
;
that
.contentTypeOptions
=
data
.rows
;
}
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
}
},
...
...
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
View file @
60d3fd09
...
...
@@ -176,13 +176,6 @@
type
:
'
error
'
})
;
}
})
.catch
(
function
(
err
)
{
that
.
$notify
({
title
:
'更新失败!'
,
message
:
err
,
type
:
'
error
'
})
;
console
.log
(
err
)
;
})
.finally
(
function
()
{
that
.homeLoading
=
false
;
})
;
...
...
@@ -217,13 +210,6 @@
type
:
'
error
'
})
;
}
})
.catch
(
function
(
err
)
{
that
.
$notify
({
title
:
'更新失败!'
,
message
:
err
,
type
:
'
error
'
})
;
console
.log
(
err
)
;
})
.finally
(
function
()
{
that
.columnLoading
=
false
;
})
;
...
...
@@ -248,13 +234,6 @@
type
:
'
error
'
})
;
}
})
.catch
(
function
(
err
)
{
that
.
$notify
({
title
:
'更新失败!'
,
message
:
err
,
type
:
'
error
'
})
;
console
.log
(
err
)
;
})
.finally
(
function
()
{
that
.articleLoading
=
false
;
})
;
...
...
@@ -272,8 +251,6 @@
})
;
//没有就找其他的
that
.template
=
template
||
(
that
.templateOptions.length
>
0
?
that
.templateOptions
[
0
]
: "");
})
.catch
(
function
(
err
)
{
console
.log
(
err
)
;
})
;
},
getTree
:
function
()
{
...
...
@@ -285,8 +262,6 @@
//
res
.data.rows.push
({
id
:
0
,
categoryId
:
null
,
categoryTitle
:
'顶级栏目管理'
})
;
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