{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport { getAppointFun } from '@/utils/appointTime';\nimport { serverList } from '@/utils/serverMap';\nimport tabBar from \"@/components/tabBar\";\nimport BottomItem from '@/components/bottomItem';\nimport AttentionItem from '@/components/attentionItem';\nimport commonBtn from \"@/components/commonBtn\";\nimport { getLocal, getAddress } from '@/utils/map';\nexport default {\n name: \"Home\",\n data() {\n return {\n map: '',\n location: [],\n locationAddress: '',\n activeTab: 0,\n serverList: serverList,\n radio: '',\n show: false,\n // 预约时间弹框\n form: {\n address: '上海市浦东新区高科西路650号',\n destAddress: '',\n appointTime: '立即出发'\n },\n columns: []\n };\n },\n components: {\n BottomItem,\n tabBar,\n AttentionItem,\n commonBtn\n },\n async mounted() {\n await this.initMap();\n this.columns = getAppointFun(new Date());\n\n // console.log('rerer', res)\n alert(JSON.stringify(res));\n },\n methods: {\n initMap() {\n // 初始化地图\n this.map = new AMap.Map('mapId', {\n viewMode: '2D',\n // 默认使用 2D 模式\n zoom: 11 //初始化地图层级\n });\n },\n\n async setAddressInfo() {\n this.location = await getLocal(this.map); // 获取经纬度\n this.map.setCenter(this.location); // 设置地图中心点\n this.locationAddress = await getAddress(this.map, this.location); // 设置定位\n },\n\n goPage(page) {\n this.$router.push({\n name: page\n });\n },\n changeTabHandler(index) {\n //切换 tab\n this.activeTab = index;\n },\n appointHandler(value, index) {\n console.log(value);\n console.log(index);\n this.show = false;\n this.$toast(`当前值:${value}, 当前索引:${index}`);\n }\n }\n};","map":{"version":3,"names":["getAppointFun","serverList","tabBar","BottomItem","AttentionItem","commonBtn","getLocal","getAddress","name","data","map","location","locationAddress","activeTab","radio","show","form","address","destAddress","appointTime","columns","components","mounted","initMap","Date","alert","JSON","stringify","res","methods","AMap","Map","viewMode","zoom","setAddressInfo","setCenter","goPage","page","$router","push","changeTabHandler","index","appointHandler","value","console","log","$toast"],"sources":["src/views/index/index.vue"],"sourcesContent":["\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {{form.address}}\r\n \r\n \r\n \r\n \r\n {{form.destAddress || '您的拖车目的地'}}\r\n \r\n \r\n \r\n \r\n \r\n 车辆位于\r\n \r\n 地面\r\n 地库\r\n 高架\r\n \r\n \r\n \r\n \r\n \r\n 预约时间\r\n \r\n {{form.appointTime}}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n"],"mappings":";AAyDA,SAAAA,aAAA;AACA,SAAAC,UAAA;AACA,OAAAC,MAAA;AACA,OAAAC,UAAA;AACA,OAAAC,aAAA;AACA,OAAAC,SAAA;AACA,SAAAC,QAAA,EAAAC,UAAA;AACA;EACAC,IAAA;EACAC,KAAA;IACA;MACAC,GAAA;MACAC,QAAA;MACAC,eAAA;MACAC,SAAA;MACAZ,UAAA,EAAAA,UAAA;MACAa,KAAA;MACAC,IAAA;MAAA;MACAC,IAAA;QACAC,OAAA;QACAC,WAAA;QACAC,WAAA;MACA;MACAC,OAAA;IACA;EACA;EACAC,UAAA;IACAlB,UAAA;IACAD,MAAA;IACAE,aAAA;IACAC;EACA;EACA,MAAAiB,QAAA;IACA,WAAAC,OAAA;IACA,KAAAH,OAAA,GAAApB,aAAA,KAAAwB,IAAA;;IAIA;IACAC,KAAA,CAAAC,IAAA,CAAAC,SAAA,CAAAC,GAAA;EACA;EACAC,OAAA;IACAN,QAAA;MAAA;MACA,KAAAb,GAAA,OAAAoB,IAAA,CAAAC,GAAA;QACAC,QAAA;QAAA;QACAC,IAAA;MACA;IACA;;IACA,MAAAC,eAAA;MACA,KAAAvB,QAAA,SAAAL,QAAA,MAAAI,GAAA;MACA,KAAAA,GAAA,CAAAyB,SAAA,MAAAxB,QAAA;MACA,KAAAC,eAAA,SAAAL,UAAA,MAAAG,GAAA,OAAAC,QAAA;IACA;;IACAyB,OAAAC,IAAA;MACA,KAAAC,OAAA,CAAAC,IAAA;QACA/B,IAAA,EAAA6B;MACA;IACA;IACAG,iBAAAC,KAAA;MAAA;MACA,KAAA5B,SAAA,GAAA4B,KAAA;IACA;IACAC,eAAAC,KAAA,EAAAF,KAAA;MACAG,OAAA,CAAAC,GAAA,CAAAF,KAAA;MACAC,OAAA,CAAAC,GAAA,CAAAJ,KAAA;MACA,KAAA1B,IAAA;MACA,KAAA+B,MAAA,QAAAH,KAAA,UAAAF,KAAA;IACA;EACA;AACA"},"metadata":{},"sourceType":"module","externalDependencies":[]}