This commit is contained in:
parent
7bd12fedeb
commit
d505663f4a
|
|
@ -137,6 +137,7 @@
|
|||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -124,6 +124,9 @@ export default {
|
|||
return {
|
||||
petId: '',
|
||||
petInfo: {},
|
||||
currentLayout: 1,
|
||||
activeTab: 0,
|
||||
drawerExpanded: false,
|
||||
recentRecords: [
|
||||
{
|
||||
id: 1,
|
||||
|
|
@ -135,6 +138,64 @@ export default {
|
|||
date: '2024-01-14',
|
||||
content: '带小橘去公园散步,玩得很开心'
|
||||
}
|
||||
],
|
||||
layout1Items: [
|
||||
{ id: 1, icon: '📝', text: '添加记录', action: 'addRecord' },
|
||||
{ id: 2, icon: '💬', text: 'AI聊天', action: 'chatWithPet' },
|
||||
{ id: 3, icon: '📊', text: '健康档案', action: 'viewHealth' },
|
||||
{ id: 4, icon: '⏰', text: '成长时光', action: 'viewTimeline' },
|
||||
{ id: 5, icon: '📋', text: '所有记录', action: 'viewRecords' },
|
||||
{ id: 6, icon: '🔔', text: '提醒设置', action: 'showReminder' },
|
||||
{ id: 7, icon: '📷', text: '拍照记录', action: 'takePhoto' },
|
||||
{ id: 8, icon: '🎵', text: '音频日记', action: 'recordAudio' },
|
||||
{ id: 9, icon: '🏥', text: '医疗记录', action: 'medicalRecord' }
|
||||
],
|
||||
layout2Items: [
|
||||
{ id: 1, icon: '📝', text: '添加记录', action: 'addRecord' },
|
||||
{ id: 2, icon: '💬', text: 'AI聊天', action: 'chatWithPet' },
|
||||
{ id: 3, icon: '📊', text: '健康档案', action: 'viewHealth' },
|
||||
{ id: 4, icon: '⏰', text: '成长时光', action: 'viewTimeline' },
|
||||
{ id: 5, icon: '📋', text: '所有记录', action: 'viewRecords' },
|
||||
{ id: 6, icon: '🔔', text: '提醒设置', action: 'showReminder' },
|
||||
{ id: 7, icon: '📷', text: '拍照记录', action: 'takePhoto' },
|
||||
{ id: 8, icon: '🎵', text: '音频日记', action: 'recordAudio' }
|
||||
],
|
||||
tabs: [
|
||||
{
|
||||
id: 1,
|
||||
name: '日常',
|
||||
items: [
|
||||
{ id: 1, icon: '📝', text: '添加记录', action: 'addRecord' },
|
||||
{ id: 2, icon: '💬', text: 'AI聊天', action: 'chatWithPet' },
|
||||
{ id: 3, icon: '📷', text: '拍照记录', action: 'takePhoto' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '健康',
|
||||
items: [
|
||||
{ id: 4, icon: '📊', text: '健康档案', action: 'viewHealth' },
|
||||
{ id: 5, icon: '🏥', text: '医疗记录', action: 'medicalRecord' },
|
||||
{ id: 6, icon: '💊', text: '用药提醒', action: 'medicineReminder' }
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '其他',
|
||||
items: [
|
||||
{ id: 7, icon: '⏰', text: '成长时光', action: 'viewTimeline' },
|
||||
{ id: 8, icon: '📋', text: '所有记录', action: 'viewRecords' },
|
||||
{ id: 9, icon: '🔔', text: '提醒设置', action: 'showReminder' }
|
||||
]
|
||||
}
|
||||
],
|
||||
layout7Items: [
|
||||
{ id: 1, icon: '📝', text: '添加记录', action: 'addRecord' },
|
||||
{ id: 2, icon: '💬', text: 'AI聊天', action: 'chatWithPet' },
|
||||
{ id: 3, icon: '📊', text: '健康档案', action: 'viewHealth' },
|
||||
{ id: 4, icon: '⏰', text: '成长时光', action: 'viewTimeline' },
|
||||
{ id: 5, icon: '📋', text: '所有记录', action: 'viewRecords' },
|
||||
{ id: 6, icon: '🔔', text: '提醒设置', action: 'showReminder' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
@ -220,6 +281,69 @@ export default {
|
|||
title: '分享功能开发中',
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
|
||||
switchLayout(layoutNumber) {
|
||||
this.currentLayout = layoutNumber
|
||||
},
|
||||
|
||||
handleAction(action) {
|
||||
switch(action) {
|
||||
case 'addRecord':
|
||||
this.addRecord()
|
||||
break
|
||||
case 'chatWithPet':
|
||||
this.chatWithPet()
|
||||
break
|
||||
case 'viewHealth':
|
||||
this.viewHealth()
|
||||
break
|
||||
case 'viewTimeline':
|
||||
this.viewTimeline()
|
||||
break
|
||||
case 'viewRecords':
|
||||
this.viewRecords()
|
||||
break
|
||||
case 'showReminder':
|
||||
uni.showToast({
|
||||
title: '提醒功能开发中',
|
||||
icon: 'none'
|
||||
})
|
||||
break
|
||||
case 'takePhoto':
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['camera'],
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '拍照成功',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
break
|
||||
case 'recordAudio':
|
||||
uni.showToast({
|
||||
title: '音频功能开发中',
|
||||
icon: 'none'
|
||||
})
|
||||
break
|
||||
case 'medicalRecord':
|
||||
uni.showToast({
|
||||
title: '医疗记录功能开发中',
|
||||
icon: 'none'
|
||||
})
|
||||
break
|
||||
case 'medicineReminder':
|
||||
uni.showToast({
|
||||
title: '用药提醒功能开发中',
|
||||
icon: 'none'
|
||||
})
|
||||
break
|
||||
default:
|
||||
console.log('未知操作:', action)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1362
pages/pets/pets.vue
1362
pages/pets/pets.vue
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue