require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_user/user/pay"],{"0d64":function(n,e,t){"use strict";t.r(e);var a=t("a357"),o=t.n(a);for(var c in a)["default"].indexOf(c)<0&&function(n){t.d(e,n,(function(){return a[n]}))}(c);e["default"]=o.a},a357:function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t("0c26"),o={data:function(){return{companyUserId:null,companyId:null,desc:"",money:null,wxPay:!0}},onLoad:function(n){this.companyId=n.companyId,this.companyUserId=n.companyUserId},onShareAppMessage:function(n){return{title:"御君方-收款",path:"/pages_user/user/pay?companyId="+this.companyId+"&companyUserId="+this.companyUserId}},methods:{testMoney:function(n){var e=this,t=n.detail.value;0==t.indexOf(".")&&(t=t.replace(/[^$#$]/g,"0."),t=t.replace(/\.{2,}/g,".")),t=t.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.money=t}))},pay:function(){var e=this;null!=this.money?n.login({success:function(n){console.log(n),e.payment(n.code)}}):n.showToast({icon:"none",title:"请输入支付金额"})},payment:function(e){var t={payMoney:this.money,remark:this.desc,code:e,companyId:this.companyId,companyUserId:this.companyUserId};n.showLoading(),(0,a.payment)(t).then((function(e){if(200==e.code){console.log(e);var t=JSON.parse(e.result);n.requestPayment({provider:"wxpay",timeStamp:t.timeStamp,nonceStr:t.nonceStr,package:t.package,signType:t.signType,paySign:t.paySign,success:function(e){n.hideLoading(),n.redirectTo({url:"./success"})},fail:function(e){n.showToast({icon:"none",title:"fail:"+JSON.stringify(e)}),console.log("fail:"+JSON.stringify(e)),n.hideLoading()}})}else n.showToast({icon:"none",title:e.msg})}),(function(n){}))}}};e.default=o}).call(this,t("df3c")["default"])},ac23:function(n,e,t){"use strict";t.r(e);var a=t("c28b"),o=t("0d64");for(var c in o)["default"].indexOf(c)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(c);t("f078");var i=t("828b"),s=Object(i["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=s.exports},aec0:function(n,e,t){"use strict";(function(n,e){var a=t("47a9");t("584a");a(t("3240"));var o=a(t("ac23"));n.__webpack_require_UNI_MP_PLUGIN__=t,e(o.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])},c28b:function(n,e,t){"use strict";t.d(e,"b",(function(){return a})),t.d(e,"c",(function(){return o})),t.d(e,"a",(function(){}));var a=function(){var n=this.$createElement;this._self._c},o=[]},d507:function(n,e,t){},f078:function(n,e,t){"use strict";var a=t("d507"),o=t.n(a);o.a}},[["aec0","common/runtime","common/vendor","pages_user/common/vendor"]]]);