Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
e-shield-miniprogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 05b6902d
authored
Apr 14, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
d7d8953c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
27 deletions
pages/newFindCar/findCar.js
pages/newTraReplay/traReplay.js
pages/newTraReplay/traReplay.wxml
pages/newFindCar/findCar.js
View file @
05b6902
...
...
@@ -534,7 +534,6 @@ Page({
if
(
that
.
data
.
sns
){
opts
.
path
=
`
${
opts
.
path
}
?sns=
${
encodeURIComponent
(
this
.
data
.
sns
)}
&isSharePage=true`
;
}
console
.
log
(
opts
)
return
opts
;
}
})
\ No newline at end of file
pages/newTraReplay/traReplay.js
View file @
05b6902
...
...
@@ -67,7 +67,6 @@ Page({
duration
:
20000
,
clickItem
:
null
,
selectTime
:
''
,
isReplayIng
:
false
,
polyline
:
[],
includePoints
:
[],
speedItemsIndex
:
0
,
...
...
@@ -170,20 +169,6 @@ Page({
polyline
:
polyline
,
includePoints
:
arr
})
this
.
myMap
.
getMapCtx
().
removeMarkers
({
markerIds
:
[
1
]
})
let
marker
=
[{
id
:
1
,
width
:
15
,
height
:
25
,
latitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
latitude
,
longitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
longitude
,
iconPath
:
'../../images/car.png'
}]
this
.
myMap
.
getMapCtx
().
addMarkers
({
markers
:
marker
})
}
else
{
wx
.
showModal
({
content
:
'暂无数据'
,
...
...
@@ -208,22 +193,31 @@ Page({
},
beginTrack
()
{
if
(
this
.
data
.
polyline
.
length
)
{
this
.
myMap
.
getMapCtx
().
removeMarkers
({
markerIds
:
[
1
]
})
let
marker
=
[{
id
:
1
,
width
:
15
,
height
:
25
,
latitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
latitude
,
longitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
longitude
,
iconPath
:
'../../images/car.png'
}]
this
.
setData
({
isReplayIng
:
true
})
this
.
myMap
.
getMapCtx
().
moveAlong
({
marker
Id
:
1
,
path
:
this
.
data
.
polyline
[
0
].
points
,
duration
:
this
.
data
.
duration
,
success
:
(
res
)
=>
{
this
.
setData
({
isReplayIng
:
false
this
.
myMap
.
getMapCtx
().
addMarkers
({
marker
s
:
marker
,
success
:
()
=>
{
this
.
myMap
.
getMapCtx
().
moveAlong
({
markerId
:
1
,
path
:
this
.
data
.
polyline
[
0
].
points
,
duration
:
this
.
data
.
duration
})
},
fail
:
()
=>
{
this
.
beginTrack
()
}
})
}
},
// 暂停
...
...
pages/newTraReplay/traReplay.wxml
View file @
05b6902
...
...
@@ -15,7 +15,7 @@
<!-- 回放控制按钮 -->
<view class="btn-control" slot="bottomBox">
<view class="icon icon-replay-play play-btn {{isReplayIng? '' : 'active'}}" bindtap="play"></view>
<
view class="icon icon-replay-pause pause-btn {{isReplayIng? 'active' : ''}}" bindtap="pause"></view
>
<
!-- <view class="icon icon-replay-pause pause-btn {{isReplayIng? 'active' : ''}}" bindtap="pause"></view> --
>
<view class="icon icon-replay-refresh refresh-btn active" bindtap="replayRefresh"></view>
</view>
<!-- 轨迹时间弹窗 -->
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment