diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..5c82f95 Binary files /dev/null and b/dist.zip differ diff --git a/src/components/areaMap.vue b/src/components/areaMap.vue index e52d667..f06caf3 100644 --- a/src/components/areaMap.vue +++ b/src/components/areaMap.vue @@ -42,12 +42,12 @@ import geoJsonJiangyang from "/static/jsonData/jiangyang_geo.js" import geoJsonLongmatan from "/static/jsonData/longmatan_geo.js" import geoJsonNaxi from "/static/jsonData/naxi_geo.js" import geoJsonXuyong from "/static/jsonData/xuyong_geo.js" -import { useRouter,useRoute } from "vue-router" +import { useRouter, useRoute } from "vue-router" import { areaObj } from "@/store/index.js" import { landListApi } from "@/api.js" import { globalEventBus } from '@/common/eventBus' import { sendMsg } from "@/api.js" -const route=useRoute() +const route = useRoute() const sendFn = (event, data = '') => { sendMsg({ channel: 'user-11', event, data }) @@ -316,8 +316,11 @@ const initAreaMap = async () => { bg.setOption(option); bg.on('click', function (params) { + console.log(params, 'parmas') + + if (isMainScreen) { - sendFn('choseTown', { name: params.name }) + sendFn('choseTown', { name: params?.name||params?.value }) } else { areaStore.areaCodeList.forEach(item => { if (item.name == (params.name || params.value)) { @@ -560,11 +563,11 @@ const initTownMap = async (name) => { } watch(() => areaStore.userInfo, (value, oldValue) => { - console.log("监听到了",value) + console.log("监听到了", value) if (!value.streetCode) { initGeoJson(value.areaCode) getFamrCenter().then(res => { - initAreaMap() + initAreaMap() }) } else { initTownMap(value.name) @@ -575,38 +578,38 @@ watch(() => areaStore.userInfo, (value, oldValue) => { ) -const initGeoJson=(code)=>{ +const initGeoJson = (code) => { switch (code) { - case "510521": - geoJson = geoJsonLuxian - break; - case '510502': - geoJson = geoJsonJiangyang + case "510521": + geoJson = geoJsonLuxian + break; + case '510502': + geoJson = geoJsonJiangyang - break; - case '510503': - geoJson = geoJsonNaxi + break; + case '510503': + geoJson = geoJsonNaxi - break; - case '510504': - geoJson = geoJsonLongmatan + break; + case '510504': + geoJson = geoJsonLongmatan - break; - case '510522': - geoJson = geoJsonHejiang + break; + case '510522': + geoJson = geoJsonHejiang - break; - case '510524': - geoJson = geoJsonXuyong + break; + case '510524': + geoJson = geoJsonXuyong - break; - case '510525': - geoJson = geoJsonGulin - break; - } + break; + case '510525': + geoJson = geoJsonGulin + break; + } } -if(route.query.areaCode){ +if (route.query.areaCode) { // initGeoJson(areaCode) } diff --git a/src/view/detail.vue b/src/view/detail.vue index bb23ee3..d6a1325 100644 --- a/src/view/detail.vue +++ b/src/view/detail.vue @@ -8,7 +8,7 @@
- +