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>
@ -41,7 +42,7 @@
行驶距离<span>{{orderInfo.distance/1000}}Km</span>
</view>
</view>
</view>
</view>
<view class="info_card" style="margin-top: 20rpx;">
@ -76,7 +77,7 @@
</view>
</view>
<view class="info_card" style="margin-top: 20rpx;">
<view class="info_tit">
费用明细
@ -97,8 +98,8 @@
</view>
<view class="info_li">
<view class="half_infoli">
停车点外调度费<span>{{orderInfo.manageFee}}</span>
停车点外调度费<span>{{orderInfo.manageFee}}</span>
</view>
<view class="half_infoli">
骑行费用<span>{{orderInfo.ridingFee}}</span>
@ -157,29 +158,29 @@
<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>
<!-- <view class="info_li">
锁车时间<span>120.5618927.12379</span>
</view>
@ -189,10 +190,10 @@
<!-- <view class="info_li">
解除时间<span>120.5618927.12379</span>
</view> -->
</view>
</view>
<view class="bot" v-if='orderInfo.paid==1'>
<view class="btn" @click="backfee">
退款
@ -204,7 +205,7 @@
<view class="tip">
退款
</view>
<view class="ipt_box">
<view class="text">
运营区外调度费
@ -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
},
@ -353,10 +396,10 @@
//
this.$set(this, 'markers', this.markers.filter(marker => !marker.isCalloutVisible));
}
},
callPhone() {
uni.makePhoneCall({
phoneNumber: this.orderInfo.phonenumber
@ -598,12 +641,12 @@
appointmentFee: this.orderInfo.appointmentFee,
reason: this.orderInfo.reason
}
this.$u.put('/appVerify/order/refund', data).then((res) => {
if (res.code === 200) {
// 线
this.show = false
this.showtk = false
this.getOrderDetail()
} else {
@ -682,7 +725,7 @@
.page {
padding-bottom: 200rpx;
width: 750rpx;
.tip_box {
position: fixed;
left: 72rpx;
@ -693,23 +736,23 @@
border-radius: 30rpx 30rpx 30rpx 30rpx;
z-index: 110;
padding-bottom: 100rpx;
.top {
padding: 52rpx 38rpx 42rpx 36rpx;
.ipt_box {
margin-top: 22rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
.text {
width: 350rpx;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
}
.ipt {
padding: 10rpx 18rpx;
display: flex;
@ -720,13 +763,13 @@
height: 64rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx solid #979797;
.input {
width: 80%;
}
}
}
.tip {
width: 100%;
text-align: center;
@ -734,7 +777,7 @@
font-size: 32rpx;
color: #3D3D3D;
}
.txt {
margin-top: 32rpx;
width: 100%;
@ -744,17 +787,17 @@
color: #3D3D3D;
}
}
.bots {
position: absolute;
width: 610rpx;
// border-top: 2rpx solid #D8D8D8;
display: flex;
flex-wrap: nowrap;
// height: 100%;
bottom: -20rpx;
.bot_left {
border-radius: 0rpx 0rpx 0rpx 30rpx;
width: 50%;
@ -767,7 +810,7 @@
color: #3D3D3D;
background: #EEEEEE;
}
.bot_right {
border-radius: 0rpx 0rpx 30rpx 0rpx;
width: 50%;
@ -781,18 +824,19 @@
font-weight: 500;
font-size: 32rpx;
// color: #4C97E7;
}
}
}
.map {
position: relative;
width: 750rpx;
height: 752rpx;
.park {
position: absolute;
display: flex;
@ -805,7 +849,7 @@
width: 82rpx;
height: 82rpx;
z-index: 10;
.img {
width: 82rpx;
height: 82rpx;
@ -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 {