|
|
@@ -14,7 +14,7 @@
|
|
|
</div>
|
|
|
<div class="time">
|
|
|
<span class="num">{{ lineData.length }}个景点</span>
|
|
|
- <span>预计用时:{{ Math.round(overTime / 3600) }}小时</span>
|
|
|
+ <span>预计用时:{{ lineStore.lineTime ? Math.round(lineStore.lineTime / 3600) : Math.round(overTime / 3600) }}小时</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
@@ -49,9 +49,13 @@ import tagIcon5 from "@/assets/images/tag-5.png";
|
|
|
import tagIcon6 from "@/assets/images/tag-6.png";
|
|
|
import tagIcon from "@/assets/images/tagIcon.png";
|
|
|
import router from "@/router/index.js";
|
|
|
+import { useLineStore } from "@/stores/line";
|
|
|
+
|
|
|
import axios from "axios";
|
|
|
const route = useRoute();
|
|
|
const lineId = ref(route.params.id || 1);
|
|
|
+const lineStore = useLineStore();
|
|
|
+
|
|
|
let iconList = {
|
|
|
tagIcon1,
|
|
|
tagIcon2,
|
|
|
@@ -281,8 +285,8 @@ const createdLine = () => {
|
|
|
driving.search(startLngLat, endLngLat, opts, function (status, result) {
|
|
|
if (status === "complete") {
|
|
|
if (result.routes && result.routes.length) {
|
|
|
- drawRoute(result);
|
|
|
overTime.value = result.routes[0].time;
|
|
|
+ drawRoute(result);
|
|
|
// log.success('绘制步行路线完成')
|
|
|
}
|
|
|
} else {
|