This commit is contained in:
lxz 2024-01-09 18:44:30 +08:00
parent 598e9622c4
commit 45f1b937cc
1 changed files with 8 additions and 5 deletions

View File

@ -348,6 +348,7 @@ const initTownMap = async (name) => {
...areaStore.userInfo
})
console.log(showArea.value,"res")
res.data.list.forEach(item => {
@ -367,7 +368,6 @@ const initTownMap = async (name) => {
return item.properties.name == name
})
var mapName = 'town';
const myChart = document.getElementById("chart3")
let option = {
@ -588,9 +588,12 @@ const initTownMap = async (name) => {
// )
watch(() => areaStore.userInfo, (value, oldValue) => {
if (value.areaCode) {
switch (value.areaCode) {
watch(() => areaStore.userInfo.areaCode, (value, oldValue) => {
console.log(value,'value')
if (value) {
switch (value) {
case "510503":
geoJson = geoJsonNaxi
break;
@ -645,7 +648,7 @@ globalEventBus.on('choseTown', data => {
areaStore.areaCodeList.forEach(item => {
if (item.name == (data.name)) {
areaStore.changeUserInfoFn(510521, item.code)
areaStore.changeUserInfoFn(areaStore.userInfo.areaCode, item.code)
}
})
areaStore.changeAddress('', data.name )