This commit is contained in:
Sliverber 2024-07-05 18:04:15 +08:00
parent c94cbeee3d
commit 9738ebf092
7 changed files with 112 additions and 58 deletions

View File

@ -64,7 +64,14 @@
"desc" : "你的位置信息将用来查看附近车辆"
}
},
"requiredPrivateInfos" : [ "getLocation", "chooseAddress", "chooseLocation" ]
"requiredPrivateInfos" : [
"startLocationUpdate",
"startLocationUpdateBackground",
"onLocationChange",
"getLocation",
"chooseAddress",
"chooseLocation"
]
},
"mp-alipay" : {
"usingComponents" : true

View File

@ -1311,7 +1311,7 @@
this.freeInfo = {}
this.freeListIndex = 0
this.mappolyline = []
this.lastClickedMarkerId=null
// this.lastClickedMarkerId=null
// const {
// latitude,
// longitude
@ -1366,6 +1366,7 @@
}
},
onMarkerTap(e) {
this.showdevice = false;
this.deviceIndex = 0;
this.type = 0;
@ -1396,7 +1397,7 @@
return marker;
});
}
this.lastClickedMarkerId = e.markerId;
// Update the clicked marker's image and zIndex
this.markers = this.markers.map(marker => {
if (marker.id === e.markerId) {
@ -1412,7 +1413,7 @@
});
// Store the ID of the currently clicked marker
this.lastClickedMarkerId = e.markerId;
// Get the latitude and longitude of the clicked marker
const clickedMarker = this.markers.find(marker => marker.id === e.markerId);
@ -1424,7 +1425,7 @@
console.log(`Clicked marker location - Latitude: ${latitude}, Longitude: ${longitude}`);
this.routePlanning(latitude, longitude)
// Find nearby markers
this.getNearbyMarkers(latitude, longitude);
// this.getNearbyMarkers(latitude, longitude);
}
// console.log(this.markers, 'Updated markers');
@ -1488,11 +1489,11 @@
// markers
let updatedMarkers = [...newDeviceMarkers, ...preservedMarkers];
// console.log(this.lastClickedMarkerId,'this.lastClickedMarkerIdthis.lastClickedMarkerId');
//
if (this.lastClickedMarkerId !== null) {
if (this.lastClickedMarkerId != null) {
updatedMarkers = updatedMarkers.map(marker => {
if (marker.id == this.lastClickedMarkerId) {
if (marker.id === this.lastClickedMarkerId) {
return {
...marker,
width: 50,

View File

@ -1380,7 +1380,7 @@
}
.page {
padding-bottom: 250rpx;
padding-bottom: 400rpx;
width: 750rpx;
.maskloadpage {
@ -1709,8 +1709,8 @@
.lines {
width: 750rpx;
height: 2rpx;
border: 2rpx solid #ccc;
// height: 2rpx;
border-bottom: 2rpx solid #E7E7E7;
}
.cont {

View File

@ -3,7 +3,8 @@
<u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
height='45'></u-navbar>
<map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude"
:show-location='true' :markers="markers" :polygons="polygons" :polyline="polyline">
:show-location='true' :markers="markers" :polygons="polygons" :polyline="polyline" :enable-building="true"
>
<cover-view class="park" @click="toggleIconAndCallout">
<cover-image class="img" src="https://lxnapi.ccttiot.com/bike/img/static/uRiYQZQEb3l2LsltEsyW"
mode=""></cover-image>
@ -157,26 +158,26 @@
<view class="cont">
<view v-for="(item,index) in orderInfo.tripLogs" :key="index">
<view class="info_lis" v-if="item.type==1">
开锁时间<view class="text">{{item.createTime}}</view>
开锁时间<view class="text">{{ displayAmount(item.createTime)}}</view>
</view>
<view class="info_lis" v-if="item.type==1">
开锁地点<view class="text"> {{item.address}}</view>
开锁地点<view class="text"> {{ displayAmount(item.address)}}</view>
</view>
<view class="info_lis" v-if="item.type==2">
临时锁车时间<view class="text">{{item.createTime}}</view>
临时锁车时间<view class="text">{{ displayAmount(item.createTime)}}</view>
</view>
<view class="info_lis" v-if="item.type==2">
临时锁车地点<view class="text">{{item.address}}</view>
临时锁车地点<view class="text">{{ displayAmount(item.address)}}</view>
</view>
<view class="info_lis" v-if="item.type==3">
解除时间<view class="text">{{item.createTime}}</view>
解除时间<view class="text">{{ displayAmount(item.createTime)}}</view>
</view>
<view class="info_lis" v-if="item.type==4">
关锁时间<view class="text">{{item.createTime}}</view>
关锁时间<view class="text">{{ displayAmount(item.createTime)}}</view>
</view>
<view class="info_lis" v-if="item.type==4">
关锁地点<view class="text">{{item.address}}</view>
关锁地点<view class="text">{{displayAmount(item.address)}}</view>
</view>
</view>
@ -295,22 +296,64 @@
orderInfo: {},
loading: false,
showtk: false,
show:false
show: false,
_mapContext: null
}
},
created() {
this._mapContext = uni.createMapContext("map", this); //mapmapid
},
mounted() {
// this.onRegionChange();
},
onLoad(e) {
this.orderId = e.id
this.getOrderDetail()
// this.getParking()
},
// onReady() {
// //
// console.log(this._mapContext, 'this._mapContext');
// this._mapContext.addGroundOverlay({
// id: 11,
// src: `https://lxnapi.ccttiot.com/bike/img/static/uXRz2sbToNsqckQQjnLo`, //
// bounds: {
// southwest: { // GPS
// longitude: 116.392133,
// latitude: 39.912931,
// },
// northeast: { // GPS
// longitude: 116.402022,
// latitude: 39.923246,
// },
// },
// // visible: true,
// zIndex: 1000,
// success: (res) => {
// console.log("", res);
// },
// fail: (e) => {
// console.log("", e);
// },
// });
// // this.getParking();
// },
components: {
},
methods: {
backfee(){
displayAmount(amount) {
return amount ? amount : '--';
},
backfee() {
this.show = true
this.showtk = true
},
@ -793,6 +836,7 @@
position: relative;
width: 750rpx;
height: 752rpx;
.park {
position: absolute;
display: flex;
@ -834,8 +878,8 @@
.lines {
width: 750rpx;
height: 2rpx;
border: 2rpx solid #ccc;
// height: 2rpx;
border-bottom: 2rpx solid #E7E7E7;
}
.cont {

View File

@ -324,5 +324,7 @@
}
}
}
}
</style>

View File

@ -298,8 +298,8 @@
.lines {
width: 750rpx;
height: 2rpx;
border: 2rpx solid #ccc;
// height: 2rpx;
border-bottom: 2rpx solid #E7E7E7;
}
.cont {

View File

@ -167,8 +167,8 @@
.lines {
width: 750rpx;
height: 2rpx;
border: 2rpx solid #ccc;
// height: 2rpx;
border-bottom: 2rpx solid #E7E7E7;
}
.cont {