Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
huaweiWatchClient
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sky
huaweiWatchClient
Commits
999eb0cb
Commit
999eb0cb
authored
Oct 19, 2020
by
Sky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改心率最大值显示不正确的bug
parent
79c7247b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
index.js
entry/src/main/js/default/pages/index/index.js
+6
-4
No files found.
entry/src/main/js/default/pages/index/index.js
View file @
999eb0cb
...
...
@@ -220,7 +220,7 @@ export default {
params
:
{
endTotalTime
:
model
.
fitTotalDuration
,
//训练时间
endAverHeartRate
:
_this
.
getAverHeartRate
(
_this
.
heartRateList
),
//平均心率
endMaxHeartRate
:
_this
.
getMaxHeartRate
t
(
_this
.
heartRateList
),
//最高心率
endMaxHeartRate
:
_this
.
getMaxHeartRate
(
_this
.
heartRateList
),
//最高心率
endCalorie
:
model
.
acCalorie
,
//消耗心率
}
});
...
...
@@ -399,11 +399,13 @@ export default {
/**
*获取最大心率
*/
getMaxHeartRate
t
(
arr
)
{
getMaxHeartRate
(
arr
)
{
if
(
arr
.
length
>
0
)
{
let
max
=
arr
[
0
];
for
(
let
i
=
0
;
i
<
arr
.
length
-
1
;
i
++
)
{
max
=
max
<
arr
[
i
+
1
]
?
arr
[
i
+
1
]
:
arr
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
arr
[
i
]
>
max
)
{
max
=
arr
[
i
];
}
}
return
parseInt
(
max
)
}
else
{
...
...
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