(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"137f":function(t,e,n){"use strict";n.r(e);var o=n("251a"),i=n("70d2");for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);n("8eed");var r=n("828b"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);e["default"]=c.exports},"251a":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return o}));var o={axBody:function(){return n.e("components/ax-body/ax-body").then(n.bind(null,"8839"))},appNavigation:function(){return Promise.all([n.e("common/vendor"),n.e("components/app-navigation/app-navigation")]).then(n.bind(null,"4b8e"))}},i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__get_style([t.StyleSheet])),o=t.banners.length,i=o>0?t.__map(t.banners,(function(e,n){var o=t.__get_orig(e),i=t.showImg(e.pic);return{$orig:o,m0:i}})):null,a=t.__map(t.list.data,(function(e,n){var o=t.__get_orig(e),i=e.params.nowPrice?e.params.nowPrice.toFixed(4):null;return{$orig:o,g1:i}}));t._isMounted||(t.e0=function(e){return t.$app.url.goto("/pages/search/search")},t.e1=function(e){t.scrollLock=!0},t.e2=function(e){t.scrollLock=!1},t.e3=function(e){return t.$app.url.goto("/pages/order/order")},t.e4=function(e){return t.$app.url.goto("/pages/coupon-buy/coupon-buy")},t.e5=function(e){return t.$app.url.goto("/pages/feedback/feedback")},t.e6=function(e){return t.$app.url.goto("/pages/map/map",!1)}),t.$mp.data=Object.assign({},{$root:{s0:n,g0:o,l0:i,l1:a}})},a=[]},"55fb":function(t,e,n){"use strict";(function(t,e){var o=n("47a9");n("2acb");o(n("3240"));var i=o(n("137f"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"6f38":function(t,e,n){},"70d2":function(t,e,n){"use strict";n.r(e);var o=n("a412"),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},"8eed":function(t,e,n){"use strict";var o=n("6f38"),i=n.n(o);i.a},a412:function(t,e,n){"use strict";(function(t){var o=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(n("7eb4")),a=o(n("34cf")),r=o(n("ee10")),c=n("b03f"),s={onLoad:function(t){var e=this;return(0,r.default)(i.default.mark((function n(){var o,a,r;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.queryPermit();case 2:o=n.sent,o.privacy?e.privacy.visible=!0:!0===o.location?e.updateLocation():!1===o.location?(e.location.visible=!0,e.updateLocation()):void 0===o.location&&e.updateLocation(),t.hasOwnProperty("q")&&t.q&&(a=decodeURIComponent(t.q),console.log("url:"+a),r=e.getQueryParams(a,"connectorCode"),console.log("device_no:"+r),r&&e.getDeviceInfo(r));case 5:case"end":return n.stop()}}),n)})))()},mounted:function(){this.setListHeight(),this.setAppNavigationHeight(),this.get_frimid(),this.get_userinfo()},data:function(){return{user_info:{},appNavigationHeight:0,scrollLock:!0,sorts:{index:0,data:[{name:"离我最近",code:"range"},{name:"空闲最多",code:"device"},{name:"电费最低",code:"price"}]},list:{height:0,data:[]},banners:[],location:{visible:!1,value:""},privacy:{visible:!1},city:{index:0,data:[{text:"贵阳",areaCode:"5201"},{text:"六盘水",areaCode:"5202"},{text:"遵义",areaCode:"5203"},{text:"安顺",areaCode:"5204"},{text:"毕节",areaCode:"5205"},{text:"铜仁",areaCode:"5206"},{text:"黔东南",areaCode:"5226"},{text:"黔南",areaCode:"5227"},{text:"黔西南",areaCode:"5223"}]},discountInfo:null}},onShow:function(){this.getBanners()},computed:{StyleSheet:function(){return{"--app-navigation-heiht":"".concat(this.appNavigationHeight,"px"),"--list-heiht":"".concat(this.list.height,"px")}}},onShareAppMessage:function(t){return"button"===t.from&&console.log(t.target),{title:"用券充天天都享会员价",path:"/pages/index/index",imageUrl:"../../static/img/share.jpg",desc:"用券充天天都享会员价"}},onShareTimeline:function(){return{title:"用券充天天都享会员价",path:"/pages/index/index",imageUrl:"../../static/img/share.jpg"}},methods:{get_userinfo:function(){var t=this;this.$api.base("post","/userApi/getUserAccount",{},{}).then((function(e){t.user_info=e.accountInfo,t.$app.storage.set("USER_INFO",e.accountInfo)}))},get_frimid:function(){var e=this;this.$app.storage.get("FRIM_ID")&&(this.$app.storage.get("USER_TOKEN")?this.$api.base("post","/userApi/add-firm-user?firmId="+parseInt(this.$app.storage.get("FRIM_ID")),{},{error:!1}).then((function(t){e.$app.popup.alert(t.msg),e.get_userinfo(),setTimeout((function(){e.$app.storage.remove("FRIM_ID")}),500)})).catch((function(t){e.$app.popup.alert(t.msg),setTimeout((function(){e.$app.storage.remove("FRIM_ID")}),500)})):t.showModal({title:"未登录",content:"你还未进行登录,请去登录",showCancel:!1,success:function(e){e.confirm&&t.navigateTo({url:"/pages/login/login"})}}))},getDeviceInfo:function(t){var e=this;this.$api.base("post","/chargeApi/checkDevicesBySn",{sn:t},{}).then((function(t){var n=t.device;0!=n.deviceStatus&&255!=n.deviceStatus&&e.$app.url.goto("/pages/terminal/terminal?deviceId="+n.id+"&deviceStatus="+n.deviceStatus)}))},getQueryParams:function(t,e){var n=t.split("?")[1]||"",o={},i=n.split("&");return i.forEach((function(t){var e=t.split("="),n=(0,a.default)(e,2),i=n[0],r=n[1];o[decodeURIComponent(i)]=decodeURIComponent(r||"")})),o[e]},showImg:function(t){return this.$config.url.request+t},customerService:function(){var t=this,e=this.$config.customerService;this.$app.act.customerService(e.id,e.url).catch((function(e){console.log(e),t.$app.popup.alert("客服中心失联啦,请联系管理员!")}))},queryPermit:function(){return new Promise((function(e,n){var o={},i=function(){2==Object.keys(o).length&&e(o)};t.getPrivacySetting?t.getPrivacySetting({success:function(t){o.privacy=t.needAuthorization},complete:function(){"boolean"!=typeof o.privacy&&"undefined"!=typeof o.privacy&&(o.privacy=null),i()}}):o.privacy=!1,t.getSetting({success:function(e){o.location=t.getLocation?e.authSetting["scope.userLocation"]:void 0},complete:function(){"boolean"!=typeof o.location&&"undefined"!=typeof o.location&&(o.location=null),i()}})}))},updateLocation:function(){var t=this;this.getLocation().then((function(e){return t.location.value=[e.longitude,e.latitude].join(","),t.getStations(e.longitude,e.latitude),t.$app.storage.set("USER_LOCATION",t.location.value),t.reverseGeocoder([e.latitude,e.longitude].join(","))}))},getLocation:function(){var e=this;return new Promise((function(n,o){t.getLocation?t.getLocation({success:function(t){return n(t)},fail:function(t){console.log(t),console.log("定位失败"),e.getStations("","")},complete:function(){}}):(console.log("微信版本太低,无定位接口可用"),n({longitude:"",latitude:""}))}))},reverseGeocoder:function(t){var e=this;console.log(t);var n=t.split(",")[0],o=t.split(",")[1],i=this.convertGcj02ToBd09(o,n);return t=i.lat+","+i.lng,console.log(t),new Promise((function(n,o){var i=new c.BMapWX({ak:"vtQgaPzonb3H4qeUOWGr53ePcNCsmdMj"});i.regeocoding({location:t,success:function(t){for(var n=t.originalData.result.addressComponent.adcode.substr(0,4),o=0;o