feat(activity&admin): 优化组局起止时段与性别限制,PC后台核销看板与登录页体验升级

这个提交包含在:
xcbyy
2026-11-05 16:06:18 +08:00
父节点 a1907f18a8
当前提交 f3da2e4a63
共有 21 个文件被更改,包括 1990 次插入 和 203 次删除

查看文件

@@ -88,7 +88,7 @@
<view class="info-list">
<view class="info-row">
<text class="info-label">开始时间</text>
<text class="info-label">活动时段</text>
<text class="info-val">{{ activity.startTime }}</text>
</view>
<view class="info-row">
@@ -98,6 +98,18 @@
<text class="copy-btn">复制</text>
</view>
</view>
<view class="info-row">
<text class="info-label">性别限制</text>
<text
class="info-val"
:class="{
'female-text': activity.genderRequirement === 'FEMALE_ONLY' || activity.genderRequirement === '仅女生',
'male-text': activity.genderRequirement === 'MALE_ONLY' || activity.genderRequirement === '仅男生'
}"
>
{{ formatGenderRequirement(activity.genderRequirement) }}
</text>
</view>
<view class="info-row">
<text class="info-label">核销机制</text>
<text class="info-val green-text">现场出示4位动态门票码核销签到</text>
@@ -502,6 +514,7 @@ const activity = ref({
perPersonFee: 0,
maxParticipants: 0,
currentParticipants: 0,
genderRequirement: 'ALL',
startTime: '',
location: '',
creatorId: 0,
@@ -511,6 +524,12 @@ const activity = ref({
priceAdjustHistory: []
});
const formatGenderRequirement = (req) => {
if (req === 'FEMALE_ONLY' || req === '仅女生') return '仅女生';
if (req === 'MALE_ONLY' || req === '仅男生') return '仅男生';
return '不限性别';
};
useShare(() => {
const act = activity.value;
const title = act && act.title ? `【组局】${act.title}` : '同城热门组局活动邀你加入';
@@ -841,6 +860,17 @@ const handleJoin = () => {
if (!ensureLoginOrRedirect(`/pages/activity/detail?id=${currentActId.value}`)) {
return;
}
const cachedUser = uni.getStorageSync('userInfo') || uni.getStorageSync('USER_INFO') || {};
const userGender = String(cachedUser.gender || '').trim();
const reqGender = activity.value.genderRequirement;
if ((reqGender === 'FEMALE_ONLY' || reqGender === '仅女生') && userGender === '男') {
uni.showToast({ title: '该组局仅限女生报名参与', icon: 'none' });
return;
}
if ((reqGender === 'MALE_ONLY' || reqGender === '仅男生') && userGender === '女') {
uni.showToast({ title: '该组局仅限男生报名参与', icon: 'none' });
return;
}
uni.showModal({
title: '确认报名',
content: `报名该【${activity.value.payType === 'AA' ? 'AA制' : '房主请客'}】组局,${activity.value.payType === 'AA' ? `需支付分摊款 ¥${activity.value.aaFee}` : '由房主全额买单请客'}。报名后自动生成4位入局核销码。`,
@@ -1244,6 +1274,16 @@ const handleJoin = () => {
&.green-text {
color: #10B981;
}
&.female-text {
color: #EC4899;
font-weight: 600;
}
&.male-text {
color: #38BDF8;
font-weight: 600;
}
}
.copy-val {
@@ -2194,6 +2234,14 @@ const handleJoin = () => {
&.green-text {
color: #059669;
}
&.female-text {
color: #DB2777;
font-weight: 600;
}
&.male-text {
color: #2563EB;
font-weight: 600;
}
}
.copy-val .copy-btn {
color: #EA580C;