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
+25 -12
View File
@@ -38,13 +38,24 @@ class MatchmakerStore extends BaseStore {
});
}
/** 将 C 端服务实体字段统一为页面组件契约。 */
normalizeService(service) {
if (!service) return service;
return {
...service,
serviceId: service.serviceId || service.id,
requirement: service.requirement || service.description || '',
};
}
/** 拉取我的红娘服务列表 */
async fetchMyServices(params = {}) {
if (this.state.servicesLoading) return;
this.setState({ servicesLoading: true, lastError: null });
try {
const result = await matchmakerService.getMyServices(params);
const items = result.items || [];
// C 端接口当前返回数组;兼容未来分页响应 { items, nextCursor }。
const items = (Array.isArray(result) ? result : (result.items || [])).map((item) => this.normalizeService(item));
const active = items.find(
(s) =>
s.status !== MATCHMAKER_SERVICE_STATUS.COMPLETED &&
@@ -52,8 +63,8 @@ class MatchmakerStore extends BaseStore {
) || null;
this.setState({
myServices: items,
servicesCursor: result.nextCursor || null,
servicesHasMore: !!result.nextCursor,
servicesCursor: Array.isArray(result) ? null : (result.nextCursor || null),
servicesHasMore: Array.isArray(result) ? false : !!result.nextCursor,
servicesLoading: false,
activeService: active,
});
@@ -74,9 +85,9 @@ class MatchmakerStore extends BaseStore {
pageSize: 20,
});
this.setState({
myServices: [...this.state.myServices, ...(result.items || [])],
servicesCursor: result.nextCursor || null,
servicesHasMore: !!result.nextCursor,
myServices: [...this.state.myServices, ...(Array.isArray(result) ? result : (result.items || [])).map((item) => this.normalizeService(item))],
servicesCursor: Array.isArray(result) ? null : (result.nextCursor || null),
servicesHasMore: Array.isArray(result) ? false : !!result.nextCursor,
servicesLoading: false,
});
} catch (err) {
@@ -104,10 +115,11 @@ class MatchmakerStore extends BaseStore {
this.setState({ recommendationsLoading: true, lastError: null });
try {
const result = await matchmakerService.getRecommendations(params);
const items = Array.isArray(result) ? result : (result.items || []);
this.setState({
recommendations: result.items || [],
recommendationsCursor: result.nextCursor || null,
recommendationsHasMore: !!result.nextCursor,
recommendations: items,
recommendationsCursor: Array.isArray(result) ? null : (result.nextCursor || null),
recommendationsHasMore: Array.isArray(result) ? false : !!result.nextCursor,
recommendationsLoading: false,
});
return result;
@@ -126,10 +138,11 @@ class MatchmakerStore extends BaseStore {
cursor: this.state.recommendationsCursor,
pageSize: 20,
});
const items = Array.isArray(result) ? result : (result.items || []);
this.setState({
recommendations: [...this.state.recommendations, ...(result.items || [])],
recommendationsCursor: result.nextCursor || null,
recommendationsHasMore: !!result.nextCursor,
recommendations: [...this.state.recommendations, ...items],
recommendationsCursor: Array.isArray(result) ? null : (result.nextCursor || null),
recommendationsHasMore: Array.isArray(result) ? false : !!result.nextCursor,
recommendationsLoading: false,
});
} catch (err) {