Files
PetCommunity/miniprogram/utils/constants.ts
chenwu 24891d9004 chore: 补全工程配置,部署云函数,建立数据库索引
- 新增 .gitignore(排除 node_modules、私有配置、编译产物)
- 新增 cloudbaserc.json,绑定云环境 cloud1-d4g697lte499543d8
- project.config.json:补 miniprogramRoot、开启 useCompilerPlugins typescript,修复预览报 app.json 找不到的问题
- tsconfig.json:移除无效 typeRoots,解除 TypeScript 编译阻断
- miniprogram/app.json:移除 glass-easel(需基础库 3.x,兼容性差)
- miniprogram/utils/constants.ts:填入真实云环境 ID
- cloudfunctions/updateLocation:位置字段改用 GeoPoint 以支持地理索引
- cloudfunctions/getNearbyPets:改用 geoNear 聚合管道,支持真实距离排序

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-06 00:37:33 +08:00

59 lines
1.5 KiB
TypeScript

export const CLOUD_ENV = 'cloud1-d4g697lte499543d8'
export const COLORS = {
pink: '#ff4f91',
orange: '#ff9f1c',
yellow: '#ffe15a',
green: '#2fd37a',
mint: '#67e8c9',
blue: '#4d8dff',
violet: '#8c5cff',
ink: '#272235',
bgPrimary: '#fff9fb',
textPrimary: '#272235',
textSecondary: '#6a6178',
textTertiary: '#9b8fa8',
}
export const AVATAR_GRADIENTS = [
'linear-gradient(135deg, #ffd6e8, #fff1a6)',
'linear-gradient(135deg, #ffe7a0, #b7f4d2)',
'linear-gradient(135deg, #c9f7df, #d9d2ff)',
'linear-gradient(135deg, #cfe8ff, #ffd6e8)',
'linear-gradient(135deg, #e3d8ff, #ffd6e8)',
]
export const MOOD_OPTIONS = [
{ label: '开心 😄', value: 'happy' },
{ label: '累了 😮‍💨', value: 'tired' },
{ label: '求玩伴 🐾', value: 'playmate' },
{ label: '晒娃 📸', value: 'show' },
{ label: '散步中 🌿', value: 'walking' },
{ label: '在医院 🏥', value: 'hospital' },
]
export const HOT_HASHTAGS = [
'#上海遛狗',
'#求玩伴',
'#静安区',
'#比熊',
'#柴犬',
'#金毛',
'#布偶猫',
'#英短',
'#宠物友好',
'#周末遛狗',
]
export const BREED_OPTIONS = {
dog: ['比熊', '柴犬', '金毛', '泰迪', '边牧', '法斗', '哈士奇', '萨摩耶', '拉布拉多', '其他'],
cat: ['英短', '布偶', '美短', '加菲', '暹罗', '橘猫', '黑猫', '其他'],
other: ['兔子', '仓鼠', '鹦鹉', '龟', '其他'],
}
export const NEARBY_RADIUS_KM = 5
export const PAGE_SIZE = 10
export const HEARTBEAT_INTERVAL_MS = 60000