1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/coupon-buy/coupon-buy"],{"16ba":function(e,n,o){"use strict";(function(e,n){var t=o("47a9");o("2acb");t(o("3240"));var r=t(o("e12b"));e.__webpack_require_UNI_MP_PLUGIN__=o,n(r.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"32f6":function(e,n,o){},bae2:function(e,n,o){"use strict";o.r(n);var t=o("eefc"),r=o.n(t);for(var i in t)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return t[e]}))}(i);n["default"]=r.a},c529:function(e,n,o){"use strict";var t=o("32f6"),r=o.n(t);r.a},e12b:function(e,n,o){"use strict";o.r(n);var t=o("f3de"),r=o("bae2");for(var i in r)["default"].indexOf(i)<0&&function(e){o.d(n,e,(function(){return r[e]}))}(i);o("c529");var a=o("828b"),u=Object(a["a"])(r["default"],t["b"],t["c"],!1,null,"5df87c71",null,!1,t["a"],void 0);n["default"]=u.exports},eefc:function(e,n,o){"use strict";(function(e){var t=o("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;t(o("516c"));var r={data:function(){return{userinfo:{},select_num:null,payment:null,order_info:null,order_status:[],coupons:{index:-1,data:[]}}},onShow:function(){this.getMyAccount(),this.getLevel(),this.select_orderstatus(),this.get_orderPayment()},onLoad:function(e){this.payment=e.payment},methods:{getLevel:function(){var e=this;this.$api.base("post","/orderApi/getReChargeLevel",{},{}).then((function(n){e.coupons.data=n.levels}))},choose:function(e,n){if(null!=this.order_info){var o=(this.order_info.maspAmount+this.order_info.maspRealAmount+3).toFixed(2);if(o>e.levelMoney)return void this.$app.popup.toast("购买金额必须大于".concat(o,"元"))}this.coupons.index=this.coupons.index!=n?n:-1,this.select_num=e.levelMoney},pay:function(){var n=this;this.userinfo.phone?this.order_status.length>0?this.$app.popup.confirm("您当前有正在进行中的订单,请结束订单后再进行充值并重新发起操作","提示",{showCancel:!0,confirmText:"查看订单"}).then((function(e){e&&n.$app.url.goto("/pages/order/order?index=1")})):this.$api.base("post","/orderApi/addOrder",{levelId:this.coupons.data[this.coupons.index].id},{}).then((function(o){o.orderId&&n.$api.base("post","/orderApi/payOrder",{orderId:o.orderId},{}).then((function(o){var t=JSON.parse(o.wx.wx.pay_info);e.requestPayment({provider:"wxpay",timeStamp:t.timeStamp,nonceStr:t.nonceStr,package:t.package,signType:t.signType,paySign:t.paySign,success:function(e){console.log("success:",e),n.$app.popup.alert("支付成功","温馨提示",{showCancel:!1}).then((function(){n.$app.url.back()}))},fail:function(e){console.log("fail:",e)}})}))})):this.$app.url.goto("/pages/login/login")},select_orderstatus:function(){var e=this;this.$api.base("post","/chargeApi/queryOrderList",{type:1},{}).then((function(n){e.order_status=n.table.rows}))},get_orderPayment:function(){var e=this;this.$api.base("post","/chargeApi/queryOrderList-arrearage",{},{}).then((function(n){e.order_info=n.data}))},topage_order:function(){this.$app.url.goto("/pages/order-detail/order-detail?orderId="+this.order_info.id)},getMyAccount:function(){var e=this;this.$api.base("post","/userApi/getUserAccount",{},{}).then((function(n){e.userinfo=n.accountInfo}))}}};n.default=r}).call(this,o("df3c")["default"])},f3de:function(e,n,o){"use strict";o.d(n,"b",(function(){return r})),o.d(n,"c",(function(){return i})),o.d(n,"a",(function(){return t}));var t={axBody:function(){return o.e("components/ax-body/ax-body").then(o.bind(null,"8839"))},axIosIndicator:function(){return o.e("components/ax-ios-indicator/ax-ios-indicator").then(o.bind(null,"2348"))}},r=function(){var e=this,n=e.$createElement,o=(e._self._c,null!=e.order_info&&1===e.order_info.maspStatus?(e.order_info.maspAmount+e.order_info.maspRealAmount).toFixed(2)||"0.00":null),t=null!=e.order_info&&1===e.order_info.maspStatus?(3+(e.order_info.maspAmount+e.order_info.maspRealAmount)).toFixed(2)||"0.00":null,r=null!=e.order_info&&1===e.order_info.maspStatus?(e.order_info.maspAmount+e.order_info.maspRealAmount).toFixed(2)||"0.00":null,i=(3+(e.order_info.maspAmount+e.order_info.maspRealAmount)).toFixed(2),a=null!=e.order_info&&e.coupons.index>=0?(e.order_info.maspAmount+e.order_info.maspRealAmount).toFixed(2):null,u=null!=e.order_info&&e.coupons.index>=0?(e.select_num-(e.order_info.maspAmount+e.order_info.maspRealAmount)).toFixed(2):null;e.$mp.data=Object.assign({},{$root:{g0:o,g1:t,g2:r,g3:i,g4:a,g5:u}})},i=[]}},[["16ba","common/runtime","common/vendor"]]]);
|