Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
0f517b73
Great Teamwork
项目概览
_milo
/
Great Teamwork
通知
13
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Great Teamwork
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
0f517b73
编写于
5月 07, 2023
作者:
M
m0_74163447
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
跑步记录
上级
c5621e7e
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
157 addition
and
59 deletion
+157
-59
teamwork/pages/my/main.vue
teamwork/pages/my/main.vue
+23
-12
teamwork/pages/my/my-modify.vue
teamwork/pages/my/my-modify.vue
+1
-0
teamwork/pages/my/my-running-record.vue
teamwork/pages/my/my-running-record.vue
+133
-47
teamwork/static/my/main/running-record-icon.png
teamwork/static/my/main/running-record-icon.png
+0
-0
teamwork/static/my/main/walking-record-icon.png
teamwork/static/my/main/walking-record-icon.png
+0
-0
teamwork/static/my/my-record/duration.png
teamwork/static/my/my-record/duration.png
+0
-0
teamwork/static/my/my-record/pace.png
teamwork/static/my/my-record/pace.png
+0
-0
teamwork/static/my/my-record/running.png
teamwork/static/my/my-record/running.png
+0
-0
teamwork/static/my/my-record/steps.png
teamwork/static/my/my-record/steps.png
+0
-0
teamwork/static/my/my-record/walking.png
teamwork/static/my/my-record/walking.png
+0
-0
未找到文件。
teamwork/pages/my/main.vue
浏览文件 @
0f517b73
...
...
@@ -25,13 +25,13 @@
</view>
<view>
<view
class=
"func"
>
<view
class=
"my-
post
"
>
<view
class=
"my-
post-icon
"
></view>
<view>
我的帖子
</view>
<view
class=
"my-
walking-record
"
>
<view
class=
"my-
walking-record-icon"
@
click=
"goToWalkingRecord()
"
></view>
<view>
健走记录
</view>
</view>
<view
class=
"running-record"
>
<view
class=
"running-record-icon"
@
click=
"goToRunningRecord()"
></view>
<view>
运动
记录
</view>
<view>
跑步
记录
</view>
</view>
<view
class=
"setting"
>
<view
class=
"setting-icon"
@
click=
"goToSetting()"
></view>
...
...
@@ -65,6 +65,12 @@
url
:
'
/pages/my/my-modify
'
})
},
goToMyPost
()
{
console
.
log
(
'
aaa
'
);
uni
.
navigateTo
({
url
:
"
/pages/post/post
"
})
},
goToSetting
()
{
uni
.
navigateTo
({
url
:
'
/pages/my/my-setting
'
...
...
@@ -80,19 +86,24 @@
url
:
'
/pages/my/my-running-record
'
})
},
goToWalkingRecord
()
{
uni
.
navigateTo
({
url
:
'
/pages/my/my-walking-record
'
})
},
getData
()
{
uniCloud
.
callFunction
({
name
:
'
fe-my-information
'
,
data
:
{
userId
:
'
6450da43e1a35c371b3699cc
'
}
})
.
then
(
res
=>
{
this
.
headPortraitIcon
=
res
.
result
.
data
.
icon
,
this
.
nickname
=
res
.
result
.
data
.
username
,
this
.
schoolName
=
res
.
result
.
data
.
school
,
this
.
teamName
=
res
.
result
.
data
.
team
,
this
.
headPortraitIcon
=
res
.
result
.
data
.
icon
;
this
.
nickname
=
res
.
result
.
data
.
username
;
this
.
schoolName
=
res
.
result
.
data
.
school
;
this
.
teamName
=
res
.
result
.
data
.
team
;
//this.activityList=res.result.data.activityList,
console
.
log
(
res
);
//
console.log(res);
});
},
},
...
...
@@ -225,12 +236,12 @@
text-align
:
center
;
font-size
:
20
rpx
;
}
.my-
post
{
.my-
walking-record
{
width
:
200
rpx
;
height
:
250
rpx
;
}
.my-
post
-icon
{
.my-
walking-record
-icon
{
width
:
100
rpx
;
height
:
100
rpx
;
...
...
@@ -238,7 +249,7 @@
margin-left
:
auto
;
margin-right
:
auto
;
background-size
:
100%
100%
;
background-image
:
url("/static/my/main/
my-post
-icon.png")
;
background-image
:
url("/static/my/main/
walking-record
-icon.png")
;
background-repeat
:
no-repeat
;
}
.running-record
{
...
...
teamwork/pages/my/my-modify.vue
浏览文件 @
0f517b73
...
...
@@ -261,6 +261,7 @@
},
},
onLoad
()
{
console
.
log
(
'
d
'
);
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
//this.getData();
}
...
...
teamwork/pages/my/my-running-record.vue
浏览文件 @
0f517b73
...
...
@@ -2,31 +2,32 @@
<view
class=
"main"
>
<view
class=
"top"
>
<image
@
click=
"goBack"
class=
"back"
:src=
"'/static/my/exit-icon.png'"
></image>
<view
class=
"title"
>
运动
记录
</view>
<view
class=
"title"
>
跑步
记录
</view>
<span
class=
"empty"
></span>
</view>
<view
class=
"record"
>
<view
class=
"record"
v-for=
"runningrecord in runningrecordList"
>
<view
class=
"icon"
>
</view>
<view
class=
"content"
>
<view
class=
"content1"
>
<view
class=
"distance"
>
{{
distance
}}
公里
{{
runningrecord
.
distance
.
toFixed
(
2
)
}}
公里
</view>
<image
class=
"type-icon"
:src=
"'/static/my/my-r
unning-r
ecord/running.png/'"
></image>
<image
class=
"type-icon"
:src=
"'/static/my/my-record/running.png/'"
></image>
</view>
<view
class=
"content2"
>
<view
class=
"duration"
>
00:04:25
{{
runningrecord
.
duration
}}
</view>
<image
class=
"duration-icon"
:src=
"'/static/my/my-r
unning-r
ecord/duration.png'"
></image>
<image
class=
"duration-icon"
:src=
"'/static/my/my-record/duration.png'"
></image>
<view
class=
"pace"
>
04'35"
{{
parseInt
(
runningrecord
.
pace
/
60
).
toString
().
padStart
(
2
,
0
)
}}
'
{{
parseInt
(
runningrecord
.
pace
%
60
).
toString
().
padStart
(
2
,
0
)
}}
''
<!--
{{
runningrecord
.
pace
}}
-->
</view>
<image
class=
"pace-icon"
:src=
"'/static/my/my-r
unning-r
ecord/pace.png'"
></image>
<image
class=
"pace-icon"
:src=
"'/static/my/my-record/pace.png'"
></image>
<view
class=
"date"
>
2023.04.29
{{
runningrecord
.
startDatetime
}}
</view>
</view>
</view>
...
...
@@ -37,21 +38,96 @@
<
script
>
export
default
{
data
()
{
return
{
distance
:
'
1.04
'
,
duration
:
'
00:04:25
'
,
pace
:
'
04
\'
35
\
"
'
,
date
:
'
2023.04.29
'
,
return
{
runningrecordList
:
[],
}
},
methods
:{
methods
:
{
goBack
()
{
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
})
},
onload
()
{
getData
()
{
uniCloud
.
callFunction
({
name
:
'
fe-my-runningList
'
,
data
:
{
userId
:
'
644a643a0c801ca878983559
'
}
})
.
then
(
res
=>
{
console
.
log
(
res
);
this
.
runningrecordList
=
res
.
result
.
data
.
runningList
;
this
.
runningrecordList
.
forEach
((
item
,
index
)
=>
{
item
.
duration
=
this
.
formatSeconds
(
item
.
duration
);
//item.pace = this.formatPace(item.pace);
item
.
startDatetime
=
this
.
formatDate
(
item
.
startDatetime
);
});
});
},
formatSeconds
(
value
)
{
var
secondTime
=
parseInt
(
value
);
// 秒
var
minuteTime
=
0
;
// 分
var
hourTime
=
0
;
// 小时
var
result
=
""
;
if
(
secondTime
>
60
)
{
//如果秒数大于60,将秒数转换成整数
//获取分钟,除以60取整数,得到整数分钟
minuteTime
=
parseInt
(
secondTime
/
60
);
//获取秒数,秒数取佘,得到整数秒数
secondTime
=
parseInt
(
secondTime
%
60
);
//如果分钟大于60,将分钟转换成小时
if
(
minuteTime
>
60
)
{
//获取小时,获取分钟除以60,得到整数小时
hourTime
=
parseInt
(
minuteTime
/
60
);
//获取小时后取佘的分,获取分钟除以60取佘的分
minuteTime
=
parseInt
(
minuteTime
%
60
);
}
}
//var result = "" + parseInt(secondTime) + "";
if
(
secondTime
>=
10
)
{
result
=
""
+
parseInt
(
secondTime
)
+
""
;
}
else
{
result
=
"
0
"
+
parseInt
(
secondTime
)
+
""
;
}
if
(
minuteTime
>=
10
)
{
result
=
""
+
parseInt
(
minuteTime
)
+
"
:
"
+
result
;
}
else
{
result
=
"
0
"
+
parseInt
(
minuteTime
)
+
"
:
"
+
result
;
}
if
(
hourTime
>=
10
)
{
result
=
""
+
parseInt
(
hourTime
)
+
"
:
"
+
result
;
}
else
{
result
=
"
0
"
+
parseInt
(
hourTime
)
+
"
:
"
+
result
;
}
return
result
;
},
// formatPace(value){
// const str = value + ''; //转成字符串
// let arr = str.split('.');
// let temp1 = arr[0] + '';
// let temp2 = arr[1] + '';
// let result = '';
// temp1 = temp1.length == 1 ? '0' + temp1 : temp1; //小数点后只有一位的话,补0
// temp2 = temp2.length == 1 ? temp2 + '0' : temp2;
// result = "" + temp1 + "\'" + temp2 + "\"";
// return result;
// },
formatDate
(
value
){
const
str
=
value
+
''
;
//转成字符串
let
arr
=
str
.
split
(
'
'
);
return
arr
[
0
];
},
onLoad
()
{
//console.log(this.formatSeconds(10));
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
this
.
getData
();
}
}
}
...
...
@@ -64,14 +140,14 @@
height
:
100%
;
/* background-color: #EDEEF0; */
}
.top
{
width
:
100%
;
height
:
50px
;
background-color
:
#EDEEF0
;
text-align
:
center
;
}
.back
{
width
:
40px
;
height
:
30px
;
...
...
@@ -80,7 +156,7 @@
float
:
left
;
margin-left
:
10px
;
}
.empty
{
width
:
40px
;
height
:
30px
;
...
...
@@ -89,7 +165,7 @@
float
:
right
;
margin-right
:
10px
;
}
.title
{
font-size
:
20px
;
margin-top
:
10px
;
...
...
@@ -97,15 +173,17 @@
color
:
#f1992d
;
display
:
inline-block
;
}
.record
{
.record
{
border-bottom
:
2
rpx
solid
#EDEEF0
;
width
:
100%
;
width
:
100%
;
height
:
200
rpx
;
/* display: flex;
flex-direction: row; */
}
.icon
{
.icon
{
border
:
2
rpx
solid
#EDEEF0
;
width
:
150
rpx
;
height
:
150
rpx
;
...
...
@@ -113,58 +191,66 @@
margin-left
:
30
rpx
;
float
:
left
;
}
.content
{
.content
{
width
:
72%
;
height
:
100%
;
/* margin: 10rpx 0 10rpx 30rpx; */
float
:
right
;
}
.content1
{
.content1
{
height
:
50%
;
}
.distance
{
.distance
{
width
:
70%
;
font-weight
:
bold
;
font-size
:
65
rpx
;
margin-top
:
15
rpx
;
float
:
left
;
}
.type-icon
{
}
.type-icon
{
float
:
right
;
margin-top
:
50
rpx
;
margin-right
:
70
rpx
;
width
:
50
rpx
;
height
:
50
rpx
;
}
.content2
{
.content2
{
margin-top
:
20
rpx
;
display
:
flex
;
flex-direction
:
row
;
font-size
:
25
rpx
;
}
.duration
{
}
.duration-icon
{
.duration
{}
.duration-icon
{
width
:
35
rpx
;
height
:
35
rpx
;
}
.pace
{
.pace
{
margin-left
:
60
rpx
;
}
.pace-icon
{
.pace-icon
{
width
:
35
rpx
;
height
:
35
rpx
;
}
.date
{
margin-left
:
90
rpx
;
.date
{
margin-left
:
90
rpx
;
}
</
style
>
\ No newline at end of file
teamwork/static/my/main/running-record-icon.png
查看替换文件 @
c5621e7e
浏览文件 @
0f517b73
9.3 KB
|
W:
|
H:
6.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
teamwork/static/my/main/walking-record-icon.png
0 → 100644
浏览文件 @
0f517b73
9.3 KB
teamwork/static/my/my-r
unning-r
ecord/duration.png
→
teamwork/static/my/my-record/duration.png
浏览文件 @
0f517b73
文件已移动
teamwork/static/my/my-r
unning-r
ecord/pace.png
→
teamwork/static/my/my-record/pace.png
浏览文件 @
0f517b73
文件已移动
teamwork/static/my/my-r
unning-r
ecord/running.png
→
teamwork/static/my/my-record/running.png
浏览文件 @
0f517b73
文件已移动
teamwork/static/my/my-record/steps.png
0 → 100644
浏览文件 @
0f517b73
4.6 KB
teamwork/static/my/my-r
unning-r
ecord/walking.png
→
teamwork/static/my/my-record/walking.png
浏览文件 @
0f517b73
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录