Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
de7655e9
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看板
提交
de7655e9
编写于
5月 09, 2023
作者:
M
m0_74163447
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
健走记录详情
上级
b74b81e3
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
100 addition
and
59 deletion
+100
-59
teamwork/pages/my/finish.vue
teamwork/pages/my/finish.vue
+49
-31
teamwork/pages/my/main.vue
teamwork/pages/my/main.vue
+5
-4
teamwork/pages/my/my-running-record.vue
teamwork/pages/my/my-running-record.vue
+13
-5
teamwork/pages/my/my-setting.vue
teamwork/pages/my/my-setting.vue
+7
-2
teamwork/pages/my/my-walking-record.vue
teamwork/pages/my/my-walking-record.vue
+26
-17
teamwork/static/my/my-record/run.png
teamwork/static/my/my-record/run.png
+0
-0
teamwork/static/my/my-record/walk.png
teamwork/static/my/my-record/walk.png
+0
-0
未找到文件。
teamwork/pages/my/finish.vue
浏览文件 @
de7655e9
...
...
@@ -9,43 +9,37 @@
<
script
>
export
default
{
onReady
(
e
)
{
uniCloud
.
callFunction
({
onReady
()
{
if
(
this
.
type
==
'
跑步
'
){
uniCloud
.
callFunction
({
name
:
'
fe-my-runningDetail
'
,
data
:
{
runningId
:
this
.
id
}
})
.
then
(
res
=>
{
console
.
log
(
res
);
uni
.
$emit
(
'
information
'
,
{
type
:
'
跑步
'
,
startTime
:
res
.
result
.
data
.
startTime
,
distance
:
res
.
result
.
data
.
distance
,
duration
:
res
.
result
.
data
.
duration
,
pace
:
res
.
result
.
data
.
pace
,
feeling
:
res
.
result
.
data
.
feeling
,
id
:
this
.
id
})
.
then
(
res
=>
{
this
.
getData
(
res
);
});
//this.id = res.result.data.id;
this
.
polyline
[
0
].
points
=
res
.
result
.
data
.
pathLine
;
this
.
markers
[
0
].
latitude
=
res
.
result
.
data
.
startPoint
.
latitude
;
this
.
markers
[
0
].
longitude
=
res
.
result
.
data
.
startPoint
.
longitude
;
this
.
markers
[
1
].
latitude
=
this
.
polyline
[
0
].
points
[
this
.
polyline
[
0
].
points
.
length
-
1
].
latitude
;
this
.
markers
[
1
].
longitude
=
this
.
polyline
[
0
].
points
[
this
.
polyline
[
0
].
points
.
length
-
1
].
longitude
;
// this.markers[1].longitude = res.result.data.endPoint.longitude;
//this.markers[1].latitude = res.result.data.endPoint.latitude;
this
.
latitude
=
this
.
markers
[
1
].
latitude
;
this
.
longitude
=
this
.
markers
[
1
].
longitude
;
});
const
subNVue
=
uni
.
getSubNVueById
(
'
popup1
'
);
// 通过 id 获取 nvue 子窗体
subNVue
.
show
(
'
slide-in-top
'
,
250
);
// 打开 nvue 子窗体
const
subNVue
=
uni
.
getSubNVueById
(
'
popup1
'
);
// 通过 id 获取 nvue 子窗体
subNVue
.
show
(
'
slide-in-top
'
,
250
);
// 打开 nvue 子窗体
}
else
if
(
this
.
type
==
'
健走
'
){
uniCloud
.
callFunction
({
name
:
'
fe-my-walkingDetail
'
,
data
:
{
walkingId
:
this
.
id
}
})
.
then
(
res
=>
{
this
.
getData
(
res
);
});
const
subNVue
=
uni
.
getSubNVueById
(
'
popup1
'
);
// 通过 id 获取 nvue 子窗体
subNVue
.
show
(
'
slide-in-top
'
,
250
);
// 打开 nvue 子窗体
}
},
data
()
{
return
{
type
:
'
,
'
,
id
:
''
,
icon
:
'
/static/sport/icon.jpg
'
,
longitude
:
''
,
...
...
@@ -84,10 +78,34 @@
// delta: 1, //返回层数,2则上上页
// })
},
getData
(
res
){
console
.
log
(
res
);
uni
.
$emit
(
'
information
'
,
{
type
:
this
.
type
,
startTime
:
res
.
result
.
data
.
StartDatetime
,
distance
:
res
.
result
.
data
.
distance
,
duration
:
res
.
result
.
data
.
duration
,
pace
:
res
.
result
.
data
.
pace
,
feeling
:
res
.
result
.
data
.
feeling
,
id
:
this
.
id
});
//this.id = res.result.data.id;
this
.
polyline
[
0
].
points
=
res
.
result
.
data
.
pathLine
;
this
.
markers
[
0
].
latitude
=
res
.
result
.
data
.
startPoint
.
latitude
;
this
.
markers
[
0
].
longitude
=
res
.
result
.
data
.
startPoint
.
longitude
;
this
.
markers
[
1
].
latitude
=
this
.
polyline
[
0
].
points
[
this
.
polyline
[
0
].
points
.
length
-
1
].
latitude
;
this
.
markers
[
1
].
longitude
=
this
.
polyline
[
0
].
points
[
this
.
polyline
[
0
].
points
.
length
-
1
].
longitude
;
// this.markers[1].longitude = res.result.data.endPoint.longitude;
//this.markers[1].latitude = res.result.data.endPoint.latitude;
this
.
latitude
=
this
.
markers
[
1
].
latitude
;
this
.
longitude
=
this
.
markers
[
1
].
longitude
;
}
},
onLoad
(
e
){
this
.
id
=
e
.
runningId
;
this
.
id
=
e
.
id
;
this
.
type
=
e
.
type
;
console
.
log
(
this
.
type
);
//console.log(this.id);
}
}
...
...
teamwork/pages/my/main.vue
浏览文件 @
de7655e9
...
...
@@ -89,9 +89,7 @@
})
.
then
(
res
=>
{
console
.
log
(
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.activityList=res.result.data.activityList,
...
...
@@ -108,12 +106,15 @@
},
onShow
(){
this
.
headPortraitIcon
=
getApp
().
globalData
.
icon
;
this
.
nickname
=
getApp
().
globalData
.
name
;
this
.
schoolName
=
getApp
().
globalData
.
school
;
this
.
userId
=
getApp
().
globalData
.
userId
;
this
.
getData
();
// this.moblie=getApp().globalData.moblie;
// this.gender=getApp().globalData.gender;
console
.
log
(
this
.
userId
);
}
}
</
script
>
...
...
teamwork/pages/my/my-running-record.vue
浏览文件 @
de7655e9
...
...
@@ -8,7 +8,7 @@
<!-- v-for="(item,index) in allPost" :key="index" -->
<view
class=
"record"
v-for=
"(item,index) in runningrecordList"
:key=
"index"
@
click=
"goToDetail(item.runningId)"
>
<view
class=
"icon"
>
</view>
<view
class=
"content"
>
<view
class=
"content1"
>
...
...
@@ -46,8 +46,13 @@
},
methods
:
{
goBack
()
{
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
// uni.navigateBack({
// delta: 1, //返回层数,2则上上页
// })
uni
.
reLaunch
({
url
:
'
/pages/my/main
'
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
},
goToDetail
(
runningId
)
{
...
...
@@ -58,7 +63,7 @@
// })
//uni.setStorageSync('data-to-finish', item)
uni
.
reLaunch
({
url
:
'
/pages/my/finish?
runningI
d=
'
+
runningId
+
'
&type=
'
+
this
.
type
,
url
:
'
/pages/my/finish?
i
d=
'
+
runningId
+
'
&type=
'
+
this
.
type
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
...
...
@@ -73,7 +78,7 @@
})
.
then
(
res
=>
{
console
.
log
(
res
);
//
console.log(res);
this
.
runningrecordList
=
res
.
result
.
data
.
runningList
;
this
.
runningrecordList
.
forEach
((
item
,
index
)
=>
{
...
...
@@ -192,6 +197,9 @@
height
:
150
rpx
;
margin-top
:
20
rpx
;
margin-left
:
30
rpx
;
/* background-size:100% 100%;
background-image:url("/static/my/my-record/run.png");
background-repeat:no-repeat; */
float
:
left
;
}
...
...
teamwork/pages/my/my-setting.vue
浏览文件 @
de7655e9
...
...
@@ -44,8 +44,13 @@
showCancel
:
true
,
//是否显示取消按钮
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
//confirm为ture,代表用户点击确定
uni
.
navigateTo
({
url
:
'
/pages/login/login
'
// uni.navigateTo({
// url: '/pages/login/login'
// })
uni
.
reLaunch
({
url
:
'
/pages/login/login
'
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
}
else
if
(
res
.
cancel
)
{
//cancel为ture,代表用户点击取消
...
...
teamwork/pages/my/my-walking-record.vue
浏览文件 @
de7655e9
...
...
@@ -6,28 +6,28 @@
<span
class=
"empty"
></span>
</view>
<view
class=
"record"
v-for=
"
walkingrecord in walkingrecordList
"
>
<view
class=
"record"
v-for=
"
(item,index) in walkingrecordList"
:key=
"index"
@
click=
"goToDetail(item.walkingId)
"
>
<view
class=
"icon"
>
</view>
<view
class=
"content"
>
<view
class=
"content1"
>
<view
class=
"distance"
>
{{
walkingrecord
.
distance
.
toFixed
(
2
)
}}
公里
{{
item
.
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
}}
{{
item
.
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
)
}}
''
{{
parseInt
(
item
.
pace
/
60
).
toString
().
padStart
(
2
,
0
)
}}
'
{{
parseInt
(
item
.
pace
%
60
).
toString
().
padStart
(
2
,
0
)
}}
''
</view>
<image
class=
"pace-icon"
:src=
"'/static/my/my-record/pace.png'"
></image>
<view
class=
"date"
>
{{
walkingrecord
.
startDatetime
}}
{{
item
.
startDatetime
}}
</view>
</view>
</view>
...
...
@@ -40,32 +40,41 @@
data
()
{
return
{
walkingrecordList
:
[],
type
:
'
健走
'
,
}
},
methods
:
{
goBack
()
{
uni
.
navigateBack
({
delta
:
1
,
//返回层数,2则上上页
uni
.
reLaunch
({
url
:
'
/pages/my/main
'
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
},
goToDetail
(
walkingId
)
{
uni
.
reLaunch
({
url
:
'
/pages/my/finish?id=
'
+
walkingId
+
'
&type=
'
+
this
.
type
,
animationType
:
'
pop-in
'
,
animationDuration
:
300
})
},
getData
()
{
// console.log('a');
uniCloud
.
callFunction
({
name
:
'
fe-my-walkingList
'
,
data
:
{
userId
:
'
64573dbde766bb00857836fc
'
userId
:
getApp
().
globalData
.
userId
}
})
.
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);
// });
//console.log(res);
this
.
walkingrecordList
=
res
.
result
.
data
.
walkingList
;
this
.
walkingrecordList
.
forEach
((
item
,
index
)
=>
{
item
.
duration
=
this
.
formatSeconds
(
item
.
duration
);
item
.
startDatetime
=
this
.
formatDate
(
item
.
startDatetime
);
});
});
},
formatDate
(
value
){
...
...
teamwork/static/my/my-record/run.png
0 → 100644
浏览文件 @
de7655e9
7.8 KB
teamwork/static/my/my-record/walk.png
0 → 100644
浏览文件 @
de7655e9
6.1 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录