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.
 
 
 
 
high-mini/unpackage/dist/build/mp-weixin/pages/pay/payment/payment.js

1 lines
3.0 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/pay/payment/payment"],{"0cee":function(e,t,n){"use strict";n.r(t);var a=n("fdde"),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},"249f":function(e,t,n){"use strict";var a=n("456d"),o=n.n(a);o.a},"456d":function(e,t,n){},a4fe:function(e,t,n){"use strict";(function(e){n("eba6");a(n("66fd"));var t=a(n("fe49"));function a(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},a591: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=[]},fdde:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n("b528"),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":2==this.pryType?this.paytype="jinbi":this.paytype="",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.navigateTo({url:"../../goods/coupon-details/coupon-details?id="+item})}),100)},fail:function(t){e.hideLoading(),console.log("fail:"+JSON.stringify(t))}}):e.showToast({title:t.return_msg,icon:"none"})}))}else"jinbi"==this.paytype?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}}):e.showToast({title:"请选择支付方式",icon:"none",duration:2e3})}}};t.default=r}).call(this,n("543d")["default"])},fe49:function(e,t,n){"use strict";n.r(t);var a=n("a591"),o=n("0cee");for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n("249f");var i,u=n("f0c5"),d=Object(u["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],i);t["default"]=d.exports}},[["a4fe","common/runtime","common/vendor"]]]);