chore(prod): 移除全部社区/社交相关前端代码(过审用)
- 删除页面:community(社区)、comments(评论)、user(他人主页)、relations(关注/粉丝) - app.json 去掉四个页面注册与社区 tab;tabBar 只剩 首页/报告/我的 - bottom-sheet 移除发帖(createPost)与评论(comments)整块 UI 及对应 JS/数据/常量 - profile-head 移除帖子/关注/粉丝社交数与关注按钮 - mine 去掉「我的帖子」「别人眼里的我」及关注/粉丝跳转 - api.js 移除 posts/comments/follow/relations 等社区接口(保留 userCard 供我的页头部) 说明:后端社区接口未动(微信审核只看小程序包,前端已无任何引用); 完整社区代码保留在 feat/dev 分支与 git 历史。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+1
-20
@@ -125,27 +125,8 @@ const api = {
|
||||
healthSummary: (id) => request({ url: `/api/pets/${id}/health-summary` }),
|
||||
getPoster: (id) => request({ url: `/api/pets/${id}/poster` }),
|
||||
|
||||
// 社区
|
||||
listPosts: (tab, page) =>
|
||||
request({ url: `/api/posts?tab=${encodeURIComponent(tab || '')}&page=${page || 1}&page_size=10` }),
|
||||
createPost: (body) => request({ url: '/api/posts', method: 'POST', data: body }),
|
||||
likePost: (id) => request({ url: `/api/posts/${id}/like`, method: 'POST' }),
|
||||
// 个人主页卡片(「我的」页头部用;社区/关注已下线)
|
||||
userCard: (userId) => request({ url: `/api/users/${userId}/profile` }),
|
||||
userPosts: (userId, page) => request({ url: `/api/users/${userId}/posts?page=${page || 1}&page_size=10` }),
|
||||
relations: (userId, kind, page) =>
|
||||
request({ url: `/api/users/${userId}/relations?kind=${kind}&page=${page || 1}&page_size=20` }),
|
||||
followUser: (userId) => request({ url: `/api/users/${userId}/follow`, method: 'POST' }),
|
||||
unfollowUser: (userId) => request({ url: `/api/users/${userId}/follow`, method: 'DELETE' }),
|
||||
deletePost: (id) => request({ url: `/api/posts/${id}`, method: 'DELETE' }),
|
||||
deleteComment: (id) => request({ url: `/api/comments/${id}`, method: 'DELETE' }),
|
||||
listComments: (id) => request({ url: `/api/posts/${id}/comments` }),
|
||||
createComment: (id, content, images, parentId) =>
|
||||
request({
|
||||
url: `/api/posts/${id}/comments`,
|
||||
method: 'POST',
|
||||
data: { content, images: images || [], parent_id: parentId || '' },
|
||||
}),
|
||||
listReplies: (commentId) => request({ url: `/api/comments/${commentId}/replies` }),
|
||||
|
||||
// 文章
|
||||
listArticles: () => request({ url: '/api/articles' }),
|
||||
|
||||
Reference in New Issue
Block a user