2026-09-10 16:06:11 +08:00
|
|
|
import { request } from '../../utils/requestPromise'
|
2026-09-09 22:05:00 +08:00
|
|
|
const app = getApp<{ globalData: { apiBase: string; token: string } }>();
|
|
|
|
|
|
|
|
|
|
Page({
|
|
|
|
|
data: { loading: true, results: [] as any[] },
|
|
|
|
|
onLoad() { this.loadResults(); },
|
|
|
|
|
onShow() { this.loadResults(); },
|
|
|
|
|
|
|
|
|
|
async loadResults() {
|
|
|
|
|
try {
|
2026-09-10 16:06:11 +08:00
|
|
|
const res = await request<any>({
|
2026-09-09 22:05:00 +08:00
|
|
|
url: `${app.globalData.apiBase}/activities/mutual/my-results`,
|
|
|
|
|
header: { 'Authorization': `Bearer ${app.globalData.token}` }
|
|
|
|
|
});
|
|
|
|
|
if (res.statusCode === 200 && res.data.success) {
|
|
|
|
|
this.setData({ results: res.data.data || [], loading: false });
|
|
|
|
|
}
|
|
|
|
|
} catch (e) { console.error(e); this.setData({ loading: false }); }
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
});
|