(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-money-pay"],{"1ba6":function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){}));var n=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)},i=[]},"2c20":function(e,t,a){var n=a("aab9");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=a("4f06").default;i("525b82f6",n,!0,{sourceMap:!1,shadowMode:!1})},"33ff":function(e,t,a){"use strict";var n=a("2c20"),i=a.n(n);i.a},"5adf":function(e,t,a){"use strict";a("7a82");var n=a("dbce").default;Object.defineProperty(t,"__esModule",{value:!0}),t.computedOrderkey=function(e){return(0,i.default)({url:"/api/order/computed/"+e.orderkey,method:"post",data:e})},t.confirm=function(e){return(0,i.default)({url:"/api/order/confirm",method:"post",data:e})},t.couponsOrder=function(e,t,a){return(0,i.default)({url:"/api/coupons/order/"+t+"/"+a,method:"get",data:e})},t.createOrderkey=function(e,t){return(0,i.default)({url:"/api/order/create/"+t,method:"post",data:e})},t.express_query=function(e){return(0,i.default)({url:"/api/order/express_query",method:"get",data:e})},t.getCouponsList=function(e,t){return(0,i.default)({url:"/api/coupons/user/"+t,method:"get",data:e})},t.orderCancel=function(e){return(0,i.default)({url:"/api/order/cancel",method:"post",data:e})},t.orderDel=function(e){return(0,i.default)({url:"/api/order/del",method:"get",data:e})},t.orderDetail=function(e,t){return(0,i.default)({url:"/api/order/detail/"+t,method:"get",data:e})},t.orderList=function(e){return(0,i.default)({url:"/api/order/list",method:"get",data:e})},t.orderPay=function(e){return(0,i.default)({url:"/api/order/pay",method:"post",data:e})},t.orderTake=function(e){return(0,i.default)({url:"/api/order/take",method:"post",data:e})},t.order_comment=function(e){return(0,i.default)({url:"/api/order/comment",method:"post",data:e})},t.product=function(e){return(0,i.default)({url:"/api/order/product",method:"post",data:e})},t.refund=function(e){return(0,i.default)({url:"/api/order/refund/verify",method:"post",data:e})},t.refundReason=function(e){return(0,i.default)({url:"/api/order/refund/reason",method:"get",data:e})},t.upload=function(e){return(0,i.upFilse)({url:"/api/upload/image",method:"post",data:e})};var i=n(a("4f3d"))},a5d4:function(e,t,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(a("c7eb")),o=n(a("1da1")),r=n(a("5530")),d=a("c1eb"),u=a("5adf"),c=a("26cb"),s={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,c.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,u.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,d.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,u.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;console.log(a,"支付打印");var 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,o.default)((0,i.default)().mark((function e(){var t;return(0,i.default)().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