This commit is contained in:
eric
2026-03-15 23:19:43 -05:00
parent 4ed10176e7
commit 501e5b7987
9 changed files with 520 additions and 205 deletions

View File

@@ -29,9 +29,18 @@ export async function POST(request: NextRequest) {
const session = String(formData.session || "").trim();
const ageRange = String(formData.age_range || "").trim();
const wechatOrPhone = String(formData.wechat_or_phone || "").trim();
const intro = String(formData.intro || "").trim();
let intro = String(formData.intro || "").trim();
const firstTime = String(formData.first_time || "").trim();
const agreeRules = !!formData.agree_rules;
const status = String(formData.status || "").trim();
const activityType = String(formData.activity_type || "").trim();
const whyJoin = String(formData.why_join || "").trim();
const region = String(formData.region || "").trim();
const availableTime = String(formData.available_time || "").trim();
if (!intro && (status || activityType || whyJoin || region || availableTime)) {
const extra = [status && `状态:${status}`, activityType && `活动偏好:${activityType}`, whyJoin && `原因:${whyJoin}`, region && `区域:${region}`, availableTime && `时间:${availableTime}`].filter(Boolean).join(" | ");
intro = extra;
}
if (!nickname || !wechatOrPhone || !intro || !session || !agreeRules) {
return NextResponse.json(