chore: establish V1.1 recovery baseline
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* MatchmakerCard 红娘服务卡片(规范 §48-50)
|
||||
*
|
||||
* 展示我申请的红娘服务进度,含状态、所属机构、最近跟进时间。
|
||||
* 不变量(AGENTS.md 第 5 条):红娘不可替用户操作——本卡片不暴露任何
|
||||
* "代用户 Like/Pass"入口,红娘推荐列表走 matchStore.like/pass(userId)。
|
||||
* 不变量(AGENTS.md 第 1 条):用户永久免费——本卡片不展示任何付费红娘/会员红娘字段。
|
||||
*/
|
||||
Component({
|
||||
options: { addGlobalClass: true },
|
||||
properties: {
|
||||
service: { type: Object, value: null },
|
||||
showRecommendations: { type: Boolean, value: false },
|
||||
},
|
||||
data: {
|
||||
statusLabelMap: {
|
||||
submitted: '已提交申请',
|
||||
assigned: '红娘已分配',
|
||||
in_service: '服务中',
|
||||
waiting_user: '等待你的回应',
|
||||
completed: '服务完成',
|
||||
cancelled: '已取消',
|
||||
},
|
||||
statusKindMap: {
|
||||
submitted: 'info',
|
||||
assigned: 'info',
|
||||
in_service: 'success',
|
||||
waiting_user: 'warning',
|
||||
completed: 'disabled',
|
||||
cancelled: 'disabled',
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onViewDetail() {
|
||||
if (!this.data.service) return;
|
||||
this.triggerEvent('view', { serviceId: this.data.service.serviceId });
|
||||
},
|
||||
onViewRecommendations() {
|
||||
if (!this.data.service) return;
|
||||
this.triggerEvent('recommendations', { serviceId: this.data.service.serviceId });
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"ui-status-badge": "../status-badge/index",
|
||||
"ui-button": "../button/index"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<view class="ui-mm" wx:if="{{service}}">
|
||||
<view class="ui-mm__header" bindtap="onViewDetail">
|
||||
<view class="ui-mm__title-row">
|
||||
<text class="ui-mm__title">公益红娘服务</text>
|
||||
<ui-status-badge
|
||||
kind="{{statusKindMap[service.status]}}"
|
||||
label="{{statusLabelMap[service.status]}}"
|
||||
/>
|
||||
</view>
|
||||
<view wx:if="{{service.matchmakerName}}" class="ui-mm__mm-info">
|
||||
<text>红娘:{{service.matchmakerName}}</text>
|
||||
<text wx:if="{{service.matchmakerOrg}}"> · {{service.matchmakerOrg}}</text>
|
||||
</view>
|
||||
<view class="ui-mm__req">
|
||||
<text class="ui-mm__req-label">你的需求:</text>
|
||||
<text class="ui-mm__req-content">{{service.requirement}}</text>
|
||||
</view>
|
||||
<view wx:if="{{service.lastFollowUpAt}}" class="ui-mm__follow-up">
|
||||
最近跟进:{{service.lastFollowUpAtText || '近期'}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{showRecommendations && service.status === 'in_service' || service.status === 'waiting_user'}}" class="ui-mm__footer">
|
||||
<ui-button
|
||||
variant="secondary"
|
||||
size="md"
|
||||
block
|
||||
bindtap="onViewRecommendations"
|
||||
>查看红娘推荐</ui-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,52 @@
|
||||
.ui-mm {
|
||||
background: var(--color-bg-card);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: var(--spacing-4);
|
||||
margin-bottom: var(--spacing-3);
|
||||
box-shadow: var(--shadow-card);
|
||||
}
|
||||
.ui-mm__header {
|
||||
display: block;
|
||||
}
|
||||
.ui-mm__title-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: var(--spacing-2);
|
||||
}
|
||||
.ui-mm__title {
|
||||
font-size: var(--font-size-lg);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
.ui-mm__mm-info {
|
||||
font-size: var(--font-size-md);
|
||||
color: var(--color-text-secondary);
|
||||
margin-bottom: var(--spacing-2);
|
||||
}
|
||||
.ui-mm__req {
|
||||
padding: var(--spacing-2) var(--spacing-3);
|
||||
background: var(--color-bg-disabled);
|
||||
border-radius: var(--radius-sm);
|
||||
margin-bottom: var(--spacing-2);
|
||||
}
|
||||
.ui-mm__req-label {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--color-text-tertiary);
|
||||
}
|
||||
.ui-mm__req-content {
|
||||
font-size: var(--font-size-sm);
|
||||
color: var(--color-text-secondary);
|
||||
line-height: var(--line-height-normal);
|
||||
display: block;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
.ui-mm__follow-up {
|
||||
font-size: var(--font-size-xs);
|
||||
color: var(--color-text-tertiary);
|
||||
}
|
||||
.ui-mm__footer {
|
||||
margin-top: var(--spacing-3);
|
||||
padding-top: var(--spacing-3);
|
||||
border-top: 1rpx solid var(--color-divider);
|
||||
}
|
||||
Reference in New Issue
Block a user