(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-money-pay"],{1121: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("3978"),d=a("408d"),u=a("2f62"),c={data:function(){return{payType:3,payName:"yue",orderInfo:{},money:0,now_money:0,orderKey:"",orderId:"",payLoding:!1,type:"",froms:"",pinkid:"",shipping_type:0}},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();this.shipping_type=+e.addresstype+1,uni.showLoading({title:"数据载入...",mask:!0}),(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;uni.hideLoading(),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