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
bd20dc7a
Commit
bd20dc7a
authored
Sep 08, 2020
by
Sky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
5963dd9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
24 deletions
+31
-24
config.json
entry/src/main/config.json
+12
-1
index.hml
entry/src/main/js/default/pages/index/index.hml
+16
-14
index.js
entry/src/main/js/default/pages/index/index.js
+3
-9
No files found.
entry/src/main/config.json
View file @
bd20dc7a
...
...
@@ -49,6 +49,17 @@
"name"
:
"default"
}
],
"reqPermissions"
:
[]
"reqPermissions"
:
[
{
"reason"
:
"get_health.data"
,
"usedScene"
:
{
"ability"
:
[
"default"
],
"when"
:
"always"
},
"name"
:
"harmonyos.permission.READ_HEALTH_DATA"
}
]
}
}
\ No newline at end of file
entry/src/main/js/default/pages/index/index.hml
View file @
bd20dc7a
...
...
@@ -28,8 +28,8 @@
</text>
</div>
<!-- 标题end -->
<
list class="todo-wraper" ref="listDom"
if="page == '3' || page == '4' || page == '5'|| page == '6'">
<
list-item
class="todo-item">
<
swiper index="{{tabIndex}}" class="todo-wraper"
if="page == '3' || page == '4' || page == '5'|| page == '6'">
<
div
class="todo-item">
<!-- 动作预览 -->
<div class="train-view">
<text if="page == '3'" class="train-page-title">
...
...
@@ -47,7 +47,7 @@
<text class="train-pape-num">{{acCnt}}/{{acTotalCnt}}
</text>
</div>
<text class="train-view-title">{{acName}}
<text class="train-view-title">
{{acName}}
</text>
<div class="train-view-progress-line">
<div class="train-view-progress-new" style="width: {{progress}}"></div>
...
...
@@ -57,21 +57,21 @@
<image class="train-num-icon" src="../../common/oppo_icon_heart.png"></image>
<text if="newHeartRate != '--'" class="train-num-text">{{newHeartRate}}
</text>
<text
else class="train-num-text train-num-text-no"
>{{newHeartRate}}
<text
class="train-num-text train-num-text-no" else
>{{newHeartRate}}
</text>
</div>
<div class="train-calorie">
<image class="train-num-icon" src="../../common/oppo_icon_calorie.png"></image>
<text if="acCalorie != '--'" class="train-num-text">{{acCalorie}}
</text>
<text
else class="train-num-text train-num-text-no"
>{{acCalorie}}
<text
class="train-num-text train-num-text-no" else
>{{acCalorie}}
</text>
</div>
</div>
</div>
<!-- 动作预览end -->
</
list-item
>
<
list-item
class="todo-item">
</
div
>
<
div
class="todo-item">
<!-- 已训练 -->
<div class="train-view">
<text class="train-new-title">
...
...
@@ -86,21 +86,23 @@
<div class="train-tool" else>
<image class="train-tool-icon" if="{{isFirst == '0'}}"
src="../../common/oppo_btn_previous_disabled.png"></image>
<image class="train-tool-icon" @click="previous"
else
src="../../common/oppo_btn_previous.png"
></image>
<image class="train-tool-icon" @click="previous"
src="../../common/oppo_btn_previous.png"
else></image>
<image class="train-play-icon" @click="stop" src="../../common/oppo_bun_pause.png"></image>
<image class="train-tool-icon" if="{{isLast == '0'}}"
src="../../common/oppo_btn_next_disabled.png"></image>
<image class="train-tool-icon" @click="next"
else src="../../common/oppo_btn_next.png"
></image>
<image class="train-tool-icon" @click="next"
src="../../common/oppo_btn_next.png" else
></image>
</div>
</div>
<!-- 已训练end -->
</
list-item
>
</
list
>
</
div
>
</
swiper
>
<!--切换圆点-->
<div class="select" if="page == '3' || page == '4' || page == '5' || page == '7' || page == '8'">
<div class="select-item {{tabIndex == 0 ? 'select-item-active' : ''}}"></div>
<div class="select-item {{tabIndex == 1 ? 'select-item-active' : ''}}"></div>
<div if="{{tabIndex == 0}}" class="select-item select-item-active"></div>
<div if="{{tabIndex == 0}}" class="select-item"></div>
<div if="{{tabIndex == 1}}" class="select-item"></div>
<div if="{{tabIndex == 1}}" class="select-item select-item-active"></div>
</div>
<!--切换圆点end-->
<!--训练切出-->
...
...
entry/src/main/js/default/pages/index/index.js
View file @
bd20dc7a
...
...
@@ -144,16 +144,10 @@ export default {
_this
.
acType
=
1
;
break
;
case
"7"
:
//暂停
_this
.
$refs
.
listDom
.
scrollTo
({
index
:
1
});
_this
.
tabIndex
=
1
;
_this
.
stopFlg
=
true
;
break
;
case
"8"
:
//继续
_this
.
$refs
.
listDom
.
scrollTo
({
index
:
0
});
_this
.
tabIndex
=
0
;
_this
.
countdownT
=
model
.
countdownT
;
_this
.
stopFlg
=
false
;
...
...
@@ -344,9 +338,6 @@ export default {
stop
()
{
this
.
isStop
=
true
;
this
.
stopFlg
=
true
;
this
.
$refs
.
listDom
.
scrollTo
({
index
:
1
});
this
.
tabIndex
=
1
;
this
.
sendMsg
({
"eventFlg"
:
"3"
,
...
...
@@ -424,6 +415,9 @@ export default {
this
.
sendFlg
=
false
;
this
.
stopFlg
=
false
;
this
.
heartRateList
=
[];
//取消接收手机侧第三方应用发过来的消息
FeatureAbility
.
unsubscribeMsg
();
sensor
.
unsubscribeHeartRate
()
//取消监听心率
}
,
...
...
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