terminal.js 5.2 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["subPackages/charging/terminal/terminal"],{"3d51":function(e,n,t){"use strict";t.r(n);var o=t("d259"),i=t("60e9");for(var c in i)["default"].indexOf(c)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(c);t("ccd9");var s=t("828b"),a=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,"7c319c48",null,!1,o["a"],void 0);n["default"]=a.exports},"52d0":function(e,n,t){},"60e9":function(e,n,t){"use strict";t.r(n);var o=t("9388"),i=t.n(o);for(var c in o)["default"].indexOf(c)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(c);n["default"]=i.a},"6dc2":function(e,n,t){"use strict";(function(e,n){var o=t("47a9");t("6a42");o(t("3240"));var i=o(t("3d51"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(i.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])},9388:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o={onLoad:function(e){console.log("参数信息:",e),this.deviceId=e.deviceId,this.deviceStatus=e.deviceStatus},onShow:function(){this.queryInChange(this.deviceId,this.deviceStatus),this.userInfo=this.$app.storage.get(this.$config.keyname.userInfo),console.log(this.userInfo,"获取到的用户信息")},mounted:function(){var e=this;setTimeout((function(){null!=e.payment_msg&&e.$refs.filter.open()}),500)},data:function(){return{payment_msg:null,deviceId:0,deviceStatus:0,visit:"",personal:1,isEc:!1,nowPriceTime:{},deviceInfo:{},accountInfo:{balance:0},userInfo:{},stationInfo:{},orderInfo:{},checkNum:0,ecInfo:{},discountInfo:null,selectedImg:"https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/AwQTRxpEMqOG50293e26d86888b3e0f7324c429d2019.png/1.png",defaultImg:"https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/SPh1u3KAqte830a107b2e3c5033b1d1027516d84d780.png/1.png"}},methods:{queryInChange:function(e,n){3!=n&&4!=n||(this.visit=!0),this.getDeviceInfo(e),this.checkedStartStatus()},getDeviceInfo:function(e){var n=this;this.$api.base("get","/applet/v1/station/connector/detail",{connectorCode:e},{}).then((function(e){n.deviceInfo=e.data,n.nowPriceTime=e.nowPriceTime,n.stationInfo=e.stationInfo,e.discountInfo&&(n.discountInfo=e.discountInfo),1==n.deviceInfo.tipsStatus&&n.$app.popup.alert(n.deviceInfo.tipsContent,"温馨提示")}))},changeAccount:function(e){this.personal!=e&&(this.personal=e,this.getAccountInfo())},getCurrEcPrice:function(){if(!this.nowPriceTime)return 0;var e=this.nowPriceTime.price;if(this.ecInfo&&this.ecInfo.ecDiscount){var n=this.nowPriceTime.servicePrice;this.stationInfo.contractServicePrice&&(n=this.stationInfo.contractServicePrice),e=this.nowPriceTime.electrovalence+n+this.nowPriceTime.addServicePrice*this.ecInfo.ecDiscount/100}return console.log("dddd",e),e&&(e=e.toFixed(2)),Number(e).toFixed(4)},getVolt:function(){if(!this.deviceInfo.power)return 0;var e=this.deviceInfo.power/this.deviceInfo.current*1e3;return e},startup:function(){var e=this;if(!this.visit)return this.deviceInfo.availableBalance<=3?this.$app.popup.confirm("无法启动充电,抵扣余量需大于3元,请先购买充电券!","温馨提示!",{confirmText:"立即购券"}).then((function(n){n&&e.$app.url.goto("/subPackages/coupon/coupon-buy/coupon-buy",!0)})):void this.get_subMessage();this.$app.popup.alert("该充电枪被占用或存在异常,请重新尝试或更换其他充电枪。","温馨提示")},get_subMessage:function(){this.startChangeAndOrder()},gotoCouponBuy:function(){this.$app.url.goto("/subPackages/coupon/coupon-buy/coupon-buy",!0)},startChangeAndOrder:function(){var e=this,n={orderType:this.deviceInfo.isFirmUser?1:0,equipmentId:this.deviceInfo.equipmentId,stationId:this.deviceInfo.stationId,couponId:null,connectorId:this.deviceInfo.connectorCode};this.$api.base("post","/applet/v1/charge/invokeCharge",n,{}).then((function(n){console.log(n,"返回数据"),e.orderInfo=n.data,"00000"==n.code?e.$app.url.goto("/subPackages/charging/charging/charging?chargeOrderNo="+n.data.chargeOrderNo+"&deviceId="+e.deviceInfo.id,!1):e.$app.popup.alert(n.msg,"温馨提示")}))}}};n.default=o},ccd9:function(e,n,t){"use strict";var o=t("52d0"),i=t.n(o);i.a},d259:function(e,n,t){"use strict";t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return c})),t.d(n,"a",(function(){return o}));var o={axBody:function(){return t.e("components/ax-body/ax-body").then(t.bind(null,"e199"))},axIosIndicator:function(){return t.e("components/ax-ios-indicator/ax-ios-indicator").then(t.bind(null,"6075"))},axPopup:function(){return t.e("components/ax-popup/ax-popup").then(t.bind(null,"49c3"))}},i=function(){var e=this,n=e.$createElement,t=(e._self._c,1!=e.personal?e.getCurrEcPrice():null),o=e.discountInfo&&1==e.personal&&e.discountInfo.discount?parseFloat(e.discountInfo.discount).toFixed(4):null,i=null!=e.payment_msg?(e.payment_msg.maspAmount+e.payment_msg.maspRealAmount).toFixed(2):null;e._isMounted||(e.e0=function(n){return e.$app.url.goto("/subPackages/charging/site-more/site-more?show=1&stationId="+e.stationInfo.id)},e.e1=function(n){return e.$refs.filter.close()},e.e2=function(n){return e.$app.url.goto("/subPackages/coupon/coupon-buy/coupon-buy")}),e.$mp.data=Object.assign({},{$root:{m0:t,g0:o,g1:i}})},c=[]}},[["6dc2","common/runtime","common/vendor"]]]);