Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
0d9a4eb3
Commit
0d9a4eb3
authored
Jul 28, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feeding
parent
be8c4f4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
9 deletions
+30
-9
feedingIndex.vue
pages/feedingIndex/feedingIndex.vue
+15
-9
feedingRecord.vue
pages/feedingRecord/feedingRecord.vue
+15
-0
No files found.
pages/feedingIndex/feedingIndex.vue
View file @
0d9a4eb3
...
...
@@ -497,8 +497,8 @@ const showBabySwitchPopup = ref(false)
// 为每种喂养方式设置独立的数据 - 根据接口数据初始化
const
feedingData
=
ref
({
breastfeeding
:
{
leftDuration
:
0
,
rightDuration
:
0
leftDuration
:
5
,
rightDuration
:
5
},
bottle
:
{
amount
:
0
// 首次默认定位到0ml
...
...
@@ -811,8 +811,8 @@ function clearPreviousState() {
// 清空计时器状态(如果不在计时中)
if
(
!
isLeftTimerRunning
.
value
&&
!
isRightTimerRunning
.
value
)
{
// 重置母乳亲喂的时长
feedingData
.
value
.
breastfeeding
.
leftDuration
=
0
feedingData
.
value
.
breastfeeding
.
rightDuration
=
0
feedingData
.
value
.
breastfeeding
.
leftDuration
=
5
feedingData
.
value
.
breastfeeding
.
rightDuration
=
5
}
// 清空其他喂养方式的数据
...
...
@@ -838,8 +838,8 @@ function clearPreviousState() {
// 清空喂养数据(保存成功后调用)
function
clearFeedingData
()
{
// 清空所有喂养方式的数据
feedingData
.
value
.
breastfeeding
.
leftDuration
=
0
feedingData
.
value
.
breastfeeding
.
rightDuration
=
0
feedingData
.
value
.
breastfeeding
.
leftDuration
=
5
feedingData
.
value
.
breastfeeding
.
rightDuration
=
5
feedingData
.
value
.
bottle
.
amount
=
0
feedingData
.
value
.
formula
.
amount
=
0
feedingData
.
value
.
food
.
selectedItems
=
[]
...
...
@@ -1147,7 +1147,7 @@ async function completeRecord() {
// 检查当前是否为语音模式(辅食除外)
const
currentMethod
=
recordMethods
.
value
[
selectedType
.
value
]
if
(
currentMethod
===
'voice'
&&
selectedType
.
value
!==
'food'
)
{
// 语音模式应该在语音识别
弹窗
中确认提交,这里不处理
// 语音模式应该在语音识别
结果
中确认提交,这里不处理
uni
.
showToast
({
title
:
'请在语音识别结果中确认提交'
,
icon
:
'none'
...
...
@@ -1209,7 +1209,10 @@ async function completeRecord() {
icon
:
'none'
})
}
finally
{
isSubmitting
.
value
=
false
// 添加2秒防连点
setTimeout
(()
=>
{
isSubmitting
.
value
=
false
},
2000
)
}
}
...
...
@@ -2175,7 +2178,10 @@ async function completeVoiceRecord() {
icon
:
'none'
})
}
finally
{
isSubmitting
.
value
=
false
// 添加2秒防连点
setTimeout
(()
=>
{
isSubmitting
.
value
=
false
},
2000
)
}
}
...
...
pages/feedingRecord/feedingRecord.vue
View file @
0d9a4eb3
...
...
@@ -1117,6 +1117,21 @@ function formatMonthString(date) {
// 移除addFeedingRecord、saveRecord、closePopup等相关方法
// 清空缓存函数
function
clearCache
()
{
console
.
log
(
'清空缓存...'
)
// 清空记录缓存
recordsCache
.
value
.
clear
()
// 清空日历状态缓存
calendarCache
.
value
.
clear
()
// 清空API数据
apiRecords
.
value
=
{}
calendarStatus
.
value
=
{}
// 清空加载状态
loadingRecords
.
value
.
clear
()
loadingCalendar
.
value
.
clear
()
console
.
log
(
'缓存清空完成'
)
}
function
getCurrentTime
()
{
const
now
=
new
Date
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment