Files
gitlab-instance-0a899031_salon/config/home.config.ts
2026-03-18 02:01:48 -05:00

82 lines
5.5 KiB
TypeScript

import { getNextWeekendDates } from "@/app/lib/dates";
/** 开放城市 - 仅深圳 */
export const CITIES = ["深圳"] as const;
/** 活动类型 */
export const ACTIVITY_TYPES = {
"skill-exchange": "技能交换",
"side-hustle": "副业沙龙/茶话会",
"loft": "loft民宿",
"light-chat": "轻话题",
} as const;
/** 活动标签 */
export const SESSION_TAGS = {
"first-friendly": "首次友好",
"public-venue": "公开场地",
"min-4": "4人成行",
"weekend-pm": "周末",
"loft": "loft民宿",
"light-topic": "轻话题",
} as const;
/** loft民宿 占位图 - Unsplash 室内/loft 风格 */
const IMG_LOFT_1 = "https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?w=400&h=300&fit=crop";
const IMG_LOFT_2 = "https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?w=400&h=300&fit=crop";
/** 龙华区红山地铁站 GPS */
export const HONGSHAN_COORDS = { lat: 22.6569, lng: 114.0297 };
/** 本周活动场次(日期占位,实际由 getSessionsWithDates 动态计算) */
const SESSIONS_BASE = [
{ id: "session-1", time: "15:00-18:00", place: "龙华区红山地铁站", city: "深圳", type: "skill-exchange" as const, title: "周末轻社交", coverImage: IMG_LOFT_1, tags: ["first-friendly", "public-venue", "min-4", "weekend-pm", "loft", "light-topic"] as const },
{ id: "session-2", time: "09:00-12:00", place: "龙华区红山地铁站", city: "深圳", type: "side-hustle" as const, title: "数字游民沙龙", coverImage: IMG_LOFT_2, tags: ["first-friendly", "public-venue", "min-4", "weekend-pm", "loft"] as const },
] as const;
/** 获取带动态日期的本周场次(周六/周日自动计算,中国时区) */
export function getSessionsWithDates() {
const { saturday, sunday } = getNextWeekendDates();
return [
{ ...SESSIONS_BASE[0], date: saturday },
{ ...SESSIONS_BASE[1], date: sunday },
];
}
/** 本周活动场次(静态引用,用于 API 等不需要日期的场景) */
export const SESSIONS = SESSIONS_BASE;
/** 历史活动(用于时间轴展示) */
export const PAST_SESSIONS = [
{ id: "past-1", date: "3月9日 周六", time: "15:00-18:00", place: "龙华区红山地铁站", city: "深圳", type: "skill-exchange" as const, title: "周末轻社交", coverImage: IMG_LOFT_1, tags: ["loft", "light-topic"] as const },
{ id: "past-2", date: "3月10日 周日", time: "09:00-12:00", place: "龙华区红山地铁站", city: "深圳", type: "side-hustle" as const, title: "数字游民沙龙", coverImage: IMG_LOFT_2, tags: ["loft"] as const },
{ id: "past-3", date: "3月2日 周六", time: "15:00-18:00", place: "龙华区红山地铁站", city: "深圳", type: "skill-exchange" as const, title: "周末轻社交", coverImage: IMG_LOFT_1, tags: ["loft"] as const },
{ id: "past-4", date: "3月3日 周日", time: "09:00-12:00", place: "龙华区红山地铁站", city: "深圳", type: "side-hustle" as const, title: "数字游民沙龙", coverImage: IMG_LOFT_2, tags: ["loft"] as const },
{ id: "past-5", date: "2月24日 周六", time: "15:00-18:00", place: "龙华区红山地铁站", city: "深圳", type: "skill-exchange" as const, title: "周末轻社交", coverImage: IMG_LOFT_1, tags: ["loft"] as const },
];
/** 发起人 - 点击跳转小红书 */
export const HOSTS = [
{ id: "host-1", name: "发起人", avatar: "/images/11.webp", bio: "数字游民社区发起人,热爱连接同频的人。", link: "https://xhslink.com/m/2GxEJ4eeTNS" },
{ id: "host-2", name: "志愿者", avatar: "/images/volunteer-mystery.svg", bio: "签到、茶歇准备、拍照摄像。", link: "/join?volunteer=1" },
];
/** 数字游民社区 - 符合条件时显示的微信二维码 */
export const DIGITAL_NOMAD_WECHAT_QR = "/images/QR.png";
/** 最近报名意向 - mock 数据,中国女性头像,含小红书昵称与主页链接 */
export const RECENT_JOINERS = [
{ name: "晓琪", avatar: "https://images.unsplash.com/photo-1589553009868-c7b2bb474531?w=80&h=80&fit=crop&crop=face", xiaohongshu_url: "https://www.xiaohongshu.com/user/profile/xxx" },
{ name: "雨晴", avatar: "https://images.unsplash.com/photo-1617187703472-9508e9d3d198?w=80&h=80&fit=crop&crop=face", xiaohongshu_url: "https://www.xiaohongshu.com/user/profile/xxx" },
{ name: "子豪", avatar: "https://images.unsplash.com/photo-1624803642337-2639de804c57?w=80&h=80&fit=crop&crop=face", xiaohongshu_url: "https://www.xiaohongshu.com/user/profile/xxx" },
{ name: "林晓", avatar: "https://images.unsplash.com/photo-1534751516642-a1af1ef26a56?w=80&h=80&fit=crop&crop=face", xiaohongshu_url: "https://www.xiaohongshu.com/user/profile/xxx" },
{ name: "佳琪", avatar: "https://images.unsplash.com/photo-1593519544233-57d84925abb4?w=80&h=80&fit=crop&crop=face", xiaohongshu_url: "https://www.xiaohongshu.com/user/profile/xxx" },
{ name: "浩然", avatar: "https://images.unsplash.com/photo-1623512083603-5068ca8290f4?w=80&h=80&fit=crop&crop=face", xiaohongshu_url: "https://www.xiaohongshu.com/user/profile/xxx" },
{ name: "心怡", avatar: "https://images.unsplash.com/photo-1534528741775-53994a69daeb?w=80&h=80&fit=crop&crop=face", xiaohongshu_url: "https://www.xiaohongshu.com/user/profile/xxx" },
{ name: "阿杰", avatar: "https://images.unsplash.com/photo-1627008320558-9d59b27cb732?w=80&h=80&fit=crop&crop=face", xiaohongshu_url: "https://www.xiaohongshu.com/user/profile/xxx" },
];
/** 周六场 mock 头像(晓琪、雨晴、子豪) */
export const MOCK_JOINERS_SESSION1 = RECENT_JOINERS.slice(0, 3);
/** 周日场 mock 头像(林晓、佳琪、浩然),与周六完全不重复 */
export const MOCK_JOINERS_SESSION2 = RECENT_JOINERS.slice(3, 6);