38 lines
972 B
Vue
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> |