chore: establish V1.1 recovery baseline

This commit is contained in:
2026-09-09 22:05:00 +08:00
commit b46b48eb33
947 changed files with 155471 additions and 0 deletions
@@ -0,0 +1,66 @@
// pages/activity-mutual-result/activity-mutual-result.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
@@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "互选结果"
}
@@ -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}` });
}
});
@@ -0,0 +1,34 @@
<view class="container">
<block wx:if="{{loading}}">
<view class="loading">加载中...</view>
</block>
<block wx:elif="{{results.length === 0}}">
<view class="empty">
<text class="empty-icon">🎯</text>
<text class="empty-text">暂无互选结果</text>
<text class="empty-hint">参加活动时可以向感兴趣的人表达意向</text>
</view>
</block>
<block wx:else>
<view class="result-card" wx:for="{{results}}" wx:key="partnerId" wx:for-item="item">
<view class="card-header">
<image class="avatar" src="{{item.partnerAvatar || '/images/default-avatar.png'}}" mode="aspectFill" />
<view class="info">
<text class="name">{{item.partnerName || '新朋友'}}</text>
<text class="status-badge {{item.bothConfirmed ? 'badge-confirmed' : 'badge-waiting'}}">
{{item.bothConfirmed ? '双方已确认' : '等待对方确认'}}
</text>
</view>
</view>
<view class="card-body">
<text class="activity-name">来自活动:{{item.activityTitle}}</text>
</view>
<view class="card-actions" wx:if="{{!item.bothConfirmed}}">
<button class="btn-waiting" disabled>等待对方确认</button>
</view>
<view class="card-actions" wx:if="{{item.bothConfirmed}}">
<button class="btn-chat" bindtap="openChat" data-partnerid="{{item.partnerId}}">开启聊天</button>
</view>
</view>
</block>
</view>
@@ -0,0 +1,19 @@
.container { padding: 24rpx; min-height: 100vh; background: #f5f5f5; }
.loading { text-align: center; padding: 80rpx; color: #999; }
.empty { text-align: center; padding: 80rpx 0; }
.empty-icon { font-size: 80rpx; display: block; margin-bottom: 20rpx; }
.empty-text { font-size: 32rpx; color: #666; display: block; }
.empty-hint { font-size: 26rpx; color: #999; display: block; margin-top: 12rpx; }
.result-card { background: #fff; border-radius: 16rpx; padding: 24rpx; margin-bottom: 20rpx; box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.05); }
.card-header { display: flex; align-items: center; margin-bottom: 16rpx; }
.avatar { width: 80rpx; height: 80rpx; border-radius: 50rpx; background: #eee; }
.info { flex: 1; margin-left: 20rpx; }
.name { font-size: 30rpx; font-weight: bold; color: #333; display: block; }
.status-badge { font-size: 22rpx; padding: 4rpx 12rpx; border-radius: 12rpx; margin-top: 8rpx; display: inline-block; }
.badge-confirmed { background: #e8f5e9; color: #2e7d32; }
.badge-waiting { background: #fff3e0; color: #e65100; }
.card-body { margin-bottom: 16rpx; }
.activity-name { font-size: 24rpx; color: #999; }
.card-actions { display: flex; justify-content: flex-end; }
.btn-waiting { background: #f5f5f5; color: #999; font-size: 26rpx; padding: 12rpx 32rpx; border-radius: 24rpx; border: none; }
.btn-chat { background: linear-gradient(135deg, #FF6B6B, #EE5A24); color: #fff; font-size: 26rpx; padding: 12rpx 32rpx; border-radius: 24rpx; border: none; }