order-detail.js 3.2 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order-detail/order-detail"],{"0f40":function(o,e,r){"use strict";(function(o,e){var n=r("47a9");r("6a42");n(r("3240"));var t=n(r("d68a"));o.__webpack_require_UNI_MP_PLUGIN__=r,e(t.default)}).call(this,r("3223")["default"],r("df3c")["createPage"])},"574f":function(o,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={onLoad:function(o){console.log("启动充值页面的参数:",o),this.getOrderInfo(o.chargeOrderNo)},data:function(){return{orderInfo:{id:1},deviceInfo:{}}},methods:{getStopType:function(){var o="用户主动终止";return this.orderInfo.stopType&&(1==this.orderInfo.stopType?o="用户主动终止":2==this.orderInfo.stopType&&(o="充电桩主动终止")),o},clcaServicePrice:function(){var o=this.orderInfo.realCost-this.orderInfo.thirdPartyElecfee;return this.orderInfo.discountMoney&&(o+=this.orderInfo.discountMoney),o?o.toFixed(4):"0.0000"},getOrderInfo:function(o){var e=this;this.$api.base("get","/applet/v1/charge/queryOrder/".concat(o),{},{}).then((function(o){console.log("订单详情:",o),e.orderInfo=o.data}))},splitTime:function(o,e){if(o)return o.split(" ")[e]},formatDuration:function(o){if(!o||o<0)return"0分钟";var e=Math.floor(o/3600),r=Math.floor(o%3600/60);return e>0?"".concat(e,"小时").concat(r,"分钟"):"".concat(r,"分钟")},getOrderStatus:function(o){var e="";switch(o){case 0:e="待启动";break;case 1:e="充电中";break;case 2:e="结算中";break;case 3:e="已完成";break;case 5:e="未成功充电";break}return e}}};e.default=n},6341:function(o,e,r){},7833:function(o,e,r){"use strict";r.r(e);var n=r("574f"),t=r.n(n);for(var a in n)["default"].indexOf(a)<0&&function(o){r.d(e,o,(function(){return n[o]}))}(a);e["default"]=t.a},"7d28":function(o,e,r){"use strict";r.d(e,"b",(function(){return t})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var n={axBody:function(){return r.e("components/ax-body/ax-body").then(r.bind(null,"e199"))}},t=function(){var o=this,e=o.$createElement,r=(o._self._c,o.getStopType()),n=0!=o.orderInfo.maspStatus&&1===o.orderInfo.maspStatus?(o.orderInfo.maspAmount+o.orderInfo.maspRealAmount).toFixed(2)||"0":null,t=0!=o.orderInfo.maspStatus&&1!==o.orderInfo.maspStatus&&2===o.orderInfo.maspStatus?(o.orderInfo.maspAmount+o.orderInfo.maspRealAmount).toFixed(2):null,a=o.getOrderStatus(o.orderInfo.status),u=o.formatDuration(o.orderInfo.chargeTime)||"--",c=o.orderInfo.discountMoney&&o.orderInfo.discountMoney?o.orderInfo.discountMoney.toFixed(4):null,i=o.orderInfo.firmPrice&&o.orderInfo.firmPrice?o.orderInfo.firmPrice.toFixed(4):null,f=o.orderInfo.couponPrice&&o.orderInfo.couponPrice?o.orderInfo.couponPrice.toFixed(4):null;o._isMounted||(o.e0=function(e){return o.$app.url.goto("/pages/coupon-buy/coupon-buy")}),o.$mp.data=Object.assign({},{$root:{m0:r,g0:n,g1:t,m1:a,m2:u,g2:c,g3:i,g4:f}})},a=[]},d68a:function(o,e,r){"use strict";r.r(e);var n=r("7d28"),t=r("7833");for(var a in t)["default"].indexOf(a)<0&&function(o){r.d(e,o,(function(){return t[o]}))}(a);r("ecc4");var u=r("828b"),c=Object(u["a"])(t["default"],n["b"],n["c"],!1,null,"1feb7208",null,!1,n["a"],void 0);e["default"]=c.exports},ecc4:function(o,e,r){"use strict";var n=r("6341"),t=r.n(n);t.a}},[["0f40","common/runtime","common/vendor"]]]);