diff --git a/resources/spa/CONTRIBUTING.md b/resources/spa/CONTRIBUTING.md index a6fb7a3dd..5917ab05b 100644 --- a/resources/spa/CONTRIBUTING.md +++ b/resources/spa/CONTRIBUTING.md @@ -99,7 +99,7 @@ const cb = amount => { console.log(amount); } this.$bus.$emit("reward", { type: "feed", api, - payload: { feedID }, + payload: { feedId }, callback:cb }); ``` @@ -124,7 +124,7 @@ const cb = () => { console.log("success"); } this.$bus.$emit("applyTop", { type: "", api, - payload: { feedID }, + payload: { feedId }, isOwner: true, callback: cb }) diff --git a/resources/spa/src/components/ApplyForTop.vue b/resources/spa/src/components/ApplyForTop.vue index 7687db11a..fcc54640d 100644 --- a/resources/spa/src/components/ApplyForTop.vue +++ b/resources/spa/src/components/ApplyForTop.vue @@ -106,7 +106,7 @@ export default { isOwner: false, applyType: '', // 申请置顶的类型 applyApi: noop, // 申请置顶的api 类型是一个 Promise 对象 - applyPayload: {}, // 申请置顶的负载数据,如feedID等 + applyPayload: {}, // 申请置顶的负载数据,如feedId等 applyCallback: noop, } }, diff --git a/resources/spa/src/components/FeedCard/FeedCard.vue b/resources/spa/src/components/FeedCard/FeedCard.vue index 1722a77b7..af7a20585 100644 --- a/resources/spa/src/components/FeedCard/FeedCard.vue +++ b/resources/spa/src/components/FeedCard/FeedCard.vue @@ -26,12 +26,12 @@ @@ -127,7 +127,7 @@ export default { isMine () { return this.feed.user_id === this.CURRENTUSER.id }, - feedID () { + feedId () { return this.feed.id }, comments: { @@ -230,8 +230,8 @@ export default { }, handleView (hash) { const path = hash - ? `/feeds/${this.feedID}#${hash}` - : `/feeds/${this.feedID}` + ? `/feeds/${this.feedId}#${hash}` + : `/feeds/${this.feedId}` const { paid_node: node } = this.feed node && !node.paid ? this.$lstore.hasData('H5_ACCESS_TOKEN') @@ -257,8 +257,8 @@ export default { handleLike () { const method = this.liked ? 'delete' : 'post' const url = this.liked - ? `/feeds/${this.feedID}/unlike` - : `/feeds/${this.feedID}/like` + ? `/feeds/${this.feedId}/unlike` + : `/feeds/${this.feedId}/like` if (this.fetching) return this.fetching = true this.$http({ @@ -293,7 +293,7 @@ export default { actions.push({ text: '取消收藏', method: () => { - api.uncollectFeed(this.feedID).then(() => { + api.uncollectFeed(this.feedId).then(() => { this.$Message.success('取消收藏') this.has_collect = false }) @@ -303,7 +303,7 @@ export default { actions.push({ text: '收藏', method: () => { - api.collectionFeed(this.feedID).then(() => { + api.collectionFeed(this.feedId).then(() => { this.$Message.success('收藏成功') this.has_collect = true }) @@ -327,7 +327,7 @@ export default { text: '删除', style: { color: '#f4504d' }, method: () => { - api.deleteFeed(this.feedID).then(() => { + api.deleteFeed(this.feedId).then(() => { this.$Message.success('删除动态成功') this.$nextTick(() => { this.$el.remove() @@ -347,7 +347,7 @@ export default { method: () => { this.$bus.$emit('report', { type: 'feed', - payload: this.feedID, + payload: this.feedId, username: this.user.name, reference: this.body, }) @@ -368,7 +368,7 @@ export default { isOwner, type: 'feedComment', api: api.applyTopFeedComment, - payload: { feedId: this.feedID, commentId: comment.id }, + payload: { feedId: this.feedId, commentId: comment.id }, }) }, }) @@ -408,7 +408,7 @@ export default { reply_user: replyUser, } api - .postComment(this.feedID, params) + .postComment(this.feedId, params) .then(comment => { this.commentCount += 1 this.comments.unshift(comment) @@ -421,7 +421,7 @@ export default { }) }, deleteComment (commentId) { - api.deleteFeedComment(this.feedID, commentId).then(() => { + api.deleteFeedComment(this.feedId, commentId).then(() => { this.feed.comments = this.feed.comments.filter(c => c.id !== commentId) this.commentCount -= 1 this.$Message.success('删除评论成功') diff --git a/resources/spa/src/components/FeedCard/GroupFeedCard.vue b/resources/spa/src/components/FeedCard/GroupFeedCard.vue index e59e4455a..76e9252b0 100644 --- a/resources/spa/src/components/FeedCard/GroupFeedCard.vue +++ b/resources/spa/src/components/FeedCard/GroupFeedCard.vue @@ -233,7 +233,7 @@ export default { method: () => { this.$bus.$emit('report', { type: 'post', - payload: this.feedID, + payload: this.feedId, username: this.user.name, reference: this.title, }) @@ -254,7 +254,7 @@ export default { isOwner, type: 'postComment', api: api.applyTopPostComment, - payload: { postId: this.feedID, commentId: comment.id }, + payload: { postId: this.feedId, commentId: comment.id }, }) }, }) @@ -289,7 +289,7 @@ export default { deleteComment (commentId) { this.$store .dispatch('group/deletePostComment', { - postId: this.feedID, + postId: this.feedId, commentId, }) .then(() => { diff --git a/resources/spa/src/components/form/FormAvatarItem.vue b/resources/spa/src/components/form/FormAvatarItem.vue index 8835dacaf..69dc1cd49 100644 --- a/resources/spa/src/components/form/FormAvatarItem.vue +++ b/resources/spa/src/components/form/FormAvatarItem.vue @@ -51,7 +51,7 @@ export default { /** * 文件类型 - * @param {string} type enum{id: FileID, blob: Blob} + * @param {string} type enum{id: FileId, blob: Blob} */ type: { type: String, diff --git a/resources/spa/src/page/UserFans.vue b/resources/spa/src/page/UserFans.vue index 65c8fa5f3..6a2451ce0 100644 --- a/resources/spa/src/page/UserFans.vue +++ b/resources/spa/src/page/UserFans.vue @@ -8,7 +8,7 @@