删除接口调整

This commit is contained in:
fan 2020-11-17 17:17:23 +08:00
parent 3d7a5ddde0
commit 242ca313a0
2 changed files with 6 additions and 6 deletions

View File

@ -35,14 +35,14 @@ export function commentComents(messageId, commentId, data) {
// 管理员删除留言 // 管理员删除留言
export function deleteMessageByAdmin(messageId) { export function deleteMessageByAdmin(messageId) {
return request({ return request({
url: `/api/learn/${messageId}/delete/admin`, url: `/api/learn/${messageId}/deleteMessage/admin`,
method: 'delete' method: 'delete'
}); });
} }
// 用户自己删除留言 // 用户自己删除留言
export function deleteMessageBySelf(messageId) { export function deleteMessageBySelf(messageId) {
return request({ return request({
url: `/api/learn/${messageId}/delete/user`, url: `/api/learn/${messageId}/deleteMessage/user`,
method: 'delete' method: 'delete'
}); });
} }
@ -56,14 +56,14 @@ export function queryMessageCommentList(messageId) {
// 删除评论回复管理员 // 删除评论回复管理员
export function deleteCommentByAdmin(commentId) { export function deleteCommentByAdmin(commentId) {
return request({ return request({
url: `/api/learn/${commentId}/delete/admin`, url: `/api/learn/${commentId}/deleteComment/admin`,
method: 'delete' method: 'delete'
}); });
} }
// 删除评论回复用户 // 删除评论回复用户
export function deleteCommentBySelf(commentId) { export function deleteCommentBySelf(commentId) {
return request({ return request({
url: `/api/learn/${commentId}/delete/user`, url: `/api/learn/${commentId}/deleteComment/user`,
method: 'delete' method: 'delete'
}); });
} }

View File

@ -20,8 +20,8 @@
<div style="width: 100%;display:flex;align-items: center;justify-content: flex-end;"> <div style="width: 100%;display:flex;align-items: center;justify-content: flex-end;">
<!--<img :src="lickIcon" style="width: 20px;height: auto;margin-right: 30px;">--> <!--<img :src="lickIcon" style="width: 20px;height: auto;margin-right: 30px;">-->
<!--<img :src="unlikeIcon" style="width: 20px;height: auto;margin-right: 30px;">--> <!--<img :src="unlikeIcon" style="width: 20px;height: auto;margin-right: 30px;">-->
<img :src="replyIcon" style="width: 16px;height: auto;margin-right: 30px;" @click="replyLeaveMessage(item.id, i)"> <img :src="replyIcon" style="width: 16px;height: auto;margin-right: 30px;cursor: pointer;" @click="replyLeaveMessage(item.id, i)">
<img v-if="userId == item.creatorId || superAdmin" :src="deleteIcon" style="width: 16px;height: auto;" @click="deleteMessage(item.id)"> <img v-if="userId == item.creatorId || superAdmin" :src="deleteIcon" style="width: 16px;height: auto;cursor:pointer;" @click="deleteMessage(item.id)">
</div> </div>
<div v-if="item.comments && item.comments.total > 0" style="background: #F5F5F5;margin-top: 10px; width: calc(100% - 120px);margin-left: 60px; border-radius: 5px;padding: 0 10px 10px;"> <div v-if="item.comments && item.comments.total > 0" style="background: #F5F5F5;margin-top: 10px; width: calc(100% - 120px);margin-left: 60px; border-radius: 5px;padding: 0 10px 10px;">
<div v-if="moreMessageId == item.id"> <div v-if="moreMessageId == item.id">