Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
6f1c12bb
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看板
提交
6f1c12bb
编写于
5月 07, 2023
作者:
M
m0_74163447
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
我的界面
上级
0f517b73
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
250 addition
and
5 deletion
+250
-5
teamwork/manifest.json
teamwork/manifest.json
+8
-5
teamwork/pages/my/my-walking-record.vue
teamwork/pages/my/my-walking-record.vue
+242
-0
未找到文件。
teamwork/manifest.json
浏览文件 @
6f1c12bb
...
...
@@ -9,9 +9,9 @@
"app-plus"
:
{
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"statusbar"
:
{
"immersed"
:
false
},
"statusbar"
:
{
"immersed"
:
false
},
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
...
...
@@ -57,6 +57,9 @@
}
}
}
},
"uniStatistics"
:
{
"enable"
:
true
}
},
/*
快应用特有相关
*/
...
...
@@ -79,8 +82,8 @@
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
"enable"
:
false
,
"version"
:
"2"
},
"vueVersion"
:
"2"
}
teamwork/pages/my/my-walking-record.vue
0 → 100644
浏览文件 @
6f1c12bb
<
template
>
<view
class=
"main"
>
<view
class=
"top"
>
<image
@
click=
"goBack"
class=
"back"
:src=
"'/static/my/exit-icon.png'"
></image>
<view
class=
"title"
>
健走记录
</view>
<span
class=
"empty"
></span>
</view>
<view
class=
"record"
v-for=
"walkingrecord in walkingrecordList"
>
<view
class=
"icon"
>
</view>
<view
class=
"content"
>
<view
class=
"content1"
>
<view
class=
"distance"
>
{{
walkingrecord
.
distance
.
toFixed
(
2
)
}}
公里
</view>
<image
class=
"type-icon"
:src=
"'/static/my/my-record/walking.png/'"
></image>
</view>
<view
class=
"content2"
>
<view
class=
"duration"
>
{{
walkingrecord
.
duration
}}
</view>
<image
class=
"duration-icon"
:src=
"'/static/my/my-record/duration.png'"
></image>
<view
class=
"pace"
>
{{
parseInt
(
walkingrecord
.
pace
/
60
).
toString
().
padStart
(
2
,
0
)
}}
'
{{
parseInt
(
walkingrecord
.
pace
%
60
).
toString
().
padStart
(
2
,
0
)
}}
''
</view>
<image
class=
"pace-icon"
:src=
"'/static/my/my-record/pace.png'"
></image>
<view
class=
"date"
>
{{
walkingrecord
.
startDatetime
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
walkingrecordList
:
[],
}
},
methods
:
{
goBack
()
{
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
})
},
getData
()
{
uniCloud
.
callFunction
({
name
:
'
fe-my-walkingList
'
,
data
:
{
userId
:
'
644a643a0c801ca878983559
'
}
})
.
then
(
res
=>
{
console
.
log
(
res
);
this
.
walkingrecordList
=
res
.
result
.
data
.
walkingList
;
this
.
walkingrecordList
.
forEach
((
item
,
index
)
=>
{
item
.
duration
=
this
.
formatSeconds
(
item
.
duration
);
//item.pace = this.formatPace(item.pace);
item
.
startDatetime
=
this
.
formatDate
(
item
.
startDatetime
);
});
});
},
formatDate
(
value
){
const
str
=
value
+
''
;
//转成字符串
let
arr
=
str
.
split
(
'
'
);
return
arr
[
0
];
},
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
;
},
onLoad
()
{
plus
.
navigator
.
setStatusBarBackground
(
'
#EDEEF0
'
);
this
.
getData
();
}
}
}
</
script
>
<
style
>
.main
{
position
:
absolute
;
width
:
100%
;
height
:
100%
;
/* background-color: #EDEEF0; */
}
.top
{
width
:
100%
;
height
:
50px
;
background-color
:
#EDEEF0
;
text-align
:
center
;
}
.back
{
width
:
40px
;
height
:
30px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
float
:
left
;
margin-left
:
10px
;
}
.empty
{
width
:
40px
;
height
:
30px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
float
:
right
;
margin-right
:
10px
;
}
.title
{
font-size
:
20px
;
margin-top
:
10px
;
font-weight
:
bold
;
color
:
#f1992d
;
display
:
inline-block
;
}
.record
{
border-bottom
:
2
rpx
solid
#EDEEF0
;
width
:
100%
;
height
:
200
rpx
;
/* display: flex;
flex-direction: row; */
}
.icon
{
border
:
2
rpx
solid
#EDEEF0
;
width
:
150
rpx
;
height
:
150
rpx
;
margin-top
:
20
rpx
;
margin-left
:
30
rpx
;
float
:
left
;
}
.content
{
width
:
72%
;
height
:
100%
;
/* margin: 10rpx 0 10rpx 30rpx; */
float
:
right
;
}
.content1
{
height
:
50%
;
}
.distance
{
width
:
70%
;
font-weight
:
bold
;
font-size
:
65
rpx
;
margin-top
:
15
rpx
;
float
:
left
;
}
.type-icon
{
float
:
right
;
margin-top
:
50
rpx
;
margin-right
:
70
rpx
;
width
:
50
rpx
;
height
:
50
rpx
;
}
.content2
{
margin-top
:
20
rpx
;
display
:
flex
;
flex-direction
:
row
;
font-size
:
25
rpx
;
}
.duration
{}
.duration-icon
{
width
:
35
rpx
;
height
:
35
rpx
;
}
.pace
{
margin-left
:
60
rpx
;
}
.pace-icon
{
width
:
35
rpx
;
height
:
35
rpx
;
}
.date
{
margin-left
:
90
rpx
;
}
</
style
>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录