feat: 新增「喝什么」场景,支持奶茶/咖啡/酒吧等饮品店搜索
引入场景系统(SceneType),首页增加「吃什么」「喝什么」切换 Tab, 不同场景使用不同的高德 POI 类型、热门标签、价格区间和全链路文案。 场景信息存储在房间数据中,邀请/分享/匹配结果等页面自动适配。
This commit is contained in:
@@ -5,7 +5,8 @@ import { Users, QrCode, LogOut, Crown, Lock } from "lucide-react";
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
import QrInviteModal from "./QrInviteModal";
|
||||
import RoomManageModal from "./RoomManageModal";
|
||||
import type { UserProfile } from "@/types";
|
||||
import type { UserProfile, SceneType } from "@/types";
|
||||
import { getSceneConfig } from "@/lib/sceneConfig";
|
||||
|
||||
interface TopNavProps {
|
||||
roomId: string;
|
||||
@@ -18,6 +19,7 @@ interface TopNavProps {
|
||||
swipeCounts?: Record<string, number>;
|
||||
totalCards?: number;
|
||||
userProfiles?: Record<string, UserProfile>;
|
||||
scene?: SceneType;
|
||||
}
|
||||
|
||||
export default function TopNav({
|
||||
@@ -31,7 +33,9 @@ export default function TopNav({
|
||||
swipeCounts = {},
|
||||
totalCards = 0,
|
||||
userProfiles = {},
|
||||
scene = "eat",
|
||||
}: TopNavProps) {
|
||||
const sceneConfig = getSceneConfig(scene);
|
||||
const [toast, setToast] = useState("");
|
||||
const [showQr, setShowQr] = useState(false);
|
||||
const [showManage, setShowManage] = useState(false);
|
||||
@@ -110,6 +114,7 @@ export default function TopNav({
|
||||
onClose={() => setShowQr(false)}
|
||||
roomId={roomId}
|
||||
onToast={showToast}
|
||||
scene={scene}
|
||||
/>
|
||||
|
||||
{isCreator && (
|
||||
|
||||
Reference in New Issue
Block a user