flinfo/dc-App/pages/index/navigation.vue
2025-03-01 10:26:49 +08:00

38 lines
972 B
Vue

<template>
<a-map-walking v-if="startPoint" :startPoint="startPoint" :endPoint="endPoint" style="width: 100%;
height: 1000rpx"></a-map-walking>
</template>
<script>
import AMapWalking from "../../components/kuya-amap-walking/kuya-amap-walking.vue";
export default {
components: {
AMapWalking
},
data() {
return {
startPoint: [],
endPoint: [],
};
},
created() {
console.log( this.$route.query.startPoint,202020);
console.log( this.$route.query.endPoint);
if( this.$route.query.startPoint.split(',') && this.$route.query.endPoint.split(',') ){
this.startPoint = this.$route.query.startPoint.split(',')
this.endPoint = this.$route.query.endPoint.split(',')
}else{
uni.navigateBack()
}
this.setPoint(this.$route.query.startPoint.split(','), this.$route.query.endPoint.split(','))
},
methods: {
setPoint(startP, endP) {
this.startPoint = startP;
this.endPoint = endP;
}
}
};
</script>