release: freeze demo v1.1.0 2026-10-19
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
CI/CD Pipeline / UI Contracts (source-structure gates) (push) Canceled after 0s
CI/CD Pipeline / E2E (live stack) (push) Canceled after 0s

This commit is contained in:
WorkBuddy
2026-10-19 20:36:22 +08:00
parent 8b505d9133
commit 69ebf33e18
157 changed files with 21111 additions and 72 deletions
+9 -7
View File
@@ -113,11 +113,12 @@ Page({
try {
// @ts-ignore - recommendationService 接口待 TS 化
const result = await recommendationService.discover(this._buildParams());
const items: RecommendationCandidate[] = (result?.items as RecommendationCandidate[]) || [];
const items: RecommendationCandidate[] = ((result?.items || result?.records) as RecommendationCandidate[]) || [];
const nextPage = (result?.page || 1) < (result?.totalPages || 0) ? String((result?.page || 1) + 1) : null;
this.setData({
users: first ? items : [...this.data.users, ...items],
cursor: result?.nextCursor || null,
hasMore: !!result?.nextCursor,
cursor: result?.nextCursor || nextPage,
hasMore: !!result?.nextCursor || !!nextPage,
loading: false,
});
} catch (err: unknown) {
@@ -133,13 +134,14 @@ Page({
// @ts-ignore
const result = await recommendationService.discover({
...this._buildParams(),
cursor: this.data.cursor,
page: Number(this.data.cursor),
});
const items: RecommendationCandidate[] = (result?.items as RecommendationCandidate[]) || [];
const items: RecommendationCandidate[] = ((result?.items || result?.records) as RecommendationCandidate[]) || [];
const nextPage = (result?.page || 1) < (result?.totalPages || 0) ? String((result?.page || 1) + 1) : null;
this.setData({
users: [...this.data.users, ...items],
cursor: result?.nextCursor || null,
hasMore: !!result?.nextCursor,
cursor: result?.nextCursor || nextPage,
hasMore: !!result?.nextCursor || !!nextPage,
});
} catch (err: unknown) {
appStore.toastError(err instanceof Error ? err.message : '加载失败');
+4 -2
View File
@@ -59,8 +59,10 @@ Page({
err && typeof err === 'object' && typeof (err as { message?: unknown }).message === 'string'
? (err as { message: string }).message
: ''
const message =
fromRejection || (err instanceof Error ? err.message : '') || '登录失败,请重试'
const rawMessage = fromRejection || (err instanceof Error ? err.message : '')
const message = /access_token missing|需要重新登录/.test(rawMessage)
? '微信登录会话已失效,请退出并重新登录微信开发者工具后再试'
: rawMessage || '登录失败,请重试'
console.error('[Login] 登录失败:', err)
this.setData({ error: message, loggingIn: false })
appStore.toastError(message)
@@ -0,0 +1,43 @@
/** 公益红娘协助授权说明页(演示测试稿) */
const { matchmakerService } = require('../../services');
const authorizationStatement = require('../../assets/matchmaker-authorization-test');
Page({
data: {
title: authorizationStatement.title,
content: authorizationStatement.content,
targetUserId: '',
submitting: false,
},
onLoad(options) {
this.setData({ targetUserId: options.targetUserId || '' });
},
async onAgree() {
if (!this.data.targetUserId || this.data.submitting) return;
this.setData({ submitting: true });
try {
const service = await matchmakerService.applyService({
serviceType: 'recommendation_assistance',
targetUserId: this.data.targetUserId,
description: '希望公益红娘协助了解公益活动和线下服务',
authorizationAccepted: true,
});
if (service && (service.serviceId || service.id)) {
wx.setStorageSync('lastServiceId', service.serviceId || service.id);
}
wx.showToast({ title: '申请已提交', icon: 'success' });
setTimeout(() => {
wx.redirectTo({ url: '/pages/matchmaker-progress/matchmaker-progress' });
}, 500);
} catch (err) {
wx.showToast({ title: (err && err.message) || '申请失败,请稍后重试', icon: 'none' });
this.setData({ submitting: false });
}
},
onCancel() {
wx.navigateBack();
},
});
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "授权说明",
"usingComponents": {}
}
@@ -0,0 +1,11 @@
<view class="authorization-page">
<view class="authorization-card">
<view class="authorization-title">{{title}}</view>
<view class="authorization-tag">当前为演示测试稿,正式版本以法务审核文件为准</view>
<view class="authorization-content">{{content}}</view>
<view class="authorization-actions">
<button class="authorization-cancel" bindtap="onCancel" disabled="{{submitting}}">暂不申请</button>
<button class="authorization-confirm" bindtap="onAgree" loading="{{submitting}}" disabled="{{submitting}}">同意并申请</button>
</view>
</view>
</view>
@@ -0,0 +1,60 @@
.authorization-page {
min-height: 100vh;
box-sizing: border-box;
padding: 32rpx;
background: #f4f5fa;
}
.authorization-card {
padding: 40rpx 32rpx;
background: #fff;
border-radius: 24rpx;
}
.authorization-title {
color: #172a72;
font-size: 38rpx;
font-weight: 700;
line-height: 1.45;
}
.authorization-tag {
margin-top: 20rpx;
padding: 16rpx 20rpx;
color: #9a6500;
background: #fff7e6;
border-radius: 12rpx;
font-size: 26rpx;
line-height: 1.5;
}
.authorization-content {
margin-top: 28rpx;
color: #333;
font-size: 30rpx;
line-height: 1.8;
}
.authorization-actions {
display: flex;
gap: 20rpx;
margin-top: 48rpx;
}
.authorization-actions button {
flex: 1;
border-radius: 999rpx;
font-size: 30rpx;
}
.authorization-cancel {
color: #555;
background: #f4f5fa;
}
.authorization-confirm {
color: #fff;
background: #c94b4b;
}
.authorization-actions button::after { border: 0; }
@@ -36,6 +36,7 @@ Page({
badges: [],
basicInfo: [],
attitudeInfo: [],
assistanceSubmitted: false,
},
onLoad(options) {
@@ -182,6 +183,14 @@ Page({
}
},
onApplyMatchmaker() {
const { userId, actionLoading, assistanceSubmitted } = this.data;
if (!userId || actionLoading || assistanceSubmitted) return;
wx.navigateTo({
url: `/pages/matchmaker-authorization/matchmaker-authorization?targetUserId=${encodeURIComponent(userId)}`,
});
},
/**
* 举报:跳转 report 页,不在本页处理(AGENTS 第 7 条:举报内容不在此暴露)
@@ -113,6 +113,11 @@
bind:tap="onReport"
disabled="{{actionLoading}}"
>举报</ui-button>
<button
class="profile-actions__btn profile-actions__btn--assist"
catchtap="onApplyMatchmaker"
disabled="{{actionLoading || assistanceSubmitted}}"
>{{assistanceSubmitted ? '已申请红娘协助' : '申请红娘协助'}}</button>
<ui-button
wx:if="{{!isLiked}}"
variant="primary"
@@ -128,6 +128,19 @@
flex:1;
}
.profile-actions__btn--assist {
margin: 0;
min-width: 0;
line-height: 1.4;
font-size: 30rpx;
color: #c94b4b;
background: #fff;
border: 1rpx solid #d96b6b;
border-radius: 999rpx;
}
.profile-actions__btn--assist::after { border: 0; }
.profile-actions__btn--block,
.profile-actions__btn--report {
flex:0 0 auto;