|
@@ -222,7 +222,7 @@ export default {
|
|
|
// 提交表单
|
|
|
handleSubmit(e) {
|
|
|
e.preventDefault();
|
|
|
-
|
|
|
+
|
|
|
this.form.setFieldsValue({
|
|
|
articleParentClass: this.articleParentClass.name
|
|
|
});
|
|
@@ -245,7 +245,8 @@ export default {
|
|
|
cancelText: "取消",
|
|
|
onOk() {
|
|
|
that.loading = true;
|
|
|
- let params = {
|
|
|
+ let params = { categoryid: that.articleChildClass.id };
|
|
|
+ let bodyParams = {
|
|
|
name: values.name,
|
|
|
description: values.description,
|
|
|
type: "ARTICLE",
|
|
@@ -255,7 +256,7 @@ export default {
|
|
|
links: []
|
|
|
};
|
|
|
that.$_http
|
|
|
- .post(that.$_API.INTERFACE_POST_ADMIN_MATERIALS, params)
|
|
|
+ .post(that.$_API.INTERFACE_POST_ADMIN_MATERIALS, bodyParams, { params })
|
|
|
.then(res => {
|
|
|
that.$message.success("新建文章成功");
|
|
|
console.log("---上传文章----" + JSON.stringify(res));
|