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" : "你的位置信息将用来查看附近车辆" "desc" : "你的位置信息将用来查看附近车辆"
} }
}, },
"requiredPrivateInfos" : [ "getLocation", "chooseAddress", "chooseLocation" ] "requiredPrivateInfos" : [
"startLocationUpdate",
"startLocationUpdateBackground",
"onLocationChange",
"getLocation",
"chooseAddress",
"chooseLocation"
]
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true

View File

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

View File

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

View File

@ -3,7 +3,8 @@
<u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' <u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
height='45'></u-navbar> height='45'></u-navbar>
<map class="map" id="map" ref="map" :scale="zoomSize" :latitude="latitude" :longitude="longitude" <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-view class="park" @click="toggleIconAndCallout">
<cover-image class="img" src="https://lxnapi.ccttiot.com/bike/img/static/uRiYQZQEb3l2LsltEsyW" <cover-image class="img" src="https://lxnapi.ccttiot.com/bike/img/static/uRiYQZQEb3l2LsltEsyW"
mode=""></cover-image> mode=""></cover-image>
@ -41,7 +42,7 @@
行驶距离<span>{{orderInfo.distance/1000}}Km</span> 行驶距离<span>{{orderInfo.distance/1000}}Km</span>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="info_card" style="margin-top: 20rpx;"> <view class="info_card" style="margin-top: 20rpx;">
@ -76,7 +77,7 @@
</view> </view>
</view> </view>
<view class="info_card" style="margin-top: 20rpx;"> <view class="info_card" style="margin-top: 20rpx;">
<view class="info_tit"> <view class="info_tit">
费用明细 费用明细
@ -97,8 +98,8 @@
</view> </view>
<view class="info_li"> <view class="info_li">
<view class="half_infoli"> <view class="half_infoli">
停车点外调度费<span>{{orderInfo.manageFee}}</span> 停车点外调度费<span>{{orderInfo.manageFee}}</span>
</view> </view>
<view class="half_infoli"> <view class="half_infoli">
骑行费用<span>{{orderInfo.ridingFee}}</span> 骑行费用<span>{{orderInfo.ridingFee}}</span>
@ -157,29 +158,29 @@
<view class="cont"> <view class="cont">
<view v-for="(item,index) in orderInfo.tripLogs" :key="index"> <view v-for="(item,index) in orderInfo.tripLogs" :key="index">
<view class="info_lis" v-if="item.type==1"> <view class="info_lis" v-if="item.type==1">
开锁时间<view class="text">{{item.createTime}}</view> 开锁时间<view class="text">{{ displayAmount(item.createTime)}}</view>
</view> </view>
<view class="info_lis" v-if="item.type==1"> <view class="info_lis" v-if="item.type==1">
开锁地点<view class="text"> {{item.address}}</view> 开锁地点<view class="text"> {{ displayAmount(item.address)}}</view>
</view> </view>
<view class="info_lis" v-if="item.type==2"> <view class="info_lis" v-if="item.type==2">
临时锁车时间<view class="text">{{item.createTime}}</view> 临时锁车时间<view class="text">{{ displayAmount(item.createTime)}}</view>
</view> </view>
<view class="info_lis" v-if="item.type==2"> <view class="info_lis" v-if="item.type==2">
临时锁车地点<view class="text">{{item.address}}</view> 临时锁车地点<view class="text">{{ displayAmount(item.address)}}</view>
</view> </view>
<view class="info_lis" v-if="item.type==3"> <view class="info_lis" v-if="item.type==3">
解除时间<view class="text">{{item.createTime}}</view> 解除时间<view class="text">{{ displayAmount(item.createTime)}}</view>
</view> </view>
<view class="info_lis" v-if="item.type==4"> <view class="info_lis" v-if="item.type==4">
关锁时间<view class="text">{{item.createTime}}</view> 关锁时间<view class="text">{{ displayAmount(item.createTime)}}</view>
</view> </view>
<view class="info_lis" v-if="item.type==4"> <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> </view>
<!-- <view class="info_li"> <!-- <view class="info_li">
锁车时间<span>120.5618927.12379</span> 锁车时间<span>120.5618927.12379</span>
</view> </view>
@ -189,10 +190,10 @@
<!-- <view class="info_li"> <!-- <view class="info_li">
解除时间<span>120.5618927.12379</span> 解除时间<span>120.5618927.12379</span>
</view> --> </view> -->
</view> </view>
</view> </view>
<view class="bot" v-if='orderInfo.paid==1'> <view class="bot" v-if='orderInfo.paid==1'>
<view class="btn" @click="backfee"> <view class="btn" @click="backfee">
退款 退款
@ -204,7 +205,7 @@
<view class="tip"> <view class="tip">
退款 退款
</view> </view>
<view class="ipt_box"> <view class="ipt_box">
<view class="text"> <view class="text">
运营区外调度费 运营区外调度费
@ -295,22 +296,64 @@
orderInfo: {}, orderInfo: {},
loading: false, loading: false,
showtk: false, showtk: false,
show:false show: false,
_mapContext: null
} }
}, },
created() {
this._mapContext = uni.createMapContext("map", this); //mapmapid
},
mounted() {
// this.onRegionChange();
},
onLoad(e) { onLoad(e) {
this.orderId = e.id this.orderId = e.id
this.getOrderDetail() this.getOrderDetail()
// this.getParking() // 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: { components: {
}, },
methods: { methods: {
backfee(){ displayAmount(amount) {
return amount ? amount : '--';
},
backfee() {
this.show = true this.show = true
this.showtk = true this.showtk = true
}, },
@ -353,10 +396,10 @@
// //
this.$set(this, 'markers', this.markers.filter(marker => !marker.isCalloutVisible)); this.$set(this, 'markers', this.markers.filter(marker => !marker.isCalloutVisible));
} }
}, },
callPhone() { callPhone() {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: this.orderInfo.phonenumber phoneNumber: this.orderInfo.phonenumber
@ -598,12 +641,12 @@
appointmentFee: this.orderInfo.appointmentFee, appointmentFee: this.orderInfo.appointmentFee,
reason: this.orderInfo.reason reason: this.orderInfo.reason
} }
this.$u.put('/appVerify/order/refund', data).then((res) => { this.$u.put('/appVerify/order/refund', data).then((res) => {
if (res.code === 200) { if (res.code === 200) {
// 线 // 线
this.show = false this.show = false
this.showtk = false this.showtk = false
this.getOrderDetail() this.getOrderDetail()
} else { } else {
@ -682,7 +725,7 @@
.page { .page {
padding-bottom: 200rpx; padding-bottom: 200rpx;
width: 750rpx; width: 750rpx;
.tip_box { .tip_box {
position: fixed; position: fixed;
left: 72rpx; left: 72rpx;
@ -693,23 +736,23 @@
border-radius: 30rpx 30rpx 30rpx 30rpx; border-radius: 30rpx 30rpx 30rpx 30rpx;
z-index: 110; z-index: 110;
padding-bottom: 100rpx; padding-bottom: 100rpx;
.top { .top {
padding: 52rpx 38rpx 42rpx 36rpx; padding: 52rpx 38rpx 42rpx 36rpx;
.ipt_box { .ipt_box {
margin-top: 22rpx; margin-top: 22rpx;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
.text { .text {
width: 350rpx; width: 350rpx;
font-weight: 400; font-weight: 400;
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.ipt { .ipt {
padding: 10rpx 18rpx; padding: 10rpx 18rpx;
display: flex; display: flex;
@ -720,13 +763,13 @@
height: 64rpx; height: 64rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
border: 2rpx solid #979797; border: 2rpx solid #979797;
.input { .input {
width: 80%; width: 80%;
} }
} }
} }
.tip { .tip {
width: 100%; width: 100%;
text-align: center; text-align: center;
@ -734,7 +777,7 @@
font-size: 32rpx; font-size: 32rpx;
color: #3D3D3D; color: #3D3D3D;
} }
.txt { .txt {
margin-top: 32rpx; margin-top: 32rpx;
width: 100%; width: 100%;
@ -744,17 +787,17 @@
color: #3D3D3D; color: #3D3D3D;
} }
} }
.bots { .bots {
position: absolute; position: absolute;
width: 610rpx; width: 610rpx;
// border-top: 2rpx solid #D8D8D8; // border-top: 2rpx solid #D8D8D8;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
// height: 100%; // height: 100%;
bottom: -20rpx; bottom: -20rpx;
.bot_left { .bot_left {
border-radius: 0rpx 0rpx 0rpx 30rpx; border-radius: 0rpx 0rpx 0rpx 30rpx;
width: 50%; width: 50%;
@ -767,7 +810,7 @@
color: #3D3D3D; color: #3D3D3D;
background: #EEEEEE; background: #EEEEEE;
} }
.bot_right { .bot_right {
border-radius: 0rpx 0rpx 30rpx 0rpx; border-radius: 0rpx 0rpx 30rpx 0rpx;
width: 50%; width: 50%;
@ -781,18 +824,19 @@
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
// color: #4C97E7; // color: #4C97E7;
} }
} }
} }
.map { .map {
position: relative; position: relative;
width: 750rpx; width: 750rpx;
height: 752rpx; height: 752rpx;
.park { .park {
position: absolute; position: absolute;
display: flex; display: flex;
@ -805,7 +849,7 @@
width: 82rpx; width: 82rpx;
height: 82rpx; height: 82rpx;
z-index: 10; z-index: 10;
.img { .img {
width: 82rpx; width: 82rpx;
height: 82rpx; height: 82rpx;
@ -834,8 +878,8 @@
.lines { .lines {
width: 750rpx; width: 750rpx;
height: 2rpx; // height: 2rpx;
border: 2rpx solid #ccc; border-bottom: 2rpx solid #E7E7E7;
} }
.cont { .cont {

View File

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

View File

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

View File

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