map.js 4.6 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/map/map"],{"0002":function(t,n,e){"use strict";var a=e("ba78"),i=e.n(a);i.a},"292d":function(t,n,e){"use strict";(function(t){var a=e("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=a(e("7ca3"));function o(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,a)}return e}function r(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?o(Object(e),!0).forEach((function(n){(0,i.default)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):o(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var c={onLoad:function(){this.loadData()},mounted:function(){var n=this;this.$nextTick((function(){n.$app.act.selectorQuery(n,"#app-navigation").then((function(t){n.footPad=t.height+20}))}));var e=t.createMapContext("map"),a=this.$app.storage.get("USER_LOCATION");a&&2==a.split(",").length?e.moveToLocation({longitude:a.split(",")[0],latitude:a.split(",")[1]}):e.moveToLocation(),this.mapCtx=e},data:function(){return{mapCtx:{},footPad:0,map:{latitude:26.646694,longitude:106.628201},list:{index:-1,data:[]}}},computed:{markersData:function(){var t=this,n=this.list.data.map((function(n,e){var a=r(r({},n),{},{id:parseInt(n.stationId)||e,width:e==t.list.index?32:28,height:e==t.list.index?32:28,iconPath:"/static/img/marker-icon.png"});return a}));return n}},onShareAppMessage:function(t){return"button"===t.from&&console.log(t.target),{title:"用券充天天都享会员价",path:"/pages/index/index",imageUrl:"https://national-motion.oss-cn-beijing.aliyuncs.com/20251230/7eda17a802dd49e39f8c6bb3d0f1aa4e.jpg",desc:"用券充天天都享会员价"}},onShareTimeline:function(){return{title:"用券充天天都享会员价",path:"/pages/index/index",imageUrl:"https://national-motion.oss-cn-beijing.aliyuncs.com/20251230/7eda17a802dd49e39f8c6bb3d0f1aa4e.jpg"}},methods:{convertBdToTx:function(t,n){var e=52.35987755982988,a=t-.0065,i=n-.006,o=Math.sqrt(a*a+i*i)-2e-5*Math.sin(i*e),r=Math.atan2(i,a)-3e-6*Math.cos(a*e),c=o*Math.cos(r),s=o*Math.sin(r);return{lng:c,lat:s}},loadData:function(){var t=this,n=this.$app.storage.get("USER_LOCATION"),e="",a="";n&&2==n.split(",").length&&(e=n.split(",")[0],a=n.split(",")[1]),this.$api.base("get","/applet/v1/homePage/getStationInfoMapList",{longitude:e,latitude:a},{}).then((function(n){n.data.forEach((function(n){var e=t.convertBdToTx(n.longitude,n.latitude);n.longitude=e.lng,n.latitude=e.lat})),t.list.data=n.data}))},markertap:function(t){console.log(t.detail.markerId,"点击的标记事件");var n=this.list.data.find((function(n){return parseInt(n.stationId)===t.detail.markerId}));n?(this.list.index=this.list.data.indexOf(n),console.log(this.list.data[this.list.index],"点击的标记"),this.$refs.site.open()):console.log("未找到匹配的标记点")},onClosed:function(){this.list.index=-1},gotoSiteDetail:function(){this.$app.url.goto("/pages/new-site/new-site?item="+JSON.stringify(this.list.data[this.list.index]))}}};n.default=c}).call(this,e("3223")["default"])},5949:function(t,n,e){"use strict";(function(t,n){var a=e("47a9");e("6a42");a(e("3240"));var i=a(e("679d"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},"679d":function(t,n,e){"use strict";e.r(n);var a=e("813c"),i=e("c956");for(var o in i)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(o);e("0002");var r=e("828b"),c=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);n["default"]=c.exports},"813c":function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return a}));var a={axBody:function(){return e.e("components/ax-body/ax-body").then(e.bind(null,"e199"))},axPopup:function(){return e.e("components/ax-popup/ax-popup").then(e.bind(null,"49c3"))},appNavigation:function(){return Promise.all([e.e("common/vendor"),e.e("components/app-navigation/app-navigation")]).then(e.bind(null,"bb86"))}},i=function(){var t=this,n=t.$createElement;t._self._c;t._isMounted||(t.e0=function(n){return t.$app.url.goto("/pages/search/search")},t.e1=function(n){return t.$app.url.goto("/pages/index/index",!1)})},o=[]},ba78:function(t,n,e){},c956:function(t,n,e){"use strict";e.r(n);var a=e("292d"),i=e.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(o);n["default"]=i.a}},[["5949","common/runtime","common/vendor"]]]);