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:
Blizzard
2026-08-04 11:16:03 +08:00
parent 04a99df434
commit f417962453
25 changed files with 6 additions and 1352 deletions
-16
View File
@@ -34,25 +34,9 @@ Page({
.then((card) => this.setData({ card }))
.catch(() => {});
},
// 看自己的公开主页,和别人看到的是同一个页面、同一套渲染
previewPublic() {
const uid = this.data.user && this.data.user.id;
if (uid) wx.navigateTo({ url: `/pages/user/user?id=${uid}` });
},
// 我的帖子:进自己的主页,能看到待审核/未通过的帖子及状态
goMyPosts() {
const uid = this.data.user && this.data.user.id;
if (!uid) return wx.showToast({ title: '请先登录', icon: 'none' });
wx.navigateTo({ url: '/pages/user/user?id=' + uid });
},
goSettings() {
wx.navigateTo({ url: '/pages/settings/settings' });
},
goRelations(e) {
const uid = (this.data.user && this.data.user.id) || '';
if (!uid) return wx.showToast({ title: '登录信息还没就绪', icon: 'none' });
wx.navigateTo({ url: `/pages/relations/relations?id=${uid}&kind=${e.detail.kind}` });
},
// 宠物档案:当前这只的编辑页
goPetForm() {
const id = store.currentPetId();
+1 -13
View File
@@ -2,18 +2,13 @@
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
<view class="page-body tab-nofab">
<!-- 和「宠友主页」同一个组件。自己看到的就是别人看到的,装扮才有意义 -->
<profile-head card="{{card}}" hide-wall="{{true}}" bind:relations="goRelations"
<profile-head card="{{card}}" hide-wall="{{true}}" hide-social="{{true}}"
bind:decorate="goDecorate" bind:pet="onPickPet"></profile-head>
<!-- 装扮 + 预览,一行两列 -->
<view class="me-actions">
<view class="btn btn-ghost me-act" bindtap="goDecorate">
<pt-icon name="edit" size="{{28}}"></pt-icon>装扮主页
</view>
<view class="btn btn-ghost me-act" bindtap="previewPublic">
<pt-icon name="user" size="{{28}}"></pt-icon>别人眼里的我
</view>
</view>
<!-- 我的毛孩子 -->
@@ -37,13 +32,6 @@
<!-- 档案/计划/多宠都从首页和宠物卡进,这里留「设置」-->
<view class="profile-list">
<!-- 社区下线期间隐藏「我的帖子」入口(goMyPosts 代码保留,恢复社区时把这块解开即可)
<view class="profile-row" bindtap="goMyPosts">
<view class="pr-ic"><pt-icon name="community" size="{{34}}"></pt-icon></view>
<text class="pr-label">我的帖子</text><text class="pr-val">看审核状态</text>
<view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view>
</view>
-->
<view class="profile-row" bindtap="goSettings">
<view class="pr-ic"><pt-icon name="settings" size="{{34}}"></pt-icon></view>
<text class="pr-label">设置</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view>