|
|
@@ -24,14 +24,8 @@ Page({
|
|
|
dottedLine: true,
|
|
|
color: "#eb2f06"
|
|
|
}],
|
|
|
- markers: [{
|
|
|
- id: 999,
|
|
|
- latitude: '',
|
|
|
- longitude: '',
|
|
|
- iconPath: "https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/miniapp-static/red-circle.png?sign=6d208881376358fb4111aa6d7f1a7846&t=1647934972",
|
|
|
- height: 20,
|
|
|
- width: 20
|
|
|
- }],
|
|
|
+ markers: [],
|
|
|
+ points: [],
|
|
|
pageSize: 20,
|
|
|
latitude: 31.891992,
|
|
|
longitude: 120.551369,
|
|
|
@@ -71,15 +65,25 @@ Page({
|
|
|
} = points[points.length - 1]
|
|
|
this.data.latitude = latitude
|
|
|
this.data.longitude = longitude
|
|
|
- this.data.markers[0].latitude = latitude
|
|
|
- this.data.markers[0].longitude = longitude
|
|
|
this.data.polyline[0].points = points
|
|
|
+ let id = 1
|
|
|
+ for (let i of points) {
|
|
|
+ this.data.markers.push({
|
|
|
+ id: id + 1,
|
|
|
+ latitude: i.latitude,
|
|
|
+ longitude: i.longitude,
|
|
|
+ iconPath: "https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/miniapp-static/red-circle.png?sign=6d208881376358fb4111aa6d7f1a7846&t=1647934972",
|
|
|
+ height: 20,
|
|
|
+ width: 20
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
this.setData({
|
|
|
polyline: this.data.polyline,
|
|
|
markers: this.data.markers,
|
|
|
- latitude: this.data.latitude,
|
|
|
- longitude: this.data.longitude,
|
|
|
+ // latitude: this.data.latitude,
|
|
|
+ // longitude: this.data.longitude,
|
|
|
+ points
|
|
|
})
|
|
|
|
|
|
}
|
|
|
@@ -255,12 +259,6 @@ Page({
|
|
|
let res = await postApi("/voyage/share", {
|
|
|
voyageId
|
|
|
})
|
|
|
- // res.data.result.transInfos.forEach(item => {
|
|
|
- // item.createTime = this.subTimeStr(item.createTime)
|
|
|
- // })
|
|
|
- // res.data.result.loadingInfos.forEach(item => {
|
|
|
- // item.createTime = this.subTimeStr(item.createTime)
|
|
|
- // })
|
|
|
this.setData({
|
|
|
...res.data.result
|
|
|
})
|