Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
_milo
Great Teamwork
提交
f4be6b0b
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看板
提交
f4be6b0b
编写于
5月 07, 2023
作者:
Y
yyt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
图标及细节修改
上级
612d360d
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
52 addition
and
53 deletion
+52
-53
teamwork/pages/sport/finish.vue
teamwork/pages/sport/finish.vue
+5
-4
teamwork/pages/sport/main.vue
teamwork/pages/sport/main.vue
+20
-22
teamwork/pages/sport/ranking.vue
teamwork/pages/sport/ranking.vue
+11
-5
teamwork/pages/sport/ready.vue
teamwork/pages/sport/ready.vue
+2
-19
teamwork/pages/sport/start.vue
teamwork/pages/sport/start.vue
+1
-1
teamwork/pages/sport/subNVue/finish.nvue
teamwork/pages/sport/subNVue/finish.nvue
+13
-2
teamwork/static/sport/marker1.png
teamwork/static/sport/marker1.png
+0
-0
teamwork/static/sport/marker2.png
teamwork/static/sport/marker2.png
+0
-0
未找到文件。
teamwork/pages/sport/finish.vue
浏览文件 @
f4be6b0b
<
template
>
<view
class=
"content"
>
<map
id=
"myMap"
style=
"width: 100%; height: 780px;"
:latitude=
"latitude"
:longitude=
"longitude"
:markers=
"markers"
:polyline=
"polyline"
show-location=
"true"
scale=
"
16
"
>
:markers=
"markers"
:polyline=
"polyline"
show-location=
"true"
scale=
"
20
"
>
<cover-image
class=
"returnBack"
src=
"/static/login/returnBack.png"
@
click=
"goBack()"
></cover-image>
</map>
</view>
...
...
@@ -11,7 +11,7 @@
export
default
{
onReady
()
{
//传从运动界面传数据过来
var
data
=
uni
.
getStorageSync
(
'
info
'
)
var
data
=
uni
.
getStorageSync
(
'
data-to-finish
'
)
var
res
=
JSON
.
parse
(
data
)
this
.
id
=
res
.
id
;
this
.
polyline
=
res
.
polyline
;
...
...
@@ -37,18 +37,19 @@
icon
:
'
/static/sport/icon.jpg
'
,
longitude
:
121.44820869
,
latitude
:
37.48330837
,
scale
:
16
,
polyline
:
[],
markers
:
[{
id
:
0
,
longitude
:
121.44577861
,
latitude
:
37.48205260
,
iconPath
:
'
/static/sport/
location
.png
'
iconPath
:
'
/static/sport/
marker1
.png
'
},
{
id
:
1
,
longitude
:
121.44820869
,
latitude
:
37.48330837
,
iconPath
:
'
/static/sport/
location
.png
'
iconPath
:
'
/static/sport/
marker2
.png
'
}
]
}
...
...
teamwork/pages/sport/main.vue
浏览文件 @
f4be6b0b
<
template
>
<view
class=
"content"
>
<view
class=
"type-select"
>
<uni-data-select
custom-class=
"type"
v-model=
"type"
:localdata=
"range"
:clear=
"false"
<uni-data-select
custom-class=
"type"
v-model=
"
info.
type"
:localdata=
"range"
:clear=
"false"
@
change=
"change"
></uni-data-select>
</view>
<view
class=
"accumulate"
>
<view
class=
"block1"
>
<ul>
<li>
累计
{{
type
}}
</li>
<li>
累计
{{
info
.
type
}}
</li>
</ul>
<view
class=
"dis"
>
<view
class=
"distance"
>
{{
distance
.
toFixed
(
2
)
}}
</view>
<view
class=
"distance"
>
{{
info
.
distance
.
toFixed
(
2
)
}}
</view>
<view
class=
"km"
>
公里
</view>
</view>
</view>
...
...
@@ -18,7 +18,7 @@
<ul>
<li>
本校累计排名
</li>
</ul>
<view
class=
"rank"
>
{{
rank
}}
</view>
<view
class=
"rank"
>
{{
info
.
rank
}}
</view>
</view>
</view>
<image
class=
"start-button"
src=
"/static/sport/start1.png"
@
click=
"start"
></image>
...
...
@@ -31,7 +31,11 @@
data
()
{
return
{
userId
:
'
644a643a0c801ca878983559
'
,
type
:
'
跑步
'
,
info
:
{
type
:
'
跑步
'
,
distance
:
0
,
rank
:
1
},
range
:
[{
value
:
'
跑步
'
,
text
:
'
跑步
'
...
...
@@ -40,39 +44,33 @@
value
:
'
健走
'
,
text
:
'
健走
'
}
],
distance
:
0
,
rank
:
1
]
};
},
methods
:
{
change
(
e
)
{
change
()
{
uniCloud
.
callFunction
({
name
:
'
fe-sport-index
'
,
data
:
{
userId
:
this
.
userId
,
type
:
this
.
type
type
:
this
.
info
.
type
}
})
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
distance
=
res
.
result
.
data
.
totalRunningDistance
this
.
rank
=
res
.
result
.
data
.
totalRunningRank
this
.
info
.
distance
=
res
.
result
.
data
.
totalRunningDistance
this
.
info
.
rank
=
res
.
result
.
data
.
totalRunningRank
});
},
click
()
{
if
(
this
.
type
===
'
跑步
'
)
{
uni
.
navigateTo
({
url
:
'
./ranking?type=跑步
'
})
}
else
{
uni
.
navigateTo
({
url
:
'
./ranking?type=健走
'
})
}
let
item
=
JSON
.
stringify
(
this
.
info
)
uni
.
setStorageSync
(
'
data-to-ranking
'
,
item
)
uni
.
navigateTo
({
url
:
'
./ranking
'
})
},
start
()
{
if
(
this
.
type
===
'
跑步
'
)
{
if
(
this
.
info
.
type
===
'
跑步
'
)
{
uni
.
navigateTo
({
url
:
'
./ready?type=跑步
'
})
...
...
teamwork/pages/sport/ranking.vue
浏览文件 @
f4be6b0b
...
...
@@ -10,7 +10,7 @@
<image
class=
"icon"
:src=
"item.icon"
></image>
<view
class=
"info"
>
<view
class=
"username"
>
{{
item
.
username
}}
</view>
<view
class=
"distance"
>
{{
item
.
distance
}}
km
</view>
<view
class=
"distance"
>
{{
item
.
distance
.
toFixed
(
2
)
}}
km
</view>
</view>
</view>
<view
class=
"my"
>
...
...
@@ -18,7 +18,7 @@
<image
class=
"icon"
:src=
"icon"
></image>
<view
class=
"info"
>
<view
class=
"username"
>
{{
username
}}
</view>
<view
class=
"distance"
>
{{
distance
}}
km
</view>
<view
class=
"distance"
>
{{
distance
.
toFixed
(
2
)
}}
km
</view>
</view>
</view>
</view>
...
...
@@ -30,9 +30,10 @@
return
{
userId
:
'
644a643a0c801ca878983559
'
,
rank
:
1
,
distance
:
99.99
,
type
:
''
,
icon
:
'
/static/sport/icon.jpg
'
,
username
:
"
不会取名字
"
,
distance
:
99.99
,
userList
:
[]
}
},
...
...
@@ -45,9 +46,14 @@
});
}
},
onLoad
(
option
)
{
onReady
()
{
var
data
=
uni
.
getStorageSync
(
'
data-to-ranking
'
)
var
res
=
JSON
.
parse
(
data
)
this
.
type
=
res
.
type
this
.
rank
=
res
.
rank
this
.
distance
=
res
.
distance
var
url
if
(
option
.
type
===
'
跑步
'
)
{
if
(
this
.
type
===
'
跑步
'
)
{
url
=
'
fe-sport-run-rank
'
}
else
{
url
=
'
fe-sport-walk-rank
'
...
...
teamwork/pages/sport/ready.vue
浏览文件 @
f4be6b0b
<
template
>
<view
class=
"content"
>
<map
id=
"myMap"
style=
"width: 100%; height: 780px;"
:latitude=
"latitude"
:longitude=
"longitude"
:markers=
"markers"
show-location=
"true"
:scale=
"1
6
"
>
:markers=
"markers"
show-location=
"true"
:scale=
"1
8
"
>
<cover-image
class=
"returnBack"
src=
"/static/login/returnBack.png"
@
click=
"goBack()"
></cover-image>
<cover-image
class=
"start-button"
src=
"/static/sport/start1.png"
@
click=
"start"
></cover-image>
</map>
...
...
@@ -97,27 +97,10 @@
id
:
1
,
latitude
:
res
.
latitude
,
longitude
:
res
.
longitude
,
iconPath
:
'
/static/sport/
location
.png
'
iconPath
:
'
/static/sport/
marker1
.png
'
}]
}
});
},
toLocation
:
function
(
obj
)
{
// 改变地图中心位置
mapCtx
.
moveToLocation
(
obj
)
// 移动标记点并添加动画效果
mapCtx
.
translateMarker
({
markerId
:
1
,
autoRotate
:
true
,
duration
:
100
,
destination
:
{
latitude
:
obj
.
latitude
,
longitude
:
obj
.
longitude
,
},
animationEnd
()
{
console
.
log
(
'
animation end
'
)
}
})
}
}
}
...
...
teamwork/pages/sport/start.vue
浏览文件 @
f4be6b0b
...
...
@@ -99,7 +99,7 @@
icon
:
'
success
'
})
let
item
=
JSON
.
stringify
(
this
.
info
)
uni
.
setStorageSync
(
'
info
'
,
item
)
uni
.
setStorageSync
(
'
data-to-finish
'
,
item
)
uni
.
reLaunch
({
url
:
'
/pages/sport/finish
'
,
animationType
:
'
pop-in
'
,
...
...
teamwork/pages/sport/subNVue/finish.nvue
浏览文件 @
f4be6b0b
...
...
@@ -89,13 +89,24 @@
uniCloud.callFunction({
name: 'fe-sport-feeling',
data: {
userI
d: this.id,
i
d: this.id,
type: this.type,
feeling: this.feeling
}
})
.then(res => {
console.log(res)
if (res.code === 200) {
uni.showToast({
title: '运动感受保存成功',
icon: 'success'
})
} else {
uni.showToast({
title: '运动感受保存失败',
icon: 'error'
})
}
this.choose = false
})
}
}
...
...
teamwork/static/sport/marker1.png
0 → 100644
浏览文件 @
f4be6b0b
5.7 KB
teamwork/static/sport/marker2.png
0 → 100644
浏览文件 @
f4be6b0b
5.6 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录