diff --git a/pages/adoption/adoption.vue b/pages/adoption/adoption.vue index 57190b3..5e66252 100644 --- a/pages/adoption/adoption.vue +++ b/pages/adoption/adoption.vue @@ -509,7 +509,244 @@ class AdoptionManager { publishTime: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString() }) - // 更多测试数据... + // 狗狗数据 + testData.push({ + id: Date.now() + 2, + name: '小金', + type: 'dog', + breed: 'golden-retriever', + age: 1, + gender: 'female', + photos: ['https://images.unsplash.com/photo-1552053831-71594a27632d?w=400&h=300&fit=crop', 'https://images.unsplash.com/photo-1583337130417-3346a1be7dee?w=400&h=300&fit=crop'], + description: '小金是一只活泼可爱的金毛幼犬,性格温顺友善,非常聪明。喜欢和小朋友玩耍,是很好的家庭伴侣犬。已完成基础疫苗接种。', + personality: ['活泼', '友善', '聪明', '温顺'], + health: '健康良好,疫苗已接种', + location: { + province: 'shanghai', + city: 'shanghai', + district: 'huangpu', + address: '黄浦区宠物收容所' + }, + status: 'available', + requirements: [ + '有养狗经验', + '有足够活动空间', + '能定期遛狗', + '同意绝育手术' + ], + contact: { + name: '上海宠物救助中心', + phone: '139****5678', + wechat: 'sh_pet_rescue', + type: 'organization' + }, + publishTime: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000).toISOString() + }) + + // 猫咪数据2 + testData.push({ + id: Date.now() + 3, + name: '小白', + type: 'cat', + breed: 'ragdoll', + age: 3, + gender: 'female', + photos: ['https://images.unsplash.com/photo-1596854407944-bf87f6fdd49e?w=400&h=300&fit=crop', 'https://images.unsplash.com/photo-1548247416-ec66f4900b2e?w=400&h=300&fit=crop'], + description: '小白是一只美丽的布偶猫,性格非常温柔,喜欢被抱抱。毛发柔软,眼睛湛蓝,是典型的布偶猫特征。已绝育,疫苗齐全。', + personality: ['温柔', '安静', '粘人', '优雅'], + health: '健康良好,已绝育,疫苗齐全', + location: { + province: 'guangdong', + city: 'guangzhou', + district: 'tianhe', + address: '天河区动物保护协会' + }, + status: 'available', + requirements: [ + '有稳定收入', + '室内饲养', + '定期美容', + '同意回访' + ], + contact: { + name: '广州动物保护协会', + phone: '137****9012', + wechat: 'gz_animal_care', + type: 'organization' + }, + publishTime: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString() + }) + + // 狗狗数据2 + testData.push({ + id: Date.now() + 4, + name: '豆豆', + type: 'dog', + breed: 'corgi', + age: 2, + gender: 'male', + photos: ['https://images.unsplash.com/photo-1518717758536-85ae29035b6d?w=400&h=300&fit=crop', 'https://images.unsplash.com/photo-1583337130417-3346a1be7dee?w=400&h=300&fit=crop'], + description: '豆豆是一只可爱的柯基犬,短腿大屁股,走路摇摆很萌。性格活泼开朗,喜欢和人互动,是很好的陪伴犬。已完成疫苗接种。', + personality: ['活泼', '开朗', '友好', '机灵'], + health: '健康良好,疫苗已接种', + location: { + province: 'jiangsu', + city: 'nanjing', + district: 'xuanwu', + address: '玄武区宠物救助站' + }, + status: 'available', + requirements: [ + '有养宠经验', + '能接受掉毛', + '定期运动', + '负责任的主人' + ], + contact: { + name: '南京宠物救助站', + phone: '135****3456', + wechat: 'nj_pet_help', + type: 'organization' + }, + publishTime: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000).toISOString() + }) + + // 猫咪数据3 + testData.push({ + id: Date.now() + 5, + name: '小黑', + type: 'cat', + breed: 'mixed', + age: 1, + gender: 'male', + photos: ['https://images.unsplash.com/photo-1513245543132-31f507417b26?w=400&h=300&fit=crop', 'https://images.unsplash.com/photo-1571566882372-1598d88abd90?w=400&h=300&fit=crop'], + description: '小黑是一只可爱的小黑猫,虽然是混血但非常健康活泼。刚刚1岁,正是最可爱的年纪。性格独立但也很亲人,适合各种家庭。', + personality: ['独立', '亲人', '活泼', '好奇'], + health: '健康良好,疫苗已接种', + location: { + province: 'beijing', + city: 'beijing', + district: 'haidian', + address: '海淀区流浪动物救助中心' + }, + status: 'reserved', + requirements: [ + '爱心家庭', + '室内饲养', + '定期体检', + '不离不弃' + ], + contact: { + name: '海淀救助中心', + phone: '136****7890', + wechat: 'hd_animal_rescue', + type: 'organization' + }, + publishTime: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString() + }) + + // 兔子数据 + testData.push({ + id: Date.now() + 6, + name: '雪球', + type: 'rabbit', + breed: 'holland-lop', + age: 1, + gender: 'female', + photos: ['https://images.unsplash.com/photo-1585110396000-c9ffd4e4b308?w=400&h=300&fit=crop', 'https://images.unsplash.com/photo-1583337130417-3346a1be7dee?w=400&h=300&fit=crop'], + description: '雪球是一只可爱的荷兰垂耳兔,全身雪白,耳朵垂下来很萌。性格温顺,喜欢吃胡萝卜和青菜。适合安静的家庭饲养。', + personality: ['温顺', '安静', '可爱', '乖巧'], + health: '健康良好,已体检', + location: { + province: 'shanghai', + city: 'shanghai', + district: 'xuhui', + address: '徐汇区小动物保护基地' + }, + status: 'available', + requirements: [ + '了解兔子习性', + '提供合适笼舍', + '定期清理', + '耐心照料' + ], + contact: { + name: '小动物保护基地', + phone: '138****2468', + wechat: 'small_animal_care', + type: 'organization' + }, + publishTime: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString() + }) + + // 狗狗数据3 + testData.push({ + id: Date.now() + 7, + name: '大黄', + type: 'dog', + breed: 'mixed', + age: 4, + gender: 'male', + photos: ['https://images.unsplash.com/photo-1587300003388-59208cc962cb?w=400&h=300&fit=crop', 'https://images.unsplash.com/photo-1583337130417-3346a1be7dee?w=400&h=300&fit=crop'], + description: '大黄是一只忠诚的中华田园犬,虽然年龄稍大但身体健康。性格稳重,对主人非常忠诚,是很好的看家犬和陪伴犬。', + personality: ['忠诚', '稳重', '护主', '温和'], + health: '健康良好,已绝育', + location: { + province: 'guangdong', + city: 'shenzhen', + district: 'futian', + address: '福田区流浪动物救助站' + }, + status: 'available', + requirements: [ + '有院子更佳', + '能接受中大型犬', + '有责任心', + '不嫌弃年龄' + ], + contact: { + name: '深圳流浪动物救助站', + phone: '134****1357', + wechat: 'sz_stray_help', + type: 'organization' + }, + publishTime: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString() + }) + + // 猫咪数据4 + testData.push({ + id: Date.now() + 8, + name: '咪咪', + type: 'cat', + breed: 'siamese', + age: 2, + gender: 'female', + photos: ['https://images.unsplash.com/photo-1606214174585-fe31582dc6ee?w=400&h=300&fit=crop', 'https://images.unsplash.com/photo-1583337130417-3346a1be7dee?w=400&h=300&fit=crop'], + description: '咪咪是一只优雅的暹罗猫,有着美丽的蓝眼睛和独特的重点色毛发。性格活泼聪明,喜欢和人交流,会发出各种声音表达情感。', + personality: ['聪明', '活泼', '优雅', '善交流'], + health: '健康良好,已绝育,疫苗齐全', + location: { + province: 'jiangsu', + city: 'suzhou', + district: 'gusu', + address: '姑苏区宠物救助中心' + }, + status: 'adopted', + requirements: [ + '有养猫经验', + '能理解暹罗猫特性', + '室内饲养', + '定期互动' + ], + contact: { + name: '苏州宠物救助中心', + phone: '132****8024', + wechat: 'sz_pet_center', + type: 'organization' + }, + publishTime: new Date(Date.now() - 8 * 24 * 60 * 60 * 1000).toISOString() + }) + return testData } diff --git a/pages/pets/add-pet.vue b/pages/pets/add-pet.vue index 311b7e8..3abd9dc 100644 --- a/pages/pets/add-pet.vue +++ b/pages/pets/add-pet.vue @@ -1,45 +1,136 @@