(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/site-more/site-more"],{4065:function(e,t,n){"use strict";n.r(t);var i=n("781f"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=a.a},"49bb":function(e,t,n){},"5c28":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var i={axBody:function(){return n.e("components/ax-body/ax-body").then(n.bind(null,"8839"))},axIosIndicator:function(){return n.e("components/ax-ios-indicator/ax-ios-indicator").then(n.bind(null,"2348"))}},a=function(){var e=this,t=e.$createElement,n=(e._self._c,e.getStatusNum(1)),i=e.getStatusNum(2),a=e.getStatusNum(0),r=e.another?e.__map(e.deviceList,(function(t,n){var i=e.__get_orig(t),a=e.getSatesObj(t),r=e.getSatesObj(t),o=e.getdeviceTypeName(t.eType);return{$orig:i,m3:a,m4:r,m5:o}})):null,o=e.another?null:e.__map(e.prices.data,(function(t,n){var i=e.__get_orig(t),a=e.getPriceLable(t.timeType),r=null===e.user_info.firmId||0===e.$app.storage.get("USER_INFO").firmType,o=r?t.price.toFixed(4):null,c=r?null:t.firmPrice.toFixed(4),s=r?null:t.price.toFixed(4);return{$orig:i,m6:a,g0:r,g1:o,g2:c,g3:s}}));e._isMounted||(e.e0=function(t){e.another=!e.another}),e.$mp.data=Object.assign({},{$root:{m0:n,m1:i,m2:a,l0:r,l1:o}})},r=[]},"781f":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={onLoad:function(e){this.another=!Boolean(e.show),this.getStationsInfo(e.stationId)},mounted:function(){var t=this;this.$app.act.selectorQuery(this,"#switch,#underside",!0).then((function(n){var i=n.find((function(e){return"switch"==e.id})),a=n.find((function(e){return"underside"==e.id})),r=e.getWindowInfo();t.listHeight=r.windowHeight-i.top-i.height-a.height}))},data:function(){return{user_info:this.$app.storage.get("USER_INFO"),another:!1,listHeight:0,prices:{index:0,data:[]},stationInfo:{},deviceList:[],nowPriceTime:{}}},methods:{getStationsInfo:function(e){var t=this;e&&this.$api.base("post","/chargeApi/getStationsInfo",{stationId:e},{}).then((function(e){t.deviceList=e.devices,t.prices.data=e.prices,t.nowPriceTime=e.nowPriceTime,t.stationInfo=e.stationInfo;for(var n=0;n<t.prices.data.length;n++)if(t.nowPriceTime.id==t.prices.data[n].id){t.prices.index=n;break}}))},getStatusNum:function(e){for(var t=0,n=0;n<this.deviceList.length;n++){var i=this.deviceList[n];2!=e||2!=i.deviceStatus&&3!=i.deviceStatus&&4!=i.deviceStatus?i.deviceStatus==e&&t++:t++}return t},getSatesObj:function(e){var t={};return 2==e.deviceStatus||4==e.deviceStatus?t={name:"占用",color:"blue"}:3==e.deviceStatus?t={name:"充电中",color:"orange"}:0==e.deviceStatus?t={name:"离线",color:"grey"}:1==e.deviceStatus?t={name:"空闲",color:"green"}:255==e.deviceStatus&&(t={name:"故障",color:"err"}),t},getdeviceTypeName:function(e){var t="";switch(e){case"1":t="直流设备";break;case"2":t="交流设备";break;case"3":t="交直流一体设备";break;case"4":t="无线设备";break;case"5":t="其他";break}return t},getPriceLable:function(e){var t="";switch(e){case 1:t="谷";break;case 2:t="平";break;case 3:t="峰";break}return t},settitle:function(t){e.setNavigationBarTitle({title:t})},goTerminal:function(e){0!=e.deviceStatus&&255!=e.deviceStatus&&this.$app.url.goto("/pages/terminal/terminal?deviceId="+e.id+"&deviceStatus="+e.deviceStatus)},sacn:function(){var e=this;this.$app.act.scan().then((function(t){var n=e.getUrlParams(t.result);n&&n.connectorCode?e.getDeviceInfo(n.connectorCode):e.$app.popup.alert("二维码不正确。","温馨提示！")}))},getUrlParams:function(e){var t,n=/[?&]+([^=&]+)=([^&]*)/gi,i={};while(t=n.exec(e))i[t[1]]=t[2];return i},getDeviceInfo:function(e){var t=this;this.$api.base("post","/chargeApi/checkDevicesBySn",{sn:e},{}).then((function(e){console.log("设备信息：",e),t.goTerminal(e.device)}))}}};t.default=n}).call(this,n("df3c")["default"])},af84:function(e,t,n){"use strict";n.r(t);var i=n("5c28"),a=n("4065");for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);n("b10a");var o=n("828b"),c=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"6c6f6c5c",null,!1,i["a"],void 0);t["default"]=c.exports},b10a:function(e,t,n){"use strict";var i=n("49bb"),a=n.n(i);a.a},c1b3:function(e,t,n){"use strict";(function(e,t){var i=n("47a9");n("2acb");i(n("3240"));var a=i(n("af84"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["c1b3","common/runtime","common/vendor"]]]);