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
3.0 KiB
1 lines
3.0 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/pay/payment/payment"],{"673a":function(t,e,n){"use strict";var a=n("e18e"),o=n.n(a);o.a},"9a34":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n("524d"),o=getApp(),r={data:function(){return{amount:0,orderName:"",pryType:"",paytype:"",orderNo:"",user:""}},onLoad:function(e){var n=this;this.pryType=e.paytype,this.orderNo=e.orderId,this.user=o.globalData.userInfo,1==this.pryType?this.paytype="wxpay":2==this.pryType?this.paytype="jinbi":this.paytype="",this.amount=parseFloat(e.amount).toFixed(2),t.getStorage({key:"paymentOrder",success:function(e){e.data.length>1?n.orderName="多商品合并支付":n.orderName=e.data[0].name,t.removeStorage({key:"paymentOrder"})}})},methods:{orderToPay:function(){var e=this;if("wxpay"==this.paytype){t.showLoading({title:"支付中..."});var n={orderId:this.orderNo,openId:o.globalData.openId,orderScene:"GOODS_ORDER"};(0,a.orderToPay)(n).then((function(e){"000000"==e.return_code?t.requestPayment({appId:e.return_data.appId,nonceStr:e.return_data.nonceStr,package:e.return_data.package,paySign:e.return_data.sign,signType:"MD5",timeStamp:e.return_data.timeStamp,success:function(e){t.hideLoading(),t.showToast({title:"支付成功"}),setTimeout((function(){t.navigateBack({})}),100)},fail:function(e){t.hideLoading(),console.log("fail:"+JSON.stringify(e))}}):t.showToast({title:e.return_msg,icon:"none"})}))}else"jinbi"==this.paytype?t.showModal({title:"金币支付",content:"确认是否用金币支付?",success:function(n){if(n.confirm){t.showLoading({title:"支付中..."});var o={orderId:e.orderNo};(0,a.orderToGoldPay)(o).then((function(e){"000000"==e.return_code?(t.hideLoading(),t.showToast({title:"支付成功"}),setTimeout((function(){t.navigateBack({})}),100)):t.showToast({title:e.return_msg,icon:"none"})}))}else n.cancel}}):t.showToast({title:"请选择支付方式",icon:"none",duration:2e3})}}};e.default=r}).call(this,n("543d")["default"])},bcac:function(t,e,n){"use strict";n.r(e);var a=n("9a34"),o=n.n(a);for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=o.a},c7e4:function(t,e,n){"use strict";n.r(e);var a=n("cda54"),o=n("bcac");for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(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);e["default"]=c.exports},cda54:function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return a}));var o=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.paytype="jinbi"},t.e1=function(e){t.paytype="wxpay"})},r=[]},ce97:function(t,e,n){"use strict";(function(t){n("185d");a(n("66fd"));var e=a(n("c7e4"));function a(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},e18e:function(t,e,n){}},[["ce97","common/runtime","common/vendor"]]]); |