gjy 3 năm trước cách đây
mục cha
commit
bbd2629ffe
3 tập tin đã thay đổi với 13 bổ sung7 xóa
  1. 3 3
      pages/order/index.vue
  2. 9 3
      pages/order/map.nvue
  3. 1 1
      pages/order/map.vue

+ 3 - 3
pages/order/index.vue

@@ -124,7 +124,7 @@
 						<!-- <image class="jt-icon" src="@/static/images/order/position.png" mode='widthFix'
 							@click.stop="toMap(good)">
 						</image> -->
-						<view class="start normal look-map" @click.stop="toMap(good)">
+						<view v-if="good.cargoOwnerStatus=='运输中'" class="start normal look-map" @click.stop="toMap(good)">
 							查看轨迹</view>
 						<view class="stop" @click.stop="accept(good,1)" v-if="good.cargoOwnerStatus=='待接单'">接受
 						</view>
@@ -135,8 +135,8 @@
 						<!-- <view class="stop active" @click.stop="stop(good)">终止</view> -->
 
 						<!-- confirmLoading(good,3) -->
-						<view class="start normal" @click.stop="toDetail(good.id)"
-							v-if="good.cargoOwnerStatus=='待确认装车'">确认装车</view>
+						<view v-if="good.cargoOwnerStatus=='待确认装车'" class="start normal" @click.stop="toDetail(good.id)"
+							>确认装车</view>
 						<!-- <view class="start normal" @click.stop="confirmLoading(good,1)">确认装车</view> -->
 						<view class="start normal" v-if="good.cargoOwnerStatus!='待接单'&&good.cargoOwnerStatus!='未装车'">
 							联系客服</view>

+ 9 - 3
pages/order/map.nvue

@@ -65,7 +65,13 @@
 						'content-type': 'application/json' //'application/x-www-form-urlencoded; charset=UTF-8',
 					},
 					success: (res) => {
-						console.log(res);
+						console.log(res.data.data,11111111)
+						if(res.data.code==200){
+							if(res.data.data.longitudeLatitude){
+								console.log(JSON.parse(res.data.data.longitudeLatitude));
+								this.polyline[0].points =JSON.parse(res.data.data.longitudeLatitude)
+							}
+						}
 					}
 				})
 				// this.$request.baseRequest('post', '/hyOrderTravelPath/getInfo', {
@@ -95,8 +101,8 @@
 				// 	// 	var longitude = this.polyline[0].points[this.polyline[0].points.length -1].longitude + 0.0001
 				// 	// 	this.polyline[0].points.push({latitude,longitude})
 				// 	// }
-				// 	// this.durationTime = Math.ceil(30000 / this.polyline[0].points.length)	//默认播放全程使用30秒,计算相连两点动画时长
-				// 	// this.initMapData()
+					this.durationTime = Math.ceil(30000 / this.polyline[0].points.length)	//默认播放全程使用30秒,计算相连两点动画时长
+					this.initMapData()
 				// 	})
 				// 	.catch(res => {
 				// 		uni.hideLoading()

+ 1 - 1
pages/order/map.vue

@@ -63,7 +63,7 @@ export default {
 		getTrack() {
 			this.$request.baseRequest('post', '//hyOrderTravelPath/getInfo', {
 					orderId: this.id,
-				}).then(res => {debugger
+				}).then(res => {
 				console.log("res",res)
 					// this.polyline[0].points = [
 					// 	{latitude: 39.997761, longitude: 116.478935},