mirror of
https://github.com/shawncai/ERP.git
synced 2024-11-14 20:56:32 +08:00
1 line
No EOL
1.6 KiB
JavaScript
1 line
No EOL
1.6 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["er4n"],{er4n:function(e,n,t){"use strict";t.r(n);var a=t("t3Un");var o={name:"GGMap",data:function(){return{show:!1,center:{lng:122.3843288,lat:11.4574355},markers:[],icon:"../qishou.png",position:{},websock:null}},created:function(){this.getmapdata()},mounted:function(){this.mapBuild()},methods:{getmapdata:function(){var e=this;(function(){var e=new URLSearchParams;return e.append("regionid",0),e.append("repositoryid",0),Object(a.a)({url:"/pss/repository/getrepositorybyreid",method:"post",data:e})})().then(function(n){var t=[];n.data.data.content.map(function(e){var n={},a={};a.lng=e.longitude,a.lat=e.latitude,n.position=a,n.name=e.name,n.address=e.address,n.phone=e.phone,t.push(n)}),e.markers=t,e.mapBuild()})},mapBuild:function(){var e=new google.maps.Map(document.getElementById("map_canvas"),{zoom:6,center:this.center,mapTypeId:google.maps.MapTypeId.ROADMAP});this.markers.map(function(n){var t=new google.maps.Marker({map:e,position:n.position}),a=new google.maps.InfoWindow({content:"<div>\n <p>门店地址: "+n.address+"</p>\n <p>门店名:"+n.name+"</p>\n </div>"});google.maps.event.addListener(t,"click",function(n){a.open(e,t)})})}}},i=t("KHd+"),s=Object(i.a)(o,function(){this.$createElement;this._self._c;return this._m(0)},[function(){var e=this.$createElement,n=this._self._c||e;return n("div",[n("div",{staticStyle:{height:"850px",width:"100%"},attrs:{id:"map_canvas"}})])}],!1,null,null,null);s.options.__file="index.vue";n.default=s.exports}}]); |