feat: add demand page modules and admin endpoints

Add full backend support for a demand request page, including:
- New database models for demand hero, feature cards, form configuration, and product recommendations
- Alembic migration for the new tables
- Default seed data for demand page components
- Public site config endpoint exposing demand data
- Admin CRUD operations and configuration for demand modules
- Extended lead query filters for source page, keyword, and date range
- Updated Pydantic schemas for lead query parameters
- Comprehensive test coverage for all new endpoints
This commit is contained in:
duanshuwen
2026-07-07 22:03:57 +08:00
parent d11c361aa2
commit fe85197e68
9 changed files with 749 additions and 15 deletions

View File

@@ -120,6 +120,41 @@ VEHICLE_OPTIONS = [
},
]
DEMAND_HERO = [
{
"kicker": "3步定制",
"title": "告诉我们日期、人数和想法",
"description": "管家会按同行人、预算和体力强度,重新组合酒店、用车和景点节奏。",
"steps": ["提交需求", "管家沟通", "确认方案"],
}
]
DEMAND_FEATURE_CARDS = [
{"title": "动线", "description": "按天数顺路排"},
{"title": "住宿", "description": "城市与山野组合"},
{"title": "用车", "description": "人数行李匹配"},
]
DEMAND_FORM = {
"destinationLabel": "目的地/玩法",
"destinationPlaceholder": "例如:贵州、黄果树、西江苗寨",
"phoneLabel": "联系方式",
"phonePlaceholder": "手机号 / 微信号",
"noteLabel": "补充说明",
"notePlaceholder": "出行日期、人数、酒店偏好、预算范围",
"submitLabel": "提交出行需求",
"chips": ["贵州", "黄果树", "荔波小七孔", "西江苗寨", "梵净山", "万峰林"],
}
DEMAND_RECOMMENDATIONS = [
{
"title": "热门推荐",
"subtitle": "也可以先挑一条线路沟通",
"start": 16,
"end": 22,
}
]
CAMPAIGNS = [
{"slug": "classic-deal", "title": "经典打卡特惠", "start": 0, "end": 8, "coverImage": HERO_SLIDES[0]["image"]},
{"slug": "outdoor-deal", "title": "山野野咖特惠", "start": 8, "end": 16, "coverImage": HERO_SLIDES[1]["image"]},