You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
2.8 KiB
1 lines
2.8 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/pay/payment/payment"],{"673a":function(e,t,n){"use strict";var a=n("e18e"),o=n.n(a);o.a},"9a34":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("524d"),o=getApp(),r={data:function(){return{amount:0,orderName:"",pryType:"",paytype:"",orderNo:"",user:""}},onLoad:function(t){var n=this;this.pryType=t.paytype,this.orderNo=t.orderId,this.user=o.globalData.userInfo,1==this.pryType?this.paytype="wxpay":this.paytype="jinbi",this.amount=parseFloat(t.amount).toFixed(2),e.getStorage({key:"paymentOrder",success:function(t){t.data.length>1?n.orderName="多商品合并支付":n.orderName=t.data[0].name,e.removeStorage({key:"paymentOrder"})}})},methods:{orderToPay:function(){var t=this;if("wxpay"==this.paytype){e.showLoading({title:"支付中..."});var n={orderId:this.orderNo,openId:o.globalData.openId,orderScene:"GOODS_ORDER"};(0,a.orderToPay)(n).then((function(t){"000000"==t.return_code?e.requestPayment({appId:t.return_data.appId,nonceStr:t.return_data.nonceStr,package:t.return_data.package,paySign:t.return_data.sign,signType:"MD5",timeStamp:t.return_data.timeStamp,success:function(t){e.hideLoading(),e.showToast({title:"支付成功"}),setTimeout((function(){e.navigateBack({})}),100)},fail:function(t){e.hideLoading(),console.log("fail:"+JSON.stringify(t))}}):e.showToast({title:t.return_msg,icon:"none"})}))}else e.showModal({title:"金币支付",content:"确认是否用金币支付?",success:function(n){if(n.confirm){e.showLoading({title:"支付中..."});var o={orderId:t.orderNo};(0,a.orderToGoldPay)(o).then((function(t){"000000"==t.return_code?(e.hideLoading(),e.showToast({title:"支付成功"}),setTimeout((function(){e.navigateBack({})}),100)):e.showToast({title:t.return_msg,icon:"none"})}))}else n.cancel}})}}};t.default=r}).call(this,n("543d")["default"])},b716:function(e,t,n){"use strict";var a;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return a}));var o=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.paytype="jinbi"},e.e1=function(t){e.paytype="wxpay"})},r=[]},bcac:function(e,t,n){"use strict";n.r(t);var a=n("9a34"),o=n.n(a);for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);t["default"]=o.a},c7e4:function(e,t,n){"use strict";n.r(t);var a=n("b716"),o=n("bcac");for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n("673a");var i,u=n("f0c5"),c=Object(u["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],i);t["default"]=c.exports},ce97:function(e,t,n){"use strict";(function(e){n("185d");a(n("66fd"));var t=a(n("c7e4"));function a(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},e18e:function(e,t,n){}},[["ce97","common/runtime","common/vendor"]]]); |