require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_user/user/pay"],{528:function(n,e,t){"use strict";(function(n,e){var o=t(4);t(26);o(t(25));var r=o(t(529));n.__webpack_require_UNI_MP_PLUGIN__=t,e(r.default)}).call(this,t(1)["default"],t(2)["createPage"])},529:function(n,e,t){"use strict";t.r(e);var o=t(530),r=t(532);for(var c in r)["default"].indexOf(c)<0&&function(n){t.d(e,n,(function(){return r[n]}))}(c);t(535);var a,i=t(34),s=Object(i["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],a);s.options.__file="pages_user/user/pay.vue",e["default"]=s.exports},530:function(n,e,t){"use strict";t.r(e);var o=t(531);t.d(e,"render",(function(){return o["render"]})),t.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(e,"components",(function(){return o["components"]}))},531:function(n,e,t){"use strict";var o;t.r(e),t.d(e,"render",(function(){return r})),t.d(e,"staticRenderFns",(function(){return a})),t.d(e,"recyclableRender",(function(){return c})),t.d(e,"components",(function(){return o}));var r=function(){var n=this,e=n.$createElement;n._self._c},c=!1,a=[];r._withStripped=!0},532:function(n,e,t){"use strict";t.r(e);var o=t(533),r=t.n(o);for(var c in o)["default"].indexOf(c)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(c);e["default"]=r.a},533:function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(534),r={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,o.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=r}).call(this,t(2)["default"])},535:function(n,e,t){"use strict";t.r(e);var o=t(536),r=t.n(o);for(var c in o)["default"].indexOf(c)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(c);e["default"]=r.a},536:function(n,e,t){}},[[528,"common/runtime","common/vendor","pages_user/common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages_user/user/pay.js.map