release: freeze 2026-10-15 validated release baseline
CI/CD Pipeline / UI Contracts (source-structure gates) (push) Canceled after 0s
CI/CD Pipeline / E2E (live stack) (push) Canceled after 0s
CI/CD Pipeline / Backend Build & Test (push) Canceled after 0s
CI/CD Pipeline / Admin Web Build (push) Canceled after 0s
CI/CD Pipeline / Mini Program Compile Check (push) Canceled after 0s
CI/CD Pipeline / Migration Validation (push) Canceled after 0s
CI/CD Pipeline / Test Shell Guard (Phase 23 Gate) (push) Canceled after 0s

This commit is contained in:
WorkBuddy
2026-10-15 09:47:31 +08:00
parent 827c23db1d
commit 3c2b967274
149 changed files with 4324 additions and 348 deletions
@@ -0,0 +1,63 @@
const { matchmakerStore, matchStore, appStore } = require('../../stores');
const { matchmakerService } = require('../../services');
const { ROUTE, to } = require('../../constants');
Page({
data: { loading: true, actionLoadingId: '', recommendations: [] },
onShow() { this.load(); },
async load() {
this.setData({ loading: true });
try {
const result = await matchmakerStore.fetchRecommendations();
const items = (result && Array.isArray(result) ? result : matchmakerStore.state.recommendations || [])
.map((item) => ({
...item,
userId: item.userId || item.targetUserId,
displayName: item.displayName || '红娘推荐对象',
recommendationReasons: item.reason ? [item.reason] : [],
}));
this.setData({ recommendations: items, loading: false });
items.filter((item) => item.status === 'pending_view' && item.id).forEach((item) => {
matchmakerService.markRecommendationViewed(item.id).catch(() => {});
});
} catch (error) {
this.setData({ loading: false });
appStore.toastError(error, '加载红娘推荐失败');
}
},
onView(e) {
const userId = e.detail && e.detail.userId;
if (userId) wx.navigateTo({ url: to.detail(userId) });
},
async onLike(e) {
await this.respond(e.detail && e.detail.userId, 'like');
},
async onPass(e) {
await this.respond(e.detail && e.detail.userId, 'pass');
},
async respond(userId, action) {
if (!userId || this.data.actionLoadingId) return;
this.setData({ actionLoadingId: userId });
try {
const result = action === 'like' ? await matchStore.like(userId) : await matchStore.pass(userId);
this.setData({ recommendations: this.data.recommendations.filter((item) => item.userId !== userId) });
if (action === 'like' && result && result.mutualMatch && result.matchedConversationId) {
wx.navigateTo({ url: to.chat(result.matchedConversationId) });
} else {
appStore.toastSuccess(action === 'like' ? '已表达喜欢' : '已暂不考虑');
}
} catch (error) {
appStore.toastError(error);
} finally {
this.setData({ actionLoadingId: '' });
}
},
onBack() { wx.navigateBack(); },
});