chore: establish V1.1 recovery baseline
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
const app = getApp<{ globalData: { apiBase: string; token: string } }>();
|
||||
|
||||
Page({
|
||||
data: { loading: true, results: [] as any[] },
|
||||
onLoad() { this.loadResults(); },
|
||||
onShow() { this.loadResults(); },
|
||||
|
||||
async loadResults() {
|
||||
try {
|
||||
const res = await wx.request({
|
||||
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 }); }
|
||||
},
|
||||
|
||||
openChat(e: any) {
|
||||
const partnerId = e.currentTarget.dataset.partnerid;
|
||||
wx.navigateTo({ url: `/pages/chat/chat?partnerId=${partnerId}` });
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user