Files
WonderQ-Admin/app/content.py
duanshuwen fe85197e68 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
2026-07-07 22:03:57 +08:00

163 lines
6.8 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

HERO_SLIDES = [
{
"title": "经典人文打卡线路",
"kicker": "经典人文",
"action": "查看线路",
"image": "/assets/guizhou/huangguoshu-waterfall.jpg",
"targetValue": "classic-deal",
},
{
"title": "极限山野户外野咖线路",
"kicker": "山野户外",
"action": "探索玩法",
"image": "/assets/guizhou/wanfenglin.jpg",
"targetValue": "outdoor-deal",
},
{
"title": "人文+户外综合混搭线路",
"kicker": "人文+户外",
"action": "定制小团",
"image": "/assets/guizhou/xijiang-miao-village.jpg",
"targetValue": "classic-deal",
},
]
DESTINATIONS = [
("贵阳", "/assets/guizhou/jiaxiu-tower.jpg"),
("黄果树", "/assets/guizhou/huangguoshu-waterfall.jpg"),
("荔波小七孔", "/assets/guizhou/libo-xiaoqikong.jpg"),
("西江苗寨", "/assets/guizhou/xijiang-miao-village.jpg"),
("梵净山", "/assets/guizhou/fanjing-mountain.jpg"),
("镇远古城", "/assets/guizhou/zhenyuan-ancient-town.jpg"),
("万峰林", "/assets/guizhou/wanfenglin.jpg"),
("织金洞", "/assets/guizhou/zhijin-cave.jpg"),
("百里杜鹃", "/assets/guizhou/baili-azalea.jpg"),
("乌蒙草原", "/assets/guizhou/wumeng-grassland.jpg"),
("赤水丹霞", "/assets/guizhou/chishui-danxia.jpg"),
("肇兴侗寨", "/assets/guizhou/dong-village.jpg"),
("加榜梯田", "/assets/guizhou/jiabang-terrace.jpg"),
("青岩古镇", "/assets/guizhou/zhenyuan-ancient-town.jpg"),
("娄山关", "/assets/guizhou/chishui-danxia.jpg"),
("十二背后", "/assets/guizhou/zhijin-cave.jpg"),
("黔东南", "/assets/guizhou/xijiang-miao-village.jpg"),
]
DESTINATION_HERO = [
{
"title": "山水、苗寨、古城与野咖同程安排",
"kicker": "贵州小包团目的地",
"image": "/assets/guizhou/huangguoshu-waterfall.jpg",
},
]
DESTINATION_REGIONS = [
{"label": "贵阳/安顺", "keyword": "贵阳安顺", "spots": "甲秀楼、黄果树"},
{"label": "黔东南", "keyword": "黔东南", "spots": "西江、镇远、肇兴"},
{"label": "黔南", "keyword": "黔南荔波", "spots": "荔波小七孔、茂兰"},
{"label": "铜仁", "keyword": "铜仁梵净山", "spots": "梵净山、云舍"},
{"label": "黔西南", "keyword": "黔西南万峰林", "spots": "万峰林、马岭河"},
{"label": "遵义/黔北", "keyword": "遵义赤水", "spots": "娄山关、赤水丹霞"},
{"label": "毕节/六盘水", "keyword": "毕节六盘水", "spots": "织金洞、乌蒙草原"},
]
ALIASES = {
"贵阳": ["贵阳", "青岩", "花溪", "高坡", "天河潭"],
"黄果树": ["黄果树", "安顺", "坝陵河", "瀑布"],
"荔波小七孔": ["荔波", "小七孔", "茂兰", "水上森林"],
"西江苗寨": ["西江", "苗寨", "郎德", "雷山", "苗岭"],
"梵净山": ["梵净山", "铜仁", "云舍", "寨沙"],
"镇远古城": ["镇远", "青龙洞", "古城"],
"肇兴侗寨": ["肇兴", "侗寨", "堂安", "加榜", "黎平", "侗族大歌"],
"万峰林": ["万峰林", "万峰湖", "马岭河", "兴义", "黔西南"],
"织金洞": ["织金洞", "织金", "洞穴", "喀斯特"],
"赤水丹霞": ["赤水", "丹霞", "竹海", "丙安"],
"青岩古镇": ["青岩", "古镇", "屯堡"],
"百里杜鹃": ["百里杜鹃", "毕节", "花季"],
"乌蒙草原": ["乌蒙", "六盘水", "草原", "避暑"],
"加榜梯田": ["加榜", "梯田", "黔东南"],
"娄山关": ["娄山关", "遵义", "红色文化", "黔北"],
"十二背后": ["十二背后", "石龙洞", "酷玩森林", "罗秧河", "莲花古洞", "溶洞"],
"黔东南": ["黔东南", "苗绣", "蜡染", "侗族大歌", "长桌宴"],
}
THEMES = [
("独特的风光地貌", "/assets/guizhou/fanjing-mountain.jpg"),
("天然的溶洞探险", "/assets/guizhou/zhijin-cave.jpg"),
("特有的人文体验", "/assets/guizhou/miao-costume.jpg"),
("山野里的咖啡厅", "/assets/guizhou/wanfenglin.jpg"),
]
CTAS = [
("万趣贵州小包团权益", "/assets/guizhou/huangguoshu-waterfall.jpg", "cardBenefits", None),
("咨询贵州定制游服务管家", "/assets/guizhou/xijiang-miao-village.jpg", "campaign", "classic-deal"),
("查看贵州省内目的地", "/assets/guizhou/libo-xiaoqikong.jpg", "destinationPicker", None),
("提交贵州出行需求", "/assets/guizhou/shuichunhe-rafting.jpg", "demand", None),
]
HOTEL_GROUPS = [
{
"title": "经典酒店",
"image": "/assets/guizhou/bailian-hot-spring.jpg",
"description": "城市接驳、景区度假和温泉休整,适合首游贵州的小包团动线。",
},
{
"title": "野奢酒店",
"image": "/assets/guizhou/jianhe-hot-spring.jpg",
"description": "把山地、村寨、星空和温泉留给行程里的慢时刻。",
},
]
VEHICLE_OPTIONS = [
{
"title": "5座舒适用车",
"image": "/assets/guizhou/jiaxiu-tower.jpg",
"description": "适合2-4人家庭或好友小团城市接送、景区穿梭更灵活。",
},
{
"title": "9座精品商务车",
"image": "/assets/guizhou/wanfenglin.jpg",
"description": "适合5-8人同行、亲子或长辈出行留足行李和休息空间。",
},
]
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"]},
{"slug": "mixed-route", "title": "人文户外混搭", "start": 16, "end": 24, "coverImage": HERO_SLIDES[2]["image"]},
]