|
@@ -148,6 +148,7 @@
|
|
|
shopid:'',
|
|
|
msg:'',
|
|
|
helpPrice:'',
|
|
|
+ helptime:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -184,7 +185,7 @@
|
|
|
console.log('当前位置的纬度:' + res.latitude);
|
|
|
that.latitude=res.latitude;
|
|
|
that.longitude=res.longitude;
|
|
|
- that.getShopInfo()
|
|
|
+ //that.getShopInfo()
|
|
|
var obj={
|
|
|
latitude: that.latitude,
|
|
|
longitude: that.longitude,
|
|
@@ -255,6 +256,7 @@
|
|
|
onConfirm(e){
|
|
|
console.log(e)
|
|
|
this.yytime=e.result
|
|
|
+ this.helptime=e.obj.hour+':'+e.obj.minute
|
|
|
},
|
|
|
openDatetimePicker() {
|
|
|
this.$refs.picker.show()
|
|
@@ -284,14 +286,6 @@
|
|
|
})
|
|
|
},
|
|
|
sure(){
|
|
|
- if(!this.shopInfo){
|
|
|
- uni.showToast({
|
|
|
- title: this.msg||'暂未找到救援门店',
|
|
|
- icon:'none',
|
|
|
- duration: 3000
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
if(this.tabIndex==0){
|
|
|
const yy = new Date().getFullYear()
|
|
|
const MM = (new Date().getMonth() + 1) < 10 ? '0' + (new Date().getMonth() + 1) : (new Date().getMonth() + 1)
|
|
@@ -301,6 +295,7 @@
|
|
|
//const ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds() : new Date().getSeconds()
|
|
|
var time= yy + '-' + MM + '-' + dd + ' ' + HH + ':' + mm //+ ':' + ss
|
|
|
console.log(time)
|
|
|
+ this.helptime=HH + ':' + mm
|
|
|
//return false;
|
|
|
|
|
|
}else{
|
|
@@ -325,10 +320,41 @@
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ //console.log(time)
|
|
|
+
|
|
|
+ this.$http('openShopHelpSheetOrder/getShopInfo', {
|
|
|
+ lat:this.latitude,
|
|
|
+ lng:this.longitude,
|
|
|
+ type:this.typeIndex,
|
|
|
+ helptime:this.helptime
|
|
|
+ }, 'GET').then(res => {
|
|
|
+ if(res.code==0){
|
|
|
+ this.shopInfo=res.data.shopInfo;
|
|
|
+ this.helpPrice=res.data.shopHelpSetting.helpPrice;
|
|
|
+ this.msg=res.msg
|
|
|
+ }else{
|
|
|
+ this.shopInfo=''
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /* uni.redirectTo({
|
|
|
+ url:'../subPack/rescueOrderOrderDetail?id='
|
|
|
+ }) */
|
|
|
+ if(!this.shopInfo){
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂未找到救援门店',
|
|
|
+ icon:'none',
|
|
|
+ duration: 3000
|
|
|
+ });
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
uni.navigateTo({
|
|
|
url:'confirmRescue?lat='+this.latitude+"&lng="+this.longitude+"&shopId="+this.shopInfo.ID+'&shopName='+this.shopInfo.ShopName+'&type='+this.typeIndex+'&time='+time+'¤tAddress='+this.currentAddress+'&endAddress='+this.endAddress+'&endLat='+this.endLat+'&endLng='+this.endLng
|
|
|
})
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
startBtn(){
|
|
|
var that=this;
|
|
@@ -341,7 +367,7 @@
|
|
|
// console.log('纬度:' + res.latitude);
|
|
|
// console.log('经度:' + res.longitude);
|
|
|
that.longitude=res.longitude
|
|
|
- that.latitude=res.latitude
|
|
|
+ that.latitude=res.latitude//.toFixed(5)
|
|
|
var obj={
|
|
|
latitude: that.latitude,
|
|
|
longitude: that.longitude,
|
|
@@ -355,6 +381,7 @@
|
|
|
}
|
|
|
that.covers[0]=obj;
|
|
|
that.points[0]=obj2;
|
|
|
+ //that.getShopInfo()
|
|
|
//that.calculateDistance()
|
|
|
console.log(that.covers)
|
|
|
},
|