This commit adds full support for two new destination page modules: a hero banner section and categorized destination regions. Changes include: - New SQLAlchemy models and alembic migration for DestinationHero and DestinationRegion tables - Updated Pydantic SiteConfigPatchIn schema with new optional fields - Integrated admin CRUD support for the new modules - Added default seed data for Guizhou destination regions and hero content - Exposed active modules via public site config API - Added comprehensive test coverage for admin and public endpoints
128 lines
5.6 KiB
Python
128 lines
5.6 KiB
Python
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人同行、亲子或长辈出行,留足行李和休息空间。",
|
||
},
|
||
]
|
||
|
||
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"]},
|
||
]
|