(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesM/pages/order_pay"],{"0264":function(e,t,r){"use strict";r.r(t);var n=r("bb9c"),a=r("8782");for(var o in a)"default"!==o&&function(e){r.d(t,e,(function(){return a[e]}))}(o);r("9eba");var u,i=r("f0c5"),c=Object(i["a"])(a["default"],n["b"],n["c"],!1,null,"38c85c5e",null,!1,n["a"],u);t["default"]=c.exports},"653f":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r("a34a"));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r,n,a,o,u){try{var i=e[o](u),c=i.value}catch(s){return void r(s)}i.done?t(c):Promise.resolve(c).then(n,a)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var u=e.apply(t,r);function i(e){o(u,n,a,i,c,"next",e)}function c(e){o(u,n,a,i,c,"throw",e)}i(void 0)}))}}var i=function(){r.e("pagesM/comps/dt_empty").then(function(){return resolve(r("fe70"))}.bind(null,r)).catch(r.oe)},c={components:{DtEmpty:i},data:function(){return{orderSns:[],prePayOrder:{},waitShow:!1,payFlag:""}},computed:{footSafe:function(){return"padding-bottom:".concat(this.safeAreaBottom,"px")}},methods:{wxappGo:function(){var e=this;return u(n.default.mark((function t(){var r,a;return n.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,r={},r._isShowLoading=!0,r._isReject=!0,r.orderSns=e.orderSns,r.memberId=e.$auth.getMemberId(),t.next=8,e.$api.wxappGo(r);case 8:a=t.sent,e.emptyType=0,e.prePayOrder=a,e.waitShow=!0,t.next=18;break;case 14:t.prev=14,t.t0=t["catch"](0),e.emptyType=0,e.$dialog.alert({content:t.t0.errmsg||"暂无数据~"});case 18:case"end":return t.stop()}}),t,null,[[0,14]])})))()},payOrder:function(){var t=this;return u(n.default.mark((function r(){var a,o,u,i,c,s,d;return n.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:if(!t.prePayOrder.expireDate){r.next=6;break}if(a=t.$util.createDate(t.prePayOrder.expireDate).getTime(),o=(new Date).getTime(),!(o>=a)){r.next=6;break}return t.$dialog.alert({content:"支付已经过期,请重新购买",confirmText:"我知道了",success:function(t){console.log(t),t.confirm&&e.navigateBack({delta:1})}}),r.abrupt("return");case 6:return u={},u.orderSns=t.prePayOrder.orderSns,r.next=10,t.$api.wxappUnifiedOrder(u);case 10:return i=r.sent,c=i.tradeNo,r.next=14,t.$api.wxPay(i.payData);case 14:s=r.sent,console.log(s),d={amount:t.prePayOrder.amount,tradeNo:c,orderSns:t.prePayOrder.orderSns[0],payFlag:t.payFlag},"requestPayment:ok"==s.errMsg?(t.$util.refreshPage(["pages/mine","pages/mine_order_list"]),d.state=1,e.redirectTo({url:"/pagesM/pages/pay_success?"+t.$util.serialize(d)})):(d.state=0,e.redirectTo({url:"/pagesM/pages/pay_success?"+t.$util.serialize(d)}));case 18:case"end":return r.stop()}}),r)})))()},onLoadPage:function(e){wx.hideShareMenu(),this.orderSns=e.orderSns?JSON.parse(e.orderSns):[],this.payFlag=e.payFlag,this.wxappGo()}}};t.default=c}).call(this,r("543d")["default"])},8782:function(e,t,r){"use strict";r.r(t);var n=r("653f"),a=r.n(n);for(var o in n)"default"!==o&&function(e){r.d(t,e,(function(){return n[e]}))}(o);t["default"]=a.a},"9d95":function(e,t,r){"use strict";(function(e){r("4518");n(r("66fd"));var t=n(r("0264"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,r("543d")["createPage"])},"9eba":function(e,t,r){"use strict";var n=r("ef61"),a=r.n(n);a.a},bb9c:function(e,t,r){"use strict";var n;r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return n}));var a=function(){var e=this,t=e.$createElement;e._self._c},o=[]},ef61:function(e,t,r){}},[["9d95","common/runtime","common/vendor"]]]);