(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-money-pay"],{2935:function(e,t,a){"use strict";var n;a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return n}));var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{staticClass:"app"},[a("v-uni-view",{staticClass:"price-box"},[a("v-uni-text",[e._v("支付金额")]),a("v-uni-text",{staticClass:"price"},[e._v(e._s(e.money))])],1),a("v-uni-view",{staticClass:"pay-type-list"},[a("v-uni-view",{staticClass:"type-item b-b",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.changePayType(1)}}},[a("v-uni-text",{staticClass:"icon iconfont iconweixin"}),a("v-uni-view",{staticClass:"con"},[a("v-uni-text",{staticClass:"tit"},[e._v("微信支付")]),a("v-uni-text",[e._v("推荐使用微信支付")])],1),a("v-uni-label",{staticClass:"radio"},[a("v-uni-radio",{attrs:{value:"",color:"#5dbc7c",checked:1==e.payType}})],1)],1),a("v-uni-view",{staticClass:"type-item",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.changePayType(3)}}},[a("v-uni-text",{staticClass:"icon iconfont iconyue"}),a("v-uni-view",{staticClass:"con"},[a("v-uni-text",{staticClass:"tit"},[e._v("余额支付")]),a("v-uni-text",[e._v("可用余额 ¥"+e._s(e.now_money))])],1),a("v-uni-label",{staticClass:"radio"},[a("v-uni-radio",{attrs:{value:"",color:"#5dbc7c",checked:3==e.payType}})],1)],1)],1),a("v-uni-text",{staticClass:"mix-btn",class:{clickbg:e.payLoding},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),!e.payLoding&&e.confirm()}}},[e._v("确认支付")])],1)},r=[]},"46b0":function(e,t,a){"use strict";var n=a("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("96cf");var i=n(a("1da1")),r=n(a("5530")),o=a("eb45"),d=a("ef20"),u=a("26cb"),c={data:function(){return{payType:1,payName:"weixin",orderInfo:{},money:0,now_money:0,orderKey:"",orderId:"",payLoding:!1,type:"",froms:"",pinkid:""}},computed:(0,r.default)({},(0,u.mapState)(["weichatObj"])),onLoad:function(e){var t=this;if(1==e.type)this.type=1,this.orderId=e.ordid,this.money=e.money;else{this.orderKey=e.key;var a=this.$api.prePage();(0,d.computedOrderkey)({orderkey:this.orderKey,couponId:a.couponChecked.id,addressId:a.addressData.id,useIntegral:a.checkedPoints?1:0}).then((function(e){var a=e.data;t.money=a.result.pay_price}))}e.pinkid&&(this.pinkid=e.pinkid),(0,o.balance)({}).then((function(e){var a=e.data;t.now_money=a.now_money}))},methods:{changePayType:function(e){this.payType=e,1==this.payType&&(this.payName="weixin"),2==this.payType&&(this.payName="ali"),3==this.payType&&(this.payName="yue")},orderMoneyPay:function(){var e=this;(0,d.orderPay)({uni:e.orderId,from:e.froms?"weixin":"H5",paytype:e.payName}).then((function(t){if("yue"==e.payName&&"SUCCESS"==t.data.status&&(200==t.status?e.paySuccessTo():e.$api.msg(msg)),"weixin"==e.payName||"routine"==e.payName){var a=t.data.result.jsConfig,n={timestamp:a.timestamp,nonceStr:a.nonceStr,package:a.package,signType:a.signType,paySign:a.paySign,success:function(t){e.paySuccessTo()},fail:function(){uni.navigateTo({url:"/pages/order/order?state=0"})}};"weixin"==e.payName&&e.weichatObj.chooseWXPay(n)}uni.hideLoading(),e.payLoding=!1})).catch((function(t){uni.hideLoading(),e.payLoding=!1,console.log(t)}))},paySuccessTo:function(){uni.hideLoading(),uni.redirectTo({url:"/pages/money/paySuccess?orderid="+this.orderId})},confirm:function(){var e=(0,i.default)(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this,uni.showLoading({title:"支付中",mask:!0}),!("yue"==t.payName&&+t.now_money