|
|
@ -3,7 +3,7 @@
|
|
|
|
<BMap ref="mapRef" />
|
|
|
|
<BMap ref="mapRef" />
|
|
|
|
<view class="city" @click="handleCity()">{{city.name}}</view>
|
|
|
|
<view class="city" @click="handleCity()">{{city.name}}</view>
|
|
|
|
<view class="system" @click="handleSystem()">设置</view>
|
|
|
|
<view class="system" @click="handleSystem()">设置</view>
|
|
|
|
<SelectPoint @confirm="handleConfrimPoint"/>
|
|
|
|
<SelectPoint v-if="loadingFinish" @confirm="handleConfrimPoint"/>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
@ -15,11 +15,16 @@
|
|
|
|
const $store = useStore();
|
|
|
|
const $store = useStore();
|
|
|
|
const mapRef = ref(null);
|
|
|
|
const mapRef = ref(null);
|
|
|
|
let city = computed(()=> $store.state.city);
|
|
|
|
let city = computed(()=> $store.state.city);
|
|
|
|
|
|
|
|
let loadingFinish = ref(false);
|
|
|
|
provide('mapSearch',(str,cb) => mapRef.value.search(cb, str));
|
|
|
|
provide('mapSearch',(str,cb) => mapRef.value.search(cb, str));
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(()=>{
|
|
|
|
onMounted(()=>{
|
|
|
|
setCenter();
|
|
|
|
setCenter();
|
|
|
|
watch(city, setCenter);
|
|
|
|
watch(city, setCenter);
|
|
|
|
|
|
|
|
// 临时加的一个延迟
|
|
|
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
|
|
|
loadingFinish.value = true
|
|
|
|
|
|
|
|
},7000)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|