chunk-589741dd.7aed9967.js 3.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-589741dd"],{"566b":function(e,t,a){},b44c:function(e,t,a){"use strict";a.r(t);var n,c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("van-nav-bar",{attrs:{title:"充值","left-arrow":"",fixed:!0,placeholder:!0},on:{"click-left":e.prev}}),a("van-field",{attrs:{readonly:"",clickable:"",label:"充值方式",value:e.payment,placeholder:"选择充值方式"},on:{click:function(t){e.showPicker=!0}}}),a("van-popup",{attrs:{round:"",position:"bottom"},model:{value:e.showPicker,callback:function(t){e.showPicker=t},expression:"showPicker"}},[a("van-picker",{attrs:{"show-toolbar":"",columns:e.columns},on:{cancel:function(t){e.showPicker=!1},confirm:e.onConfirm}})],1),a("van-field",{attrs:{type:"number",label:"充值金额",placeholder:"0.00"},model:{value:e.price,callback:function(t){e.price=t},expression:"price"}}),a("div",{staticClass:"btn"},[a("van-button",{attrs:{type:"danger",block:"",round:""},on:{click:e.doSubmit}},[e._v("提交")])],1)],1)},i=[],o=(a("b0c0"),a("ac1f"),a("5319"),a("e7e5"),a("d399")),r=a("ade3"),s=(a("480b"),a("a37c")),l=(a("66b9"),a("b650")),u=(a("8a58"),a("e41f")),p=(a("5f5f"),a("f253")),b=(a("be7f"),a("565f")),d=(a("5246"),a("6b41")),f={name:"Rechange",components:(n={},Object(r["a"])(n,d["a"].name,d["a"]),Object(r["a"])(n,b["a"].name,b["a"]),Object(r["a"])(n,p["a"].name,p["a"]),Object(r["a"])(n,u["a"].name,u["a"]),Object(r["a"])(n,l["a"].name,l["a"]),Object(r["a"])(n,s["a"].name,s["a"]),n),data:function(){return{payment:"",price:"",showPicker:!1,columns:["微信支付"],orderBtnFlag:!1}},created:function(){this.$tools.isWeiXin()||this.columns.push("支付宝")},methods:{prev:function(){this.$tools.prev()},onConfirm:function(e){this.payment=e,this.showPicker=!1},doSubmit:function(){var e=this;return 0==this.payment.length?(Object(o["a"])("请选择充值方式"),!1):this.price<=0?(Object(o["a"])("请填写充值金额"),!1):!this.orderBtnFlag&&(this.orderBtnFlag=!0,o["a"].loading({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),void this.$http.paymentWallet({payment:"微信支付"==this.payment?"wechat":"alipay",source:this.$tools.isWeiXin()?2:1,price:this.price}).then((function(t){o["a"].clear(),t.status?e.resultOrderData(t.data):Object(o["a"])(t.info),e.orderBtnFlag=!1})).catch((function(t){e.orderBtnFlag=!1,Object(o["a"])("连接网络出错,请稍后在试。")})))},resultOrderData:function(e){switch(e.pay+""){case"1":this.$wx.config(e.result.config);var t=e.result.options,a=this;t.success=function(){Object(o["a"])("支付成功"),setTimeout((function(){a.$router.replace("/ucenter/bill/fund")}),1500)},this.$wx.chooseWXPay(t);break;case"2":this.$storage.set("pay_type","2"),location.href=e.result.url+"&redirect_url="+location.origin+"/ucenter/bill/fund";break;case"3":this.$storage.set("pay_type","3");var n=document.createElement("div");n.innerHTML=e.result,document.body.appendChild(n),document.forms.alipaysubmit.submit();break;case"99":Object(o["a"])(e.msg);break}}}},h=f,m=(a("ebfa"),a("2877")),v=Object(m["a"])(h,c,i,!1,null,"0d53c232",null);t["default"]=v.exports},ebfa:function(e,t,a){"use strict";var n=a("566b"),c=a.n(n);c.a}}]);