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
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:
@@ -5,6 +5,7 @@
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/discover/discover",
|
||||
"pages/messages/messages",
|
||||
"pages/activity/activity",
|
||||
"pages/mine/mine",
|
||||
"pages/login/login",
|
||||
@@ -21,6 +22,7 @@
|
||||
"pages/review-pending/review-pending",
|
||||
"pages/review-rejected/review-rejected",
|
||||
"pages/profile-detail/profile-detail",
|
||||
"pages/matchmaker-authorization/matchmaker-authorization",
|
||||
"pages/fate-center/fate-center",
|
||||
"pages/activity-detail/activity-detail",
|
||||
"pages/activity-register/activity-register",
|
||||
@@ -95,6 +97,12 @@
|
||||
"iconPath": "assets/tabbar/discover.png",
|
||||
"selectedIconPath": "assets/tabbar/discover-active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/messages/messages",
|
||||
"text": "消息",
|
||||
"iconPath": "assets/tabbar/message.png",
|
||||
"selectedIconPath": "assets/tabbar/message-active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/activity/activity",
|
||||
"text": "活动",
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* 公益红娘协助授权说明(演示测试稿)
|
||||
*
|
||||
* 本文件仅用于开发和演示链路验证,正式上线前需替换为经法务审核的文本。
|
||||
*/
|
||||
module.exports = {
|
||||
title: '公益红娘协助授权说明(测试稿)',
|
||||
content: '本测试稿仅用于演示。您同意公益红娘在本次服务范围内查看双方必要的公开资料,用于提供公益活动、服务站或线下服务引导。平台不提供用户私信,不展示或交换手机号、微信号等联系方式。您可在服务开始前撤回授权。正式授权文本以上线前法务审核版本为准。',
|
||||
};
|
||||
@@ -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 : '加载失败');
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -11,7 +11,7 @@ const api = require('../utils/api');
|
||||
|
||||
/**
|
||||
* 申请红娘服务(API_INVENTORY 行 102)
|
||||
* @param {{ requirement: string }} payload 用户对自己择偶需求的进一步描述
|
||||
* @param {{ requirement?: string, targetUserId?: string, authorizationAccepted?: boolean }} payload
|
||||
* @returns {Promise<{ serviceId: string, status: 'submitted' }>}
|
||||
*/
|
||||
function applyService(payload) {
|
||||
|
||||
@@ -40,7 +40,8 @@ function discover(params = {}) {
|
||||
* @returns {Promise<import('../types').User & { relationStatus: import('../types').RelationStatus }>}
|
||||
*/
|
||||
function getUserDetail(userId) {
|
||||
return api.get(`/users/${encodeURIComponent(userId)}`);
|
||||
// 后端公开资料路由挂在 discover 控制器下
|
||||
return api.get(`/discover/users/${encodeURIComponent(userId)}`);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user