From ec9047869bd2642821d1dfc5bbd339313d910d66 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 06 七月 2026 18:14:11 +0800
Subject: [PATCH] 新增功能
---
bicycle/unpackage/dist/dev/mp-weixin/pages/maps/maps.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/bicycle/unpackage/dist/dev/mp-weixin/pages/maps/maps.js b/bicycle/unpackage/dist/dev/mp-weixin/pages/maps/maps.js
index 7ce93f9..ab7b9c6 100644
--- a/bicycle/unpackage/dist/dev/mp-weixin/pages/maps/maps.js
+++ b/bicycle/unpackage/dist/dev/mp-weixin/pages/maps/maps.js
@@ -1,2 +1,2 @@
-(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/maps/maps"],{188:function(t,e,n){"use strict";(function(t,e){var o=n(4);n(30);o(n(25));var i=o(n(189));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},189:function(t,e,n){"use strict";n.r(e);var o=n(190),i=n(192);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n(195);var c,r=n(37),s=Object(r["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"36df0b66",null,!1,o["components"],c);s.options.__file="pages/maps/maps.vue",e["default"]=s.exports},190:function(t,e,n){"use strict";n.r(e);var o=n(191);n.d(e,"render",(function(){return o["render"]})),n.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(e,"components",(function(){return o["components"]}))},191:function(t,e,n){"use strict";var o;n.r(e),n.d(e,"render",(function(){return i})),n.d(e,"staticRenderFns",(function(){return c})),n.d(e,"recyclableRender",(function(){return a})),n.d(e,"components",(function(){return o}));try{o={uPopup:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(n.bind(null,383))}}}catch(r){if(-1===r.message.indexOf("Cannot find module")||-1===r.message.indexOf(".vue"))throw r;console.error(r.message),console.error("1. 鎺掓煡缁勪欢鍚嶇О鎷煎啓鏄惁姝g‘"),console.error("2. 鎺掓煡缁勪欢鏄惁绗﹀悎 easycom 瑙勮寖锛屾枃妗o細https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 鑻ョ粍浠朵笉绗﹀悎 easycom 瑙勮寖锛岄渶鎵嬪姩寮曞叆锛屽苟鍦� components 涓敞鍐岃缁勪欢")}var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.rice>1e3?(t.rice/1e3).toFixed(1):null),o=t.rice>1e3?(t.rice/1e3).toFixed(1):null;t._isMounted||(t.e0=function(e){t.show=!1}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:o}})},a=!1,c=[];i._withStripped=!0},192:function(t,e,n){"use strict";n.r(e);var o=n(193),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},193:function(t,e,n){"use strict";(function(t){var o=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(n(58)),a=o(n(18)),c=o(n(60)),r=o(n(11)),s=n(194),u=n(34);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f={data:function(){return{type:null,show:!1,latitude:"",longitude:"",mapShowLocation:!1,markers:[],info:{},rice:"",infoData:{},eleBusinessArea:[],isShow:!1}},computed:d({},(0,u.mapState)(["userInfo"])),onLoad:function(t){this.type=t.type,this.getAddress(),this.refresh()},methods:{saoma:function(){t.$emit("update",{msg:"椤甸潰鏇存柊"}),t.navigateBack({delta:1})},refresh:function(){var t=this;this.$u.api.home().then((function(e){200===e.code&&(t.isShow=!e.data.memberRidesResponse)}))},getAddress:function(){var e=this;t.getSystemInfo({success:function(n){var o=n.locationEnabled,i=n.locationAuthorized;0==o||0==i?t.showToast({title:"璇锋墦寮�鎵嬫満GPS",icon:"none"}):t.authorize({scope:"scope.userLocation",success:function(t){e.fnGetlocation()},fail:function(n){n=n["errMsg"],t.showModal({content:"闇�瑕佹巿鏉冧綅缃俊鎭�",confirmText:"纭鎺堟潈"}).then((function(n){n.confirm&&t.openSetting({success:function(n){n.authSetting["scope.userLocation"]?(t.showToast({title:"鎺堟潈鎴愬姛",icon:"success"}),e.fnGetlocation()):(e.getSite(),t.showToast({title:"鎺堟潈澶辫触,璇烽噸鏂版巿鏉�",icon:"none"}),t.showModal({title:"鎺堟潈",content:"鑾峰彇鎺堟潈澶辫触,鏄惁鍓嶅線鎺堟潈璁剧疆锛�",success:function(e){e.confirm&&t.openSetting()},fail:function(){t.showToast({title:"绯荤粺閿欒锛�",icon:"none"})}}))}}),n.cancel&&(t.showToast({title:"浣犳嫆缁濅簡鎺堟潈锛屾棤娉曡幏寰楀懆杈逛俊鎭�",icon:"none"}),e.getSite())}))}})}})},getEleBikeList:function(){var t=this;return(0,c.default)(i.default.mark((function e(){var n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$u.api.eleBikeList({});case 2:n=e.sent,200===n.code&&n.data.forEach((function(e,n){var o=(0,s.distance)(t.latitude,t.longitude,e.latitude,e.longitude);t.markers.push({id:n,width:40,height:40,distance:t.latitude&&t.longitude?o:"鏈煡璺濈",latitude:e.latitude,longitude:e.longitude,title:e.code,iconPath:"/static/icon/ic_bike@2x.png",customCallout:{anchorY:0,anchorX:0,display:"BYCLICK"}})}));case 4:case"end":return e.stop()}}),e)})))()},fnGetlocation:function(){var e=this;t.getLocation({type:"gcj02",altitude:!0,isHighAccuracy:!0,success:function(t){e.mapShowLocation=!0,e.latitude=t.latitude,e.longitude=t.longitude,1==e.type?(console.log("鑷杞�"),e.getSite()):(console.log("鐢靛姩杞�"),e.getEleBikeList(),e.getEleSiteList())},fail:function(e){"getLocation:fail 棰戠箒璋冪敤浼氬鍔犵數閲忔崯鑰楋紝鍙�冭檻浣跨敤 wx.onLocationChange 鐩戝惉鍦扮悊浣嶇疆鍙樺寲"===e.errMsg&&t.showToast({title:"璇峰嬁棰戠箒瀹氫綅",icon:"none"}),"getLocation:fail auth deny"===e.errMsg&&t.showToast({title:"鏃犳硶瀹氫綅锛岃閲嶆柊鑾峰彇浣嶇疆淇℃伅",icon:"none"}),"getLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF"===e.errMsg&&t.showModal({content:"璇峰紑鍚墜鏈哄畾浣嶆湇鍔�",showCancel:!1})}})},toNavigation:function(){t.openLocation({longitude:parseFloat(this.info.longitude),latitude:parseFloat(this.info.latitude),scale:28,name:this.info.title,address:this.info.addr,success:function(t){console.log("success:",t)}})},clickcontrol:function(){var e=t.createMapContext("mapId",this);e.moveToLocation({complete:function(t){console.log("绉诲姩瀹屾垚:",t)}})},getEleSiteList:function(){var t=this;return(0,c.default)(i.default.mark((function e(){var n,o,c,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],e.next=3,t.$u.api.getEleBusinessArea({});case 3:return o=e.sent,200===o.code&&(c=JSON.parse(o.data),n.push({points:c.map((function(t){return{latitude:t.lat,longitude:t.lng}})),fillColor:"#0077FF12",strokeColor:"#0077FF",strokeWidth:3,zIndex:7})),e.next=7,t.$u.api.eleSiteList({});case 7:r=e.sent,200===r.code&&(r.data.forEach((function(t){var e=JSON.parse(t.electronicFence);t.electronicFence=e.map((function(t){return{latitude:t.lat,longitude:t.lng}}))})),t.eleBusinessArea=r.data.map((function(t){return{points:t.electronicFence,title:t.name,fillColor:"#0077FF4D",strokeColor:"#0077FF",strokeWidth:3,zIndex:7}})),t.eleBusinessArea.forEach((function(e){var n=t.calculatePolygonCenter(e.points),o=n.latitude,i=n.longitude,a=(0,s.distance)(t.latitude,t.longitude,o,i);t.markers.push({id:Math.floor(900*Math.random())+100,width:30,height:40,isShow:!1,title:e.title,distance:t.latitude&&t.longitude?a:"鏈煡璺濈",latitude:o,longitude:i,iconPath:"/static/icon/ic_park@2x.png",customCallout:{anchorY:0,anchorX:0,display:"BYCLICK"}})}))),t.eleBusinessArea=[].concat(n,(0,a.default)(t.eleBusinessArea));case 10:case"end":return e.stop()}}),e)})))()},calculatePolygonCenter:function(t){for(var e=0,n=0,o=t.length,i=0;i<o;i++)e+=t[i].latitude,n+=t[i].longitude;return{latitude:e/o,longitude:n/o}},getSite:function(){var t=this;this.$u.api.rentSiteList().then((function(e){200===e.code&&(t.markers=[],e.data.forEach((function(e,n){var o=(0,s.distance)(t.latitude,t.longitude,e.latitude,e.longitude);t.markers.push({id:n,width:40,height:40,isShow:!0,distance:t.latitude&&t.longitude?o:"鏈煡璺濈",latitude:e.latitude,longitude:e.longitude,title:e.name,iconPath:"/static/icon/ic_bike@2x.png",addr:e.addr,customCallout:{anchorY:0,anchorX:0,display:"BYCLICK"}})})))}))},markertap:function(t){var e=this;this.show=!1,this.markers.forEach((function(n){n.id===t.markerId?(e.rice=n.distance,n.customCallout.display="ALWAYS",n.isShow?(n.width=50,n.height=50):(n.width=40,n.height=50),setTimeout((function(){e.info=n,e.show=!0}),300)):(n.isShow?(n.width=40,n.height=40):(n.width=30,n.height=40),n.customCallout.display="BYCLICK")}))},navigation:function(e){t.openLocation({latitude:Number(e.latitude),longitude:Number(e.longitude),name:"娴嬭瘯鍚嶇О",address:"娴嬭瘯璇︾粏鍦板潃",success:function(){console.log("鎵撳紑鍦板浘瀵艰埅鎴愬姛")},fail:function(t){console.log("鎵撳紑鍦板浘瀵艰埅澶辫触",t)}})}}};e.default=f}).call(this,n(2)["default"])},195:function(t,e,n){"use strict";n.r(e);var o=n(196),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},196:function(t,e,n){}},[[188,"common/runtime","common/vendor"]]]);
+(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/maps/maps"],{188:function(t,e,n){"use strict";(function(t,e){var o=n(4);n(30);o(n(25));var i=o(n(189));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},189:function(t,e,n){"use strict";n.r(e);var o=n(190),i=n(192);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n(195);var c,r=n(40),s=Object(r["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"36df0b66",null,!1,o["components"],c);s.options.__file="pages/maps/maps.vue",e["default"]=s.exports},190:function(t,e,n){"use strict";n.r(e);var o=n(191);n.d(e,"render",(function(){return o["render"]})),n.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(e,"components",(function(){return o["components"]}))},191:function(t,e,n){"use strict";var o;n.r(e),n.d(e,"render",(function(){return i})),n.d(e,"staticRenderFns",(function(){return c})),n.d(e,"recyclableRender",(function(){return a})),n.d(e,"components",(function(){return o}));try{o={uPopup:function(){return Promise.all([n.e("common/vendor"),n.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(n.bind(null,383))}}}catch(r){if(-1===r.message.indexOf("Cannot find module")||-1===r.message.indexOf(".vue"))throw r;console.error(r.message),console.error("1. 鎺掓煡缁勪欢鍚嶇О鎷煎啓鏄惁姝g‘"),console.error("2. 鎺掓煡缁勪欢鏄惁绗﹀悎 easycom 瑙勮寖锛屾枃妗o細https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 鑻ョ粍浠朵笉绗﹀悎 easycom 瑙勮寖锛岄渶鎵嬪姩寮曞叆锛屽苟鍦� components 涓敞鍐岃缁勪欢")}var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.rice>1e3?(t.rice/1e3).toFixed(1):null),o=t.rice>1e3?(t.rice/1e3).toFixed(1):null;t._isMounted||(t.e0=function(e){t.show=!1}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:o}})},a=!1,c=[];i._withStripped=!0},192:function(t,e,n){"use strict";n.r(e);var o=n(193),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},193:function(t,e,n){"use strict";(function(t){var o=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(n(34)),a=o(n(18)),c=o(n(36)),r=o(n(11)),s=n(194),u=n(37);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){(0,r.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f={data:function(){return{type:null,show:!1,latitude:"",longitude:"",mapShowLocation:!1,markers:[],info:{},rice:"",infoData:{},eleBusinessArea:[],isShow:!1}},computed:d({},(0,u.mapState)(["userInfo"])),onLoad:function(t){this.type=t.type,this.getAddress(),this.refresh()},methods:{saoma:function(){t.$emit("update",{msg:"椤甸潰鏇存柊"}),t.navigateBack({delta:1})},refresh:function(){var t=this;this.$u.api.home().then((function(e){200===e.code&&(t.isShow=!e.data.memberRidesResponse)}))},getAddress:function(){var e=this;t.getSystemInfo({success:function(n){var o=n.locationEnabled,i=n.locationAuthorized;0==o||0==i?t.showToast({title:"璇锋墦寮�鎵嬫満GPS",icon:"none"}):t.authorize({scope:"scope.userLocation",success:function(t){e.fnGetlocation()},fail:function(n){n=n["errMsg"],t.showModal({content:"闇�瑕佹巿鏉冧綅缃俊鎭�",confirmText:"纭鎺堟潈"}).then((function(n){n.confirm&&t.openSetting({success:function(n){n.authSetting["scope.userLocation"]?(t.showToast({title:"鎺堟潈鎴愬姛",icon:"success"}),e.fnGetlocation()):(e.getSite(),t.showToast({title:"鎺堟潈澶辫触,璇烽噸鏂版巿鏉�",icon:"none"}),t.showModal({title:"鎺堟潈",content:"鑾峰彇鎺堟潈澶辫触,鏄惁鍓嶅線鎺堟潈璁剧疆锛�",success:function(e){e.confirm&&t.openSetting()},fail:function(){t.showToast({title:"绯荤粺閿欒锛�",icon:"none"})}}))}}),n.cancel&&(t.showToast({title:"浣犳嫆缁濅簡鎺堟潈锛屾棤娉曡幏寰楀懆杈逛俊鎭�",icon:"none"}),e.getSite())}))}})}})},getEleBikeList:function(){var t=this;return(0,c.default)(i.default.mark((function e(){var n;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$u.api.eleBikeList({});case 2:n=e.sent,200===n.code&&n.data.forEach((function(e,n){var o=(0,s.distance)(t.latitude,t.longitude,e.latitude,e.longitude);t.markers.push({id:n,width:40,height:40,distance:t.latitude&&t.longitude?o:"鏈煡璺濈",latitude:e.latitude,longitude:e.longitude,title:e.code,iconPath:"/static/icon/ic_bike@2x.png",customCallout:{anchorY:0,anchorX:0,display:"BYCLICK"}})}));case 4:case"end":return e.stop()}}),e)})))()},fnGetlocation:function(){var e=this;t.getLocation({type:"gcj02",altitude:!0,isHighAccuracy:!0,success:function(t){e.mapShowLocation=!0,e.latitude=t.latitude,e.longitude=t.longitude,1==e.type?(console.log("鑷杞�"),e.getSite()):(console.log("鐢靛姩杞�"),e.getEleBikeList(),e.getEleSiteList())},fail:function(e){"getLocation:fail 棰戠箒璋冪敤浼氬鍔犵數閲忔崯鑰楋紝鍙�冭檻浣跨敤 wx.onLocationChange 鐩戝惉鍦扮悊浣嶇疆鍙樺寲"===e.errMsg&&t.showToast({title:"璇峰嬁棰戠箒瀹氫綅",icon:"none"}),"getLocation:fail auth deny"===e.errMsg&&t.showToast({title:"鏃犳硶瀹氫綅锛岃閲嶆柊鑾峰彇浣嶇疆淇℃伅",icon:"none"}),"getLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF"===e.errMsg&&t.showModal({content:"璇峰紑鍚墜鏈哄畾浣嶆湇鍔�",showCancel:!1})}})},toNavigation:function(){t.openLocation({longitude:parseFloat(this.info.longitude),latitude:parseFloat(this.info.latitude),scale:28,name:this.info.title,address:this.info.addr,success:function(t){console.log("success:",t)}})},clickcontrol:function(){var e=t.createMapContext("mapId",this);e.moveToLocation({complete:function(t){console.log("绉诲姩瀹屾垚:",t)}})},getEleSiteList:function(){var t=this;return(0,c.default)(i.default.mark((function e(){var n,o,c,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],e.next=3,t.$u.api.getEleBusinessArea({});case 3:return o=e.sent,200===o.code&&(c=JSON.parse(o.data),n.push({points:c.map((function(t){return{latitude:t.lat,longitude:t.lng}})),fillColor:"#0077FF12",strokeColor:"#0077FF",strokeWidth:3,zIndex:7})),e.next=7,t.$u.api.eleSiteList({});case 7:r=e.sent,200===r.code&&(r.data.forEach((function(t){var e=JSON.parse(t.electronicFence);t.electronicFence=e.map((function(t){return{latitude:t.lat,longitude:t.lng}}))})),t.eleBusinessArea=r.data.map((function(t){return{points:t.electronicFence,title:t.name,fillColor:"#0077FF4D",strokeColor:"#0077FF",strokeWidth:3,zIndex:7}})),t.eleBusinessArea.forEach((function(e){var n=t.calculatePolygonCenter(e.points),o=n.latitude,i=n.longitude,a=(0,s.distance)(t.latitude,t.longitude,o,i);t.markers.push({id:Math.floor(900*Math.random())+100,width:30,height:40,isShow:!1,title:e.title,distance:t.latitude&&t.longitude?a:"鏈煡璺濈",latitude:o,longitude:i,iconPath:"/static/icon/ic_park@2x.png",customCallout:{anchorY:0,anchorX:0,display:"BYCLICK"}})}))),t.eleBusinessArea=[].concat(n,(0,a.default)(t.eleBusinessArea));case 10:case"end":return e.stop()}}),e)})))()},calculatePolygonCenter:function(t){for(var e=0,n=0,o=t.length,i=0;i<o;i++)e+=t[i].latitude,n+=t[i].longitude;return{latitude:e/o,longitude:n/o}},getSite:function(){var t=this;this.$u.api.rentSiteList().then((function(e){200===e.code&&(t.markers=[],e.data.forEach((function(e,n){var o=(0,s.distance)(t.latitude,t.longitude,e.latitude,e.longitude);t.markers.push({id:n,width:40,height:40,isShow:!0,distance:t.latitude&&t.longitude?o:"鏈煡璺濈",latitude:e.latitude,longitude:e.longitude,title:e.name,iconPath:"/static/icon/ic_bike@2x.png",addr:e.addr,customCallout:{anchorY:0,anchorX:0,display:"BYCLICK"}})})))}))},markertap:function(t){var e=this;this.show=!1,this.markers.forEach((function(n){n.id===t.markerId?(e.rice=n.distance,n.customCallout.display="ALWAYS",n.isShow?(n.width=50,n.height=50):(n.width=40,n.height=50),setTimeout((function(){e.info=n,e.show=!0}),300)):(n.isShow?(n.width=40,n.height=40):(n.width=30,n.height=40),n.customCallout.display="BYCLICK")}))},navigation:function(e){t.openLocation({latitude:Number(e.latitude),longitude:Number(e.longitude),name:"娴嬭瘯鍚嶇О",address:"娴嬭瘯璇︾粏鍦板潃",success:function(){console.log("鎵撳紑鍦板浘瀵艰埅鎴愬姛")},fail:function(t){console.log("鎵撳紑鍦板浘瀵艰埅澶辫触",t)}})}}};e.default=f}).call(this,n(2)["default"])},195:function(t,e,n){"use strict";n.r(e);var o=n(196),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);e["default"]=i.a},196:function(t,e,n){}},[[188,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/maps/maps.js.map
\ No newline at end of file
--
Gitblit v1.9.3