|
@@ -38,17 +38,24 @@
|
|
},
|
|
},
|
|
onLoad(e) {
|
|
onLoad(e) {
|
|
this.getByVehiclePlate()
|
|
this.getByVehiclePlate()
|
|
- console.log(e)
|
|
|
|
if(e){
|
|
if(e){
|
|
- this.vehice.tradeAreaId = item.tradeAreaId
|
|
|
|
- this.vehice.tradeAreaName = item.tradeAreaName
|
|
|
|
- this.vehice.enterpriseId = item.enterpriseId
|
|
|
|
- this.vehice.orderId = item.id
|
|
|
|
|
|
+ let v = JSON.parse(decodeURIComponent(e.item))
|
|
|
|
+ this.vehice.tradeAreaId = v.tradeAreaId
|
|
|
|
+ this.vehice.tradeAreaName = v.tradeAreaName
|
|
|
|
+ this.vehice.enterpriseId = v.enterpriseId
|
|
|
|
+ this.vehice.orderId = v.id
|
|
}
|
|
}
|
|
- uni.$on('one-address', function(res) {
|
|
|
|
- this.address = res
|
|
|
|
|
|
+ uni.$on('one-address', res => {
|
|
|
|
+ this.vehice.loadingAddress = res.address;
|
|
|
|
+ this.informDriver()
|
|
})
|
|
})
|
|
- this.informDriver()
|
|
|
|
|
|
+ console.log(this.vehice)
|
|
|
|
+ // console.log(e)
|
|
|
|
+ // console.log(this.address)
|
|
|
|
+ // if(this.address.address) {
|
|
|
|
+ // this.vehice.address = this.address.address
|
|
|
|
+ // this.informDriver()
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 车牌查询
|
|
// 车牌查询
|
|
@@ -76,6 +83,23 @@
|
|
url: '/pages/market/one/merchant/address/address'
|
|
url: '/pages/market/one/merchant/address/address'
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 通知司机
|
|
|
|
+ informDriver() {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/transport-server/app/TbVehicle/informDriver',
|
|
|
|
+ loading: 'false',
|
|
|
|
+ method: 'POST',
|
|
|
|
+ contentType: 'application/json;charset=UTF-8',
|
|
|
|
+ data: this.vehice,
|
|
|
|
+ success: res => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '稍等片刻,司机马上就来'
|
|
|
|
+ })
|
|
|
|
+ uni.$emit("refreshPage")
|
|
|
|
+ uni.navigateBack();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|