nomadro/src/modules/social/lib/cities.ts
Eric ffa456afdf Ship social join profile + SeaweedFS avatars, notify/coffee, and .com audience stack.
Pay-then-profile join desk with live card, S3 upload fallback, hydration-safe drafts; document on test9 README.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-04 02:25:05 +08:00

218 lines
4.5 KiB
TypeScript

/** Offline city catalog — seed inspired by meetup.hackrobot.cn destination list. */
export type SocialCity = {
id: string;
name: string;
country: string;
emoji: string;
vibe: string;
members: number;
costHint: string;
wifiMbps: number;
tags: string[];
hot?: boolean;
lat: number;
lng: number;
meetupCount?: number;
};
export const SOCIAL_CITIES: SocialCity[] = [
{
id: "dali",
name: "大理",
country: "中国",
emoji: "🏔️",
vibe: "苍山洱海 · 慢生活",
members: 520,
meetupCount: 12,
costHint: "¥3,000/月起",
wifiMbps: 50,
tags: ["热门", "便宜", "山城"],
hot: true,
lat: 25.6065,
lng: 100.2679,
},
{
id: "chengdu",
name: "成都",
country: "中国",
emoji: "🌶️",
vibe: "天府之国 · 美食慢节奏",
members: 680,
meetupCount: 18,
costHint: "¥4,500/月起",
wifiMbps: 80,
tags: ["热门", "美食", "宜居"],
hot: true,
lat: 30.5728,
lng: 104.0668,
},
{
id: "hangzhou",
name: "杭州",
country: "中国",
emoji: "🏞️",
vibe: "西湖 · 互联网重镇",
members: 560,
meetupCount: 14,
costHint: "¥6,000/月起",
wifiMbps: 100,
tags: ["热门", "高速网络"],
hot: true,
lat: 30.2741,
lng: 120.1551,
},
{
id: "kunming",
name: "昆明",
country: "中国",
emoji: "🌸",
vibe: "四季如春 · 通往东南亚",
members: 380,
meetupCount: 8,
costHint: "¥3,500/月起",
wifiMbps: 55,
tags: ["温暖", "便宜"],
lat: 25.0389,
lng: 102.7183,
},
{
id: "shenzhen",
name: "深圳",
country: "中国",
emoji: "🚀",
vibe: "科技创新 · 创业友好",
members: 850,
meetupCount: 22,
costHint: "¥8,000/月起",
wifiMbps: 120,
tags: ["热门", "高速网络", "一线城市"],
hot: true,
lat: 22.5431,
lng: 114.0579,
},
{
id: "xiamen",
name: "厦门",
country: "中国",
emoji: "🏝️",
vibe: "海滨花园 · 鼓浪屿",
members: 320,
meetupCount: 7,
costHint: "¥5,500/月起",
wifiMbps: 70,
tags: ["海滨", "温暖"],
lat: 24.4798,
lng: 118.0894,
},
{
id: "shanghai",
name: "上海",
country: "中国",
emoji: "🌆",
vibe: "国际大都市 · 文化交汇",
members: 1200,
meetupCount: 28,
costHint: "¥10,000/月起",
wifiMbps: 110,
tags: ["一线城市", "热门"],
hot: true,
lat: 31.2304,
lng: 121.4737,
},
{
id: "lijiang",
name: "丽江",
country: "中国",
emoji: "🏯",
vibe: "玉龙雪山 · 古城慢旅",
members: 280,
meetupCount: 5,
costHint: "¥3,200/月起",
wifiMbps: 45,
tags: ["便宜", "山城"],
lat: 26.8721,
lng: 100.2299,
},
{
id: "chiangmai",
name: "清迈",
country: "泰国",
emoji: "🌿",
vibe: "Nimman · 游民大本营",
members: 940,
meetupCount: 36,
costHint: "฿18,000/月起",
wifiMbps: 90,
tags: ["热门", "友好社区", "高速网络"],
hot: true,
lat: 18.7883,
lng: 98.9853,
},
{
id: "bali",
name: "巴厘岛",
country: "印尼",
emoji: "🌴",
vibe: "Canggu · 冲浪与 cowork",
members: 720,
meetupCount: 24,
costHint: "Rp8jt/月起",
wifiMbps: 60,
tags: ["海滨", "温暖", "热门"],
hot: true,
lat: -8.6478,
lng: 115.1385,
},
{
id: "lisbon",
name: "里斯本",
country: "葡萄牙",
emoji: "🌊",
vibe: "阳光海岸 · 欧洲时区",
members: 610,
meetupCount: 16,
costHint: "€1,200/月起",
wifiMbps: 100,
tags: ["海滨", "友好社区"],
lat: 38.7223,
lng: -9.1393,
},
{
id: "penang",
name: "槟城",
country: "马来西亚",
emoji: "🍜",
vibe: "美食 · 海风开放工位",
members: 260,
meetupCount: 6,
costHint: "RM2,800/月起",
wifiMbps: 100,
tags: ["美食", "便宜"],
lat: 5.4141,
lng: 100.3288,
},
];
export const CITY_FILTER_TAGS = [
"全部",
"热门",
"便宜",
"高速网络",
"温暖",
"海滨",
"山城",
"一线城市",
"友好社区",
"美食",
] as const;
export function getCityById(id: string): SocialCity | undefined {
return SOCIAL_CITIES.find((c) => c.id === id);
}
export function getCityByName(name: string): SocialCity | undefined {
const n = name.split("·")[0].trim();
return SOCIAL_CITIES.find((c) => c.name === n);
}