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
79c7247b
Commit
79c7247b
authored
Oct 18, 2020
by
Sky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
onshow时同步数据及状态
parent
9f2e686d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
index.js
entry/src/main/js/default/pages/index/index.js
+6
-1
No files found.
entry/src/main/js/default/pages/index/index.js
View file @
79c7247b
...
...
@@ -62,14 +62,18 @@ export default {
timer
=
setInterval
(
function
()
{
_this
.
keepScreenOn
();
},
2
*
60
*
1000
);
//重新回到训练界面时,同步一下训练数据及暂停播放状态
_this
.
sendMsg
({
"eventFlg"
:
"8"
,
});
},
onHide
()
{
this
.
stopFlg
=
true
;
this
.
tabIndex
=
1
;
//消息发送时,手机端可能无法接受消息,所以在onShow时,需要重新同步
this
.
sendMsg
({
"eventFlg"
:
"3"
,
})
console
.
log
(
'index page onHide()'
);
},
onDestroy
()
{
//发送页面销毁时间
...
...
@@ -238,6 +242,7 @@ export default {
case
"14"
:
//训练总时长
_this
.
acCalorie
=
model
.
acCalorie
?
model
.
acCalorie
:
'--'
;
_this
.
fitDuration
=
model
.
fitDuration
;
_this
.
stopFlg
=
model
.
stopFlag
;
//同步状态
break
;
case
"15"
:
//离开或者返回训练
if
(
model
.
rollbackStop
==
'0'
)
{
...
...
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