feat(activity): 发单页统一组局与平台派单入口,接单大厅展示附近组局

- 移除附近活动页顶部单独的派单按钮(入口重复)

- 「我要发单」新增发布类型切换:发起组局 / 平台派单,派单模式填预算与时长并内联拉起支付,支付成功进入待接单池

- 接单大厅新增「附近组局(可报名)」区块,展示招募中的组局并可进入详情报名

- 113 套件/738 用例全绿
这个提交包含在:
xcbyy
2026-10-21 18:03:09 +08:00
父节点 14ce4b25f5
当前提交 33b6a3ea7d
共有 10 个文件被更改,包括 307 次插入 和 64 次删除

查看文件

@@ -108,6 +108,26 @@
</view>
</view>
<!-- 附近组局(招募中的组局,大神可报名参加) -->
<view class="nearby-activities-section" v-if="nearbyActivities.length > 0">
<view class="nearby-activity-head">
<text class="nearby-activity-title">附近组局(可报名)</text>
<text class="nearby-activity-more" @click="goActivityHall">查看全部 ›</text>
</view>
<view
v-for="act in nearbyActivities"
:key="act.id"
class="nearby-activity-card btn-active"
@click="openActivity(act)"
>
<view class="na-row">
<text class="na-title">{{ act.title }}</text>
<text class="na-fee">{{ act.payType === 'PROJECT' ? '房主请客' : `人均 ¥${act.perPersonFee}` }}</text>
</view>
<text class="na-meta">{{ act.startTime || '时间待定' }} · {{ act.location || '地点待定' }} · {{ act.currentParticipants }}/{{ act.maxParticipants }} 人</text>
</view>
</view>
<!-- 派单需求全貌看板弹窗 (方案1) -->
<view class="dispatch-detail-mask" v-if="showDetailModal" @click="closeOrderDetailModal">
<view class="dispatch-detail-modal" @click.stop="stopPropagation">
@@ -231,7 +251,7 @@ import AppTabBar from '@/components/CustomTabBar.vue';
import { ICONS } from '@/common/icons.js';
import { getCurrentThemeKey, applyThemeToNativeUI } from '@/common/theme.js';
import { isExpertCertified } from '@/common/role.js';
import { claimOrder, getOrdersPool, getExpertStats, updateCompanionProfile, getUserProfile } from '@/common/api.js';
import { claimOrder, getOrdersPool, getExpertStats, updateCompanionProfile, getUserProfile, getActivities } from '@/common/api.js';
import { getUserLocation } from '@/common/location.js';
import { getNavBarInfo } from '@/common/nav.js';
@@ -276,6 +296,17 @@ const todayStats = ref({
waitingVerify: 0
});
const nearbyActivities = ref([]);
const openActivity = (act) => {
if (!act || !act.id) return;
uni.navigateTo({ url: `/pages/activity/detail?id=${act.id}` });
};
const goActivityHall = () => {
uni.switchTab({ url: '/pages/activity/list' });
};
const onThemeChanged = (newTheme) => {
currentThemeKey.value = newTheme;
applyThemeToNativeUI(newTheme);
@@ -344,6 +375,13 @@ const loadHallData = async () => {
};
});
}
}).catch(() => {}),
getActivities().then((list) => {
const arr = Array.isArray(list) ? list : [];
nearbyActivities.value = arr
.filter((a) => a && (a.status === 'RECRUITING' || a.status === '招募中'))
.slice(0, 5);
}).catch(() => {})
]);
} catch (err) {
@@ -1474,4 +1512,65 @@ const copyOrderNo = () => {
}
}
}
/* 附近组局(招募中) */
.nearby-activities-section {
margin-top: 28rpx;
padding: 24rpx;
border-radius: 24rpx;
background: #151D30;
border: 1rpx solid rgba(255, 255, 255, 0.08);
.nearby-activity-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12rpx;
}
.nearby-activity-title {
font-size: 28rpx;
font-weight: 600;
color: #F8FAFC;
}
.nearby-activity-more {
font-size: 22rpx;
color: #10B981;
}
.nearby-activity-card {
padding: 18rpx 0;
border-top: 1rpx solid rgba(255, 255, 255, 0.06);
&:first-of-type {
border-top: none;
}
.na-row {
display: flex;
justify-content: space-between;
gap: 12rpx;
}
.na-title {
flex: 1;
font-size: 26rpx;
font-weight: 600;
color: #E2E8F0;
}
.na-fee {
font-size: 24rpx;
color: #10B981;
}
.na-meta {
display: block;
margin-top: 8rpx;
font-size: 22rpx;
color: #94A3B8;
}
}
}
</style>