diff --git a/frontend/src/assets/logo.png b/frontend/src/assets/logo.png index a5f23ae..ef5b151 100644 Binary files a/frontend/src/assets/logo.png and b/frontend/src/assets/logo.png differ diff --git a/frontend/src/components/PostCard.vue b/frontend/src/components/PostCard.vue index 895fbca..9a3ec01 100644 --- a/frontend/src/components/PostCard.vue +++ b/frontend/src/components/PostCard.vue @@ -5,11 +5,18 @@ max-width="400" style="border-radius: 10px; color: #fff" > - +
+
+
+ mdi-pin +

稿件

+
+ + +
+
+ {{post.text}} @@ -72,6 +79,9 @@ randomColor() { let colors = ["#FFC107", "#42A5F5", "#9CCC65", "#F06292", "#76FF03", "#9E9E9E", "#8D6E63"] return colors[Math.floor(Math.random() * colors.length)] + }, + recall() { + this.$emit('recall', this.post.id) } } } diff --git a/frontend/src/pages/index.vue b/frontend/src/pages/index.vue index 31fea15..264cee5 100644 --- a/frontend/src/pages/index.vue +++ b/frontend/src/pages/index.vue @@ -73,6 +73,7 @@ +

0. 有诉求请使用正确的语言合理表达,我们讨厌无实际意义的情绪宣泄。

1. 发表针对特定人的负面信息或发表任何人的照片,不允许匿名,同时要求 QQ 等级高于一个太阳

2. 请勿选择不完全符合内容的标签,否则可能导致封禁

3. 以下情形拒绝:涉及政论、主义、国、党等一切敏感内容

diff --git a/frontend/src/pages/world.vue b/frontend/src/pages/world.vue index 5b07445..6571d3b 100644 --- a/frontend/src/pages/world.vue +++ b/frontend/src/pages/world.vue @@ -17,7 +17,7 @@ variant="solo" @update:model-value="getPosts" > - + @@ -125,7 +125,25 @@ export default { toast(text, color = 'error') { this.snackbar.text = text this.snackbar.color = color - } + }, + recallPost(post) { + console.log(post) + this.$axios.post('/v1/post/cancel', { + "post_id": post.id + }) + .then((response) => { + if (response.data.code === 0) { + this.toast('撤回成功', 'success') + this.getPosts() + } else { + this.toast('撤回失败:' + response.data.msg) + } + }) + .catch((error) => { + this.toast('撤回失败:' + error.response.data.msg) + console.error(error) + }) + }, } } \ No newline at end of file