This commit is contained in:
wangshiming
2022-03-08 19:10:50 +08:00
parent 0a649e65c2
commit 334a8bf58c

View File

@ -1007,11 +1007,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
default: default:
break; break;
} }
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) { if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance; this.totalDistance = res.distance;
this.totalTime = res.time; this.totalTime = res.time;
this.getInsurersPrice(); // 计算保费金额
}); });
} }
} }
@ -1077,6 +1078,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
default: default:
break; break;
} }
// 计算里程,时间
if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
this.getInsurersPrice(); //计算保费金额
});
}
} }
}); });
} }