feat: redesign activity and profile tabs

This commit is contained in:
Codex
2026-09-14 07:05:20 +08:00
parent b7dc52b517
commit a6037ded59
14 changed files with 143 additions and 358 deletions
+10 -2
View File
@@ -32,11 +32,12 @@ Page({
canPause: false,
canResume: false,
likersCount: 0,
matchCount: 0,
showLogoutDialog: false,
logoutAction: DANGER_ACTION.LOGOUT,
loginActions: [{ text: '微信登录', event: 'login', variant: 'primary' }],
hasOperatorToken: false,
profileCompleteness: 78,
profileCompleteness: 0,
},
onLoad() {
@@ -44,7 +45,12 @@ Page({
this._unsubUser = userStore.subscribe((state) => this._syncFromUserStore(state));
this._syncFromUserStore(userStore.state);
// 绑定 matchStore.likersCount(驱动"喜欢我"徽标)
this._unsubMatch = matchStore.bindToPage(this, { likersCount: 'likersCount' });
this._unsubMatch = matchStore.subscribe((state) => {
this.setData({
likersCount: state.likersCount || 0,
matchCount: Array.isArray(state.mutualList) ? state.mutualList.length : 0,
});
});
},
onShow() {
@@ -54,6 +60,7 @@ Page({
userStore.fetchProfile().catch(() => {});
userStore.fetchVerificationStatus().catch(() => {});
matchStore.fetchLikersCount().catch(() => {});
matchStore.fetchMutualList().catch(() => {});
}
},
@@ -94,6 +101,7 @@ Page({
relationshipText,
canPause,
canResume,
profileCompleteness: state.profile?.profileCompletion || 0,
});
},