You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.6 KiB
1 lines
4.6 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["ChargingStation/pages/index/index"],{"1d2f":function(t,e,n){},"2eaf":function(t,e,n){"use strict";n.r(e);var a=n("de5d"),i=n("4399");for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);n("e6fe");var c=n("f0c5"),u=Object(c["a"])(i["default"],a["b"],a["c"],!1,null,"3b7f707a",null,!1,a["a"],void 0);e["default"]=u.exports},4399:function(t,e,n){"use strict";n.r(e);var a=n("6337"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},"4dd3":function(t,e,n){"use strict";(function(t,e){var a=n("4ea4");n("9773");a(n("66fd"));var i=a(n("2eaf"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(i.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},6337:function(t,e,n){"use strict";(function(t,a){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("2eee")),c=i(n("c973")),u=i(n("2303")),r={components:{skeleton:function(){n.e("ChargingStation/pages/index/skeleton").then(function(){return resolve(n("8164"))}.bind(null,n)).catch(n.oe)}},data:function(){return{user:t.getStorageSync("user"),guideTop:120,viewData:null,ChargingStationLabels:[{logo:n("e526"),title:"60度/小时"},{logo:n("65bf"),title:"24h内免费停车"},{logo:n("3aa8"),title:"24h营业"}]}},onLoad:function(t){t.data&&this.getDetails(JSON.parse(t.data))},methods:{goGuide:function(){t.navigateTo({url:"/ChargingStation/pages/guide/index?guideList=".concat(encodeURIComponent(JSON.stringify(this.viewData.guideList)))})},guideMove:function(t){this.guideTop=t.touches[0].clientY},navigation:function(){t.openLocation({latitude:this.viewData.stationLat,longitude:this.viewData.stationLng,success:function(){console.log("success")}})},collect:function(){var e=this,n=t.getStorageSync("location"),a=n.latitude,i=void 0===a?39.9:a,o=n.longitude,c=void 0===o?116.38:o,r=this.viewData,s=r.id,l=r.stationId;u.default[this.viewData.collected?"cancelCollect":"collectStation"]({xyStationId:s,stationId:l}).then((function(t){e.getDetails({id:s,stationLat:i,stationLng:c,tags:e.viewData["tags"]})}))},freeTell:function(){a.makePhoneCall({phoneNumber:"4008565355",success:function(){console.log("拨打电话成功!")},fail:function(){console.log("拨打电话失败!")}})},getDetails:function(e){var n=this;u.default.getSiteDetails(e).then((function(a){2e4==a.code?(n.viewData=a.data,n.viewData["tags"]=e["tags"],n.ChargingStationLabels[0].title="".concat(n.viewData.kilowattHour,"/KW"),n.ChargingStationLabels[1].title=n.viewData.parkFee,n.ChargingStationLabels[2].title=n.viewData.businessHours):42011==a.code&&t.showToast({title:"登陆后可查看",icon:"none",success:function(){setTimeout((function(){t.navigateBack()}),2e3)}})}))},scanCode:function(){var e=this;return(0,c.default)(o.default.mark((function n(){var a,i;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.user){n.next=3;break}return t.showModal({title:"提示",content:"登录后才可扫码下单哦",confirmText:"去登陆",success:function(e){e.confirm?t.reLaunch({url:"/pages/login/index"}):e.cancel}}),n.abrupt("return");case 3:return n.next=5,e.tool.scanCode();case 5:a=n.sent,a.result&&(i=e.tool.routingParameterGeneration({type:"qrCode",qrCode:encodeURIComponent(a.result),stationId:e.viewData.id}),t.navigateTo({url:"/ChargingStation/pages/placeOrder/index".concat(i)}));case 7:case"end":return n.stop()}}),n)})))()},goPeriodPrice:function(){t.navigateTo({url:"/ChargingStation/pages/periodPrice/index?priceList=".concat(JSON.stringify(this.viewData.priceList),"&now=").concat(this.viewData.currentTimeInterval)})},goChargingPorts:function(e){t.navigateTo({url:"/ChargingStation/pages/chargingPorts/index?equipmentType=".concat(e,"&id=").concat(this.viewData.id)})}}};e.default=r}).call(this,n("543d")["default"],n("bc2e")["default"])},de5d:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var a={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"e4f7"))}},i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.viewData?t.tool.getnum(t.viewData.distance):null),a=t.viewData?t.tool.getnum(t.viewData.totalFee,3):null,i=t.viewData?t.tool.getnum(t.viewData.originalTotalFee,3):null,o=t.viewData?t.tool.getnum(t.viewData.electricityFee,3):null,c=t.viewData?t.tool.getnum(t.viewData.serviceFee,3):null;t.$mp.data=Object.assign({},{$root:{g0:n,g1:a,g2:i,g3:o,g4:c}})},o=[]},e6fe:function(t,e,n){"use strict";var a=n("1d2f"),i=n.n(a);i.a}},[["4dd3","common/runtime","common/vendor"]]]); |