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 280269bb
authored
Apr 15, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
自测 修改问题
1 parent
05b6902d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
19 deletions
components/myMap/myMap.js
components/myMap/myMap.wxml
pages/newMonitor/monitor.js
pages/newTraReplay/traReplay.js
utils/wxrequest.js
components/myMap/myMap.js
View file @
280269b
...
...
@@ -6,6 +6,7 @@ Component({
multipleSlots
:
true
},
properties
:
{
markers
:
Array
,
polyline
:
Array
,
isLoading
:
Boolean
,
includePoints
:
Array
// 当前页面是否有marker或路径的左边点
...
...
components/myMap/myMap.wxml
View file @
280269b
<view class="map-wrap">
<!-- 地图组件 -->
<map id="Mymap" class="my-map" polyline="{{polyline}}" longitude="{{currentLo}}" latitude="{{currentLa}}" scale="{{scale}}" enable-satellite="{{enableSatellite}}" bindmarkertap="bindmarkertap" data-num="1" enable-traffic="{{enableTraffic}}" show-location bindtap="mapClick">
<map id="Mymap" class="my-map" polyline="{{polyline}}"
markers="{{markers}}"
longitude="{{currentLo}}" latitude="{{currentLa}}" scale="{{scale}}" enable-satellite="{{enableSatellite}}" bindmarkertap="bindmarkertap" data-num="1" enable-traffic="{{enableTraffic}}" show-location bindtap="mapClick">
</map>
<!-- 地图控件 -->
<text class="icon icon-locate map-cmd-icon" catchtap="locateClick">
...
...
pages/newMonitor/monitor.js
View file @
280269b
...
...
@@ -78,7 +78,7 @@ Page({
let
points
=
this
.
data
.
points
WXRequest
.
get
(
'trialdrive/api/vehicle/location'
,
{
sns
:
this
.
data
.
sns
},
true
).
then
(
e
=>
{
},
true
,
true
).
then
(
e
=>
{
let
includePoints
=
this
.
data
.
includePoints
if
(
e
.
code
==
200
&&
e
.
data
.
length
>
0
)
{
// 逆地址解析
...
...
@@ -168,6 +168,8 @@ Page({
})
}
})
}
else
{
this
.
moveToLocation
(
Number
(
e
.
data
[
0
].
gpsLocation
.
elat
),
Number
(
e
.
data
[
0
].
gpsLocation
.
elng
))
}
}
timeoutId
=
setTimeout
(()
=>
{
...
...
pages/newTraReplay/traReplay.js
View file @
280269b
...
...
@@ -58,7 +58,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
myMap
=
this
.
selectComponent
(
'#myMap'
)
},
// 刷新
refresh
()
{
...
...
@@ -70,10 +70,11 @@ Page({
polyline
:
[],
includePoints
:
[],
speedItemsIndex
:
0
,
isReplayIng
:
false
isReplayIng
:
false
,
markers
:
[]
})
this
.
myMap
.
getMapCtx
().
removeMarkers
({
markerIds
:
[
1
,
2
]
markerIds
:
[
2
]
})
},
// 获取定位
...
...
@@ -121,10 +122,20 @@ Page({
return
false
}
else
{
this
.
setData
({
isShowModel
:
false
isShowModel
:
false
,
polyline
:
[],
includePoints
:
[],
speedItemsIndex
:
0
,
isReplayIng
:
false
,
markers
:
[]
})
this
.
myMap
.
getMapCtx
().
removeMarkers
({
markerIds
:
[
2
],
complete
:
()
=>
{
this
.
getData
()
}
})
}
},
// 选择固定时间段
timeClick
(
e
)
{
...
...
@@ -193,11 +204,8 @@ Page({
},
beginTrack
()
{
if
(
this
.
data
.
polyline
.
length
)
{
this
.
myMap
.
getMapCtx
().
removeMarkers
({
markerIds
:
[
1
]
})
let
marker
=
[{
id
:
1
,
id
:
1
05
,
width
:
15
,
height
:
25
,
latitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
latitude
,
...
...
@@ -205,19 +213,17 @@ Page({
iconPath
:
'../../images/car.png'
}]
this
.
setData
({
isReplayIng
:
true
isReplayIng
:
true
,
markers
:
marker
})
this
.
myMap
.
getMapCtx
().
addMarkers
({
markers
:
marker
,
success
:
()
=>
{
this
.
myMap
.
getMapCtx
().
moveAlong
({
markerId
:
1
,
markerId
:
105
,
path
:
this
.
data
.
polyline
[
0
].
points
,
duration
:
this
.
data
.
duration
})
duration
:
this
.
data
.
duration
,
fail
:
()
=>
{
this
.
beginTrack
()
}
})
}
},
// 暂停
...
...
utils/wxrequest.js
View file @
280269b
...
...
@@ -89,9 +89,11 @@ module.exports = {
});
})
},
get
(
url
,
data
,
isNewFindCar
){
get
(
url
,
data
,
isNewFindCar
,
notShowLoading
){
return
new
Promise
(
function
(
resolve
,
reject
){
if
(
!
notShowLoading
)
{
// 实时监控不显示加载中
wx
.
showLoading
();
}
//wx.setStorageSync('sessionid', 'JSESSIONID=node03r5y0xa3w4fh1jdk4e2q4oz860.node0;Path=/otmini')
const
params
=
{
header
:
{
...
...
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