(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesMall/order/payment"],{"062b":function(e,t,n){"use strict";(function(e){var r=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n("7ca3")),a=n("8f59");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u={data:function(){return{loadEnd:!1,orderAmount:"",orderId:""}},onLoad:function(e){var t=this;this.orderAmount=e.money,this.orderId=e.id,this.$nextTick((function(){t.loadEnd=!0}))},computed:i({},(0,a.mapState)({themeColor:function(e){return e.app.themeColor}})),methods:{handlePayment:function(){var t=this;e.showLoading({title:"加载中",mask:!0}),this.$util.request("mall.preparePay",{order_id:this.orderId}).then((function(n){if(1==n.code){var r=n.data;e.requestPayment(i(i({provider:"wxpay"},r),{},{success:function(n){e.hideLoading(),"requestPayment:ok"==n.errMsg&&e.redirectTo({url:"/pagesMall/order/success?id="+t.orderId})},fail:function(){e.hideLoading(),e.showToast({title:"支付已取消",icon:"none",duration:1e3})}}))}else e.showToast({title:n.msg,icon:"none"})})).catch((function(e){console.error("获取支付参数",e)}))}}};t.default=u}).call(this,n("df3c")["default"])},"16a1":function(e,t,n){},2493:function(e,t,n){"use strict";n.r(t);var r=n("7176"),o=n("c849");for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);n("6045");var c=n("828b"),i=Object(c["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);t["default"]=i.exports},6045:function(e,t,n){"use strict";var r=n("16a1"),o=n.n(r);o.a},"66b3":function(e,t,n){"use strict";(function(e,t){var r=n("47a9");n("aa6c");r(n("3240"));var o=r(n("2493"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},7176:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){}));var r=function(){var e=this.$createElement;this._self._c},o=[]},c849:function(e,t,n){"use strict";n.r(t);var r=n("062b"),o=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=o.a}},[["66b3","common/runtime","common/vendor"]]]);