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
d8691416
Commit
d8691416
authored
May 10, 2021
by
Sky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~
parent
7ffe7ac4
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
915 additions
and
1092 deletions
+915
-1092
build.gradle
build.gradle
+5
-5
build.gradle
entry/build.gradle
+10
-10
config.json
entry/src/main/config.json
+9
-4
wearengine.js
entry/src/main/js/default/liteWearable/wearengine.js
+397
-281
end.js
entry/src/main/js/default/pages/end/end.js
+4
-2
index.css
entry/src/main/js/default/pages/index/index.css
+2
-1
index.js
entry/src/main/js/default/pages/index/index.js
+6
-8
wearengine.js
entry/src/main/js/default/wearable/wearengine.js
+474
-781
string.json
entry/src/main/resources/base/element/string.json
+8
-0
yucong0322.p7b
yucong0322.p7b
+0
-0
No files found.
build.gradle
View file @
d8691416
...
...
@@ -5,11 +5,11 @@ ohos {
signingConfigs
{
release
{
storeFile
file
(
'D:/HuaweiWatchClient/huawei_watch_overseas.p12'
)
storePassword
'0000001B
37FBF75B69C866355CBEFC208DDF92764DE954F1C754CBD53E1B481433E2DBB6E2C3132D049A89
'
storePassword
'0000001B
FDB36C87CF75CE5C9C35B4EB247F0B973A3CEBFCE636F022CE70CBF7EA5D483CB9896BA93C3146
'
keyAlias
'huawei_watch_overseas Release'
keyPassword
'0000001B
E894FABE766383262AD346CB8151121BA00764539557B67C6917C8C4B031ADCF67E1384F5FE120
'
profile
file
(
'D:
/HuaweiWatchClient/
com.company.fit.provisionRelease.p7b'
)
certpath
file
(
'D:
/HuaweiWatchClient/
com.company.fit.overseas_release.cer'
)
keyPassword
'0000001B
32D22EDA409673EBC987E06A1784506F044E7486B4A2590B645408BBD960C712D03072C22FE304
'
profile
file
(
'D:
\\HuaweiWatchClient\\
com.company.fit.provisionRelease.p7b'
)
certpath
file
(
'D:
\\HuaweiWatchClient\\
com.company.fit.overseas_release.cer'
)
signAlg
'SHA256withECDSA'
}
}
...
...
@@ -30,7 +30,7 @@ buildscript {
jcenter
()
}
dependencies
{
classpath
'com.huawei.ohos:hap:2.4.
1.4
'
classpath
'com.huawei.ohos:hap:2.4.
2.5
'
}
}
...
...
entry/build.gradle
View file @
d8691416
...
...
@@ -4,20 +4,20 @@ ohos {
signingConfigs
{
debug
{
certpath
file
(
'D:/HuaweiWatchClient/com.company.fit.overseas_debug.cer'
)
profile
file
(
'D:/HuaweiWatchClient/
com.company.fit.proDebug
.p7b'
)
profile
file
(
'D:/HuaweiWatchClient/
FitSmartWatch
.p7b'
)
signAlg
'SHA256withECDSA'
keyPassword
'0000001B
17F8F53E0CF14D52675968C4FD60AA48E6580B4EEEE4AE8348FA556850E01CC92EEA6DE834CA36
'
keyPassword
'0000001B
329C15F1A79D6DE1A35FC33EAC9D748ED2C9769503449638BCD341685E783C445341B6EF7252A0
'
keyAlias
'huawei_watch_overseas Release'
storePassword
'0000001B
16A4C8B18003852BF6E890B38F6D624C8314D7E55CE2FD87CBC3F2C9E2DA9403C977F0C988ABAE
'
storePassword
'0000001B
ED3DA1157AED6BA705ACB0E5A74DF33AB09917EF841F6048AA1D583907E32B547CE23E3D6415F8
'
storeFile
file
(
'D:/HuaweiWatchClient/huawei_watch_overseas.p12'
)
}
release
{
storeFile
file
(
'D:/HuaweiWatchClient/huawei_watch_overseas.p12'
)
storePassword
'0000001B
76038D1DF78CD8E9F7D8F4E133ECE3FABA895EE4FEE9DDC4225267E3D2176904B14F7BF71AF47D
'
storePassword
'0000001B
E711A291624105B6065E58CF3582A64BD480021F7FA44D831AF7F47D3BAA28EE72E1ED5200671F
'
keyAlias
'huawei_watch_overseas Release'
keyPassword
'0000001B
4BECAFAB52D2A2F0F1D06B36F5343980B0FD548D1BB1A84211DB54738785744DD4DF2640AAD1B5
'
keyPassword
'0000001B
9650C5F04495DB8963B0EA3435C222F7566D397075C0BCA00938DC2AC4A57E46138E9C0F70324C
'
signAlg
'SHA256withECDSA'
profile
file
(
'D:
/HuaweiWatchClient/
com.company.fit.provisionRelease.p7b'
)
profile
file
(
'D:
\\HuaweiWatchClient\\
com.company.fit.provisionRelease.p7b'
)
certpath
file
(
'D:/HuaweiWatchClient/com.company.fit.overseas_release.cer'
)
}
}
...
...
@@ -27,14 +27,14 @@ ohos {
compatibleSdkVersion
3
}
}
sourceSets
{
main
{
java
{
sourceSets
{
main
{
java
{
srcDir
'build\\generated\\source\\r\\debug'
}
}
}
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
testCompile
'junit:junit:4.12'
testCompile
'junit:junit:4.12'
}
entry/src/main/config.json
View file @
d8691416
...
...
@@ -2,8 +2,8 @@
"app"
:
{
"bundleName"
:
"com.company.fit"
,
"version"
:
{
"code"
:
2
0
,
"name"
:
"1.0.
2
"
"code"
:
2
5
,
"name"
:
"1.0.
3
"
},
"apiVersion"
:
{
"compatible"
:
3
,
...
...
@@ -20,7 +20,7 @@
{
"name"
:
"default"
,
"icon"
:
"$media:icon"
,
"label"
:
"
Fit健身
"
,
"label"
:
"
$string:app_name
"
,
"type"
:
"page"
}
],
...
...
@@ -35,6 +35,11 @@
"extra"
:
""
,
"name"
:
"supportLists"
,
"value"
:
"com.sportq.fit:B1B788A1BBD5F459BC641DA8CE690EA065C96957F58E883764982B5C46E53E06"
},
{
"extra"
:
""
,
"name"
:
"hwc-theme"
,
"value"
:
"androidhwext:style/Theme.Emui.Dark.NoActionBar"
}
]
},
...
...
@@ -57,7 +62,7 @@
],
"when"
:
"always"
},
"name"
:
"
harmony
os.permission.READ_HEALTH_DATA"
"name"
:
"
oh
os.permission.READ_HEALTH_DATA"
}
]
}
...
...
entry/src/main/js/default/liteWearable/wearengine.js
View file @
d8691416
This diff is collapsed.
Click to expand it.
entry/src/main/js/default/pages/end/end.js
View file @
d8691416
...
...
@@ -17,13 +17,14 @@ export default {
let
_this
=
this
;
//获取客户端信息
_this
.
getMsg
();
},
onShow
()
{
let
_this
=
this
;
//更新页面数据
_this
.
acCalorie
=
_this
.
endCalorie
;
_this
.
fitTotalDuration
=
_this
.
endTotalTime
;
_this
.
averHeartRate
=
_this
.
endAverHeartRate
;
_this
.
maxHeartRate
=
_this
.
endMaxHeartRate
;
},
onShow
()
{
//取消常亮
brightness
.
setKeepScreenOn
({
keepScreenOn
:
false
,
...
...
@@ -35,6 +36,7 @@ export default {
},
onDestroy
()
{
//取消接收手机侧第三方应用发过来的消息
console
.
error
(
"end--onDestroy:unregisterReceiver"
)
p2pClient
.
unregisterReceiver
({
onSuccess
:
function
()
{
},
...
...
entry/src/main/js/default/pages/index/index.css
View file @
d8691416
...
...
@@ -193,11 +193,12 @@
/**已训练**/
.train-new-title
{
font-size
:
38px
;
height
:
38
px
;
height
:
40
px
;
margin-top
:
60px
;
width
:
350px
;
color
:
#FFFFFF
;
text-align
:
center
;
line-hight
:
40px
;
}
.train-time
{
justify-content
:
center
;
...
...
entry/src/main/js/default/pages/index/index.js
View file @
d8691416
...
...
@@ -38,6 +38,7 @@ export default {
},
onInit
()
{
p2pClient
.
setPeerPkgName
(
"com.sportq.fit"
);
p2pClient
.
setPeerFingerPrint
(
"B1B788A1BBD5F459BC641DA8CE690EA065C96957F58E883764982B5C46E53E06"
);
},
onReady
()
{
let
_this
=
this
;
...
...
@@ -129,7 +130,7 @@ export default {
},
2
*
60
*
1000
);
}
//数据重置
_this
.
init
();
_this
.
init
Data
();
_this
.
canReceiveMessage
=
true
;
if
(
_this
.
isFirstInit
)
{
_this
.
isFirstInit
=
false
;
...
...
@@ -368,7 +369,7 @@ export default {
},
onSendResult
:
function
(
resultCode
)
{
// send任务执行结束后返回的错误码和信息进行处理
console
.
log
(
resultCode
.
data
+
resultCode
.
code
);
console
.
log
(
"sendMsg:"
+
resultCode
.
data
+
resultCode
.
code
);
},
}
if
(
sendMessage
!=
null
&&
sendCallback
!=
null
)
{
...
...
@@ -424,9 +425,11 @@ export default {
var
receiver
=
{
onSuccess
:
function
()
{
// 处理注册接收手机侧简短消息或文件成功的回调函数
console
.
error
(
"index--getMsg:registerReceiver:onSuccess"
)
},
onFailure
:
function
()
{
// 处理注册接收手机侧简短消息或文件失败的回调函数
console
.
error
(
"index--getMsg:registerReceiver:onFailure"
)
},
onReceiveMessage
:
function
(
data
)
{
_this
.
start
(
JSON
.
parse
(
data
));
...
...
@@ -554,11 +557,6 @@ export default {
this
.
fitDuration
=
"00:00"
;
this
.
progress
=
""
,
//进度条
this
.
countdownT
=
""
,
// 倒计时
//取消接收手机侧第三方应用发过来的消息
p2pClient
.
unregisterReceiver
({
onSuccess
:
function
()
{
},
});
sensor
.
unsubscribeHeartRate
()
//取消监听心率
},
...
...
@@ -566,7 +564,7 @@ export default {
/**
*数据重置
*/
init
()
{
init
Data
()
{
this
.
isStop
=
false
;
this
.
sendFlg
=
false
;
this
.
stopFlg
=
false
;
...
...
entry/src/main/js/default/wearable/wearengine.js
View file @
d8691416
This diff is collapsed.
Click to expand it.
entry/src/main/resources/base/element/string.json
0 → 100644
View file @
d8691416
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"Fit健身"
}
]
}
\ No newline at end of file
yucong0322.p7b
deleted
100644 → 0
View file @
7ffe7ac4
File deleted
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