更新功能修改
This commit is contained in:
parent
0291f6e77f
commit
41cda3f4a8
@ -22,7 +22,14 @@
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
content: ''
|
||||
pid: '',
|
||||
type: '',
|
||||
uid: '',
|
||||
toUid: '',
|
||||
postId: '',
|
||||
content: '',
|
||||
status: '',
|
||||
createTime: ''
|
||||
},
|
||||
dataRule: {
|
||||
status: [
|
||||
@ -44,7 +51,14 @@
|
||||
params: this.$http.adornParams()
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.pid = data.comment.pid
|
||||
this.dataForm.type = data.comment.type
|
||||
this.dataForm.uid = data.comment.uid
|
||||
this.dataForm.toUid = data.comment.toUid
|
||||
this.dataForm.postId = data.comment.postId
|
||||
this.dataForm.content = data.comment.content
|
||||
this.dataForm.status = data.comment.status
|
||||
this.dataForm.createTime = data.comment.createTime
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -59,7 +73,14 @@
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'id': this.dataForm.id || undefined,
|
||||
'content': this.dataForm.content
|
||||
'pid': this.dataForm.pid,
|
||||
'type': this.dataForm.type,
|
||||
'uid': this.dataForm.uid,
|
||||
'toUid': this.dataForm.toUid,
|
||||
'postId': this.dataForm.postId,
|
||||
'content': this.dataForm.content,
|
||||
'status': this.dataForm.status,
|
||||
'createTime': this.dataForm.createTime
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
|
@ -34,8 +34,21 @@ export default {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
uid: "",
|
||||
topicId: "",
|
||||
discussId: "",
|
||||
voteId: "",
|
||||
title: "",
|
||||
content: "",
|
||||
media: "",
|
||||
readCount: "",
|
||||
postTop: ""
|
||||
postTop: "",
|
||||
type: "",
|
||||
address: "",
|
||||
longitude: "",
|
||||
latitude: "",
|
||||
createTime: "",
|
||||
status: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -52,8 +65,21 @@ export default {
|
||||
params: this.$http.adornParams(),
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.uid = data.post.uid;
|
||||
this.dataForm.topicId = data.post.topicId;
|
||||
this.dataForm.discussId = data.post.discussId;
|
||||
this.dataForm.voteId = data.post.voteId;
|
||||
this.dataForm.title = data.post.title;
|
||||
this.dataForm.content = data.post.content;
|
||||
this.dataForm.media = data.post.media;
|
||||
this.dataForm.readCount = data.post.readCount;
|
||||
this.dataForm.postTop = data.post.postTop;
|
||||
this.dataForm.type = data.post.type;
|
||||
this.dataForm.address = data.post.address;
|
||||
this.dataForm.longitude = data.post.longitude;
|
||||
this.dataForm.latitude = data.post.latitude;
|
||||
this.dataForm.createTime = data.post.createTime;
|
||||
this.dataForm.status = data.post.status;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -70,8 +96,21 @@ export default {
|
||||
method: "post",
|
||||
data: this.$http.adornData({
|
||||
id: this.dataForm.id || undefined,
|
||||
uid: this.dataForm.uid,
|
||||
topicId: this.dataForm.topicId,
|
||||
discussId: this.dataForm.discussId,
|
||||
voteId: this.dataForm.voteId,
|
||||
title: this.dataForm.title,
|
||||
content: this.dataForm.content,
|
||||
media: this.dataForm.media,
|
||||
readCount: this.dataForm.readCount,
|
||||
postTop: this.dataForm.postTop
|
||||
postTop: this.dataForm.postTop,
|
||||
type: this.dataForm.type,
|
||||
address: this.dataForm.address,
|
||||
longitude: this.dataForm.longitude,
|
||||
latitude: this.dataForm.latitude,
|
||||
createTime: this.dataForm.createTime,
|
||||
status: this.dataForm.status,
|
||||
}),
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user