f417962453
- 删除页面: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>
33 lines
1.2 KiB
JavaScript
33 lines
1.2 KiB
JavaScript
// 个人主页头部。「我的」和「宠友主页」共用同一份渲染——自己看和别人看
|
|
// 长得不一样的话,两边会慢慢长歪,装扮功能也就失去意义了。
|
|
// 差别只有一处:自己看是「装扮主页」,别人看是「关注 TA」。
|
|
Component({
|
|
options: { addGlobalClass: true },
|
|
properties: {
|
|
card: { type: Object, value: null },
|
|
// 装扮页的实时预览:只看效果,不要底部那排按钮
|
|
preview: { type: Boolean, value: false },
|
|
hideWall: { type: Boolean, value: false }, // 「我的」页藏掉社交宠物墙,避免和「我的毛孩子」卡重复
|
|
hideSocial: { type: Boolean, value: false }, // 兼容旧调用,社区下线后无实际作用
|
|
},
|
|
data: { initial: '', theme: 'warm' },
|
|
observers: {
|
|
card(c) {
|
|
if (!c) return;
|
|
this.setData({
|
|
// WXML 取不了字符串下标,首字得在 JS 里算
|
|
initial: (c.nickname || '?').slice(0, 1),
|
|
theme: c.theme || 'warm',
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
onDecorate() {
|
|
this.triggerEvent('decorate');
|
|
},
|
|
onPet(e) {
|
|
this.triggerEvent('pet', { id: e.currentTarget.dataset.id });
|
|
},
|
|
},
|
|
});
|