Files
WorkBuddy 8b505d9133
CI/CD Pipeline / Test Shell Guard (Phase 23 Gate) (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 / UI Contracts (source-structure gates) (push) Canceled after 0s
CI/CD Pipeline / E2E (live stack) (push) Canceled after 0s
feat: disable user messaging and retain公益 service guidance
2026-10-15 13:38:17 +08:00

54 lines
1.2 KiB
JavaScript

/**
* 活动互选结果页 U36
* 展示活动中双方互相表达的意向结果
*/
const api = require('../../utils/api');
Page({
data: {
activityId: '',
activityTitle: '',
matches: [],
loading: true
},
onLoad(options) {
if (options.activityId) {
this.setData({ activityId: options.activityId });
this.loadMatches();
}
},
async loadMatches() {
this.setData({ loading: true });
try {
const token = wx.getStorageSync('accessToken');
const res = await api.get(`/activities/${this.data.activityId}/interests/mutual`, {}, {
Authorization: `Bearer ${token}`
});
// 获取活动标题
const actRes = await api.get(`/activities/${this.data.activityId}`, {}, {
Authorization: `Bearer ${token}`
});
this.setData({
activityTitle: actRes.title,
matches: res || [],
loading: false
});
} catch (err) {
this.setData({ loading: false });
}
},
onRefresh() {
this.loadMatches();
},
goToProfile(userId) {
wx.navigateTo({
url: `/pages/profile-detail/profile-detail?id=${userId}&activityId=${this.data.activityId}`
});
},
});