chunk-25849407.9b7d06bd.js 5.7 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-25849407"],{"64e8":function(t,i,e){"use strict";e.r(i);var c=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"rechargeBox"},[e("div",{staticClass:"payment-top acea-row row-column row-center-wrapper"},[e("span",{staticClass:"name"},[t._v("我的余额")]),e("div",{staticClass:"pic"},[t._v("\n ¥"),e("span",{staticClass:"pic-font"},[t._v(t._s(t.now_money||0))])])]),e("div",{staticClass:"recharge"},[e("div",{staticClass:"nav acea-row row-around row-middle"},t._l(t.navRecharge,(function(i,c){return e("div",{key:c,staticClass:"item",class:t.active===c?"on":"",on:{click:function(i){return t.navRecharges(c)}}},[t._v("\n "+t._s(i)+"\n ")])})),0),e("div",{staticClass:"info-wrapper"},[t.active?e("div",[e("div",{staticClass:"money"},[e("span",[t._v("¥")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.money,expression:"money"}],attrs:{type:"number",placeholder:"0.00"},domProps:{value:t.money},on:{input:function(i){i.target.composing||(t.money=i.target.value)}}})]),e("div",{staticClass:"tip-box"},[e("span",{staticClass:"tip"},[t._v("提示:")]),e("div",{staticClass:"tip-samll"},[t._v("\n 当前可转入佣金:\n "),e("span",{staticClass:"font-color"},[t._v("¥"+t._s(t.userInfo.commissionCount||0))])])])]):t._e(),t.active?t._e():e("div",{staticClass:"picList acea-row row-between mt-20"},[t._l(t.picList,(function(i,c){return e("div",{key:c,staticClass:"pic-box pic-box-color acea-row row-center-wrapper row-column",class:t.activePic==c?"pic-box-color-active":"",on:{click:function(e){return t.picCharge(c,i)}}},[e("div",{staticClass:"pic-number-pic"},[t._v("\n "+t._s(i.price)),e("span",{staticClass:"pic-number"},[t._v(" 元")])]),e("div",{staticClass:"pic-number"},[t._v("赠送:"+t._s(i.give_money)+" 元")])])})),e("div",{staticClass:"pic-box pic-box-color acea-row row-center-wrapper",class:t.activePic==t.picList.length?"pic-box-color-active":"",on:{click:function(i){return t.picCharge(t.picList.length)}}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.money,expression:"money"}],staticClass:"pic-box-money pic-number-pic",class:t.activePic==t.picList.length?"pic-box-color-active":"",attrs:{type:"number",placeholder:"其他"},domProps:{value:t.money},on:{input:function(i){i.target.composing||(t.money=i.target.value)}}})])],2),e("div",{staticClass:"acea-row row-column"},[e("div",{staticClass:"tip mt-30"},[t._v("注意事项:")]),t._l(t.rechargeAttention,(function(i){return e("div",{key:i,staticClass:"tip-samll"},[t._v("\n "+t._s(i)+"\n ")])}))],2),e("div",{staticClass:"pay-btn bg-color-red",on:{click:t.recharge}},[t._v("\n "+t._s(t.active?"立即转入":"立即充值")+"\n ")])])])])},a=[],n=(e("f548"),e("163d"),e("08c1")),o=e("74f9"),s=e("ed08"),r=e("c24f"),l=e("9fd0"),u={name:"Recharge",props:{},data:function(){return{navRecharge:["账户充值","佣金导入"],active:0,payType:["weixin"],from:Object(s["d"])()?"weixin":"weixinh5",money:"",now_money:"",picList:[],activePic:0,numberPic:"",rechar_id:0,rechargeAttention:[]}},computed:Object(n["b"])(["userInfo"]),mounted:function(){this.now_money=this.userInfo.now_money,this.getRecharge()},methods:{getRecharge:function(){var t=this;Object(r["x"])().then((function(i){t.picList=i.data.recharge_quota,t.picList[0]&&(t.rechar_id=t.picList[0].id,t.numberPic=t.picList[0].price),t.rechargeAttention=i.data.recharge_attention||[]})).catch((function(i){t.$dialog.toast({mes:i})}))},picCharge:function(t,i){this.activePic=t,void 0===i?(this.rechar_id=0,this.numberPic=""):(this.money="",this.rechar_id=i.id,this.numberPic=i.price)},navRecharges:function(t){this.active=t,this.rechar_id=this.picList[0].id,this.numberPic=this.picList[0].price,this.activePic=0,this.money=""},recharge:function(){var t=this,i=this,e=Number(this.money);if(i.active){if(0===e)return i.$dialog.toast({mes:"请输入您要转入的金额"});if(e<.01)return i.$dialog.toast({mes:"转入金额不能低于0.01"});if(e>this.userInfo.commissionCount)return i.$dialog.toast({mes:"转入金额不能大于可提现佣金"});this.$dialog.confirm({mes:"转入余额无法在转出,请确认转入",title:"转入余额",opts:[{txt:"确认",color:!1,callback:function(){Object(r["R"])({price:e,from:i.from,type:1}).then((function(t){return i.now_money=Object(l["a"])(e,parseInt(i.now_money)),i.userInfo.commissionCount=Object(l["c"])(i.userInfo.commissionCount,e),i.money="",i.$dialog.toast({mes:t.msg})})).catch((function(t){i.$dialog.toast({mes:t.msg})}))}},{txt:"取消",color:!1,callback:function(){return i.$dialog.toast({mes:"已取消"})}}]})}else{if(this.picList.length==this.activePic&&0===e)return i.$dialog.toast({mes:"请输入您要充值的金额"});if(this.picList.length==this.activePic&&e<.01)return i.$dialog.toast({mes:"充值金额不能低于0.01"});Object(r["R"])({price:0==i.rechar_id?i.money:i.numberPic,from:i.from,rechar_id:i.rechar_id}).then((function(c){var a=c.data;"weixinh5"==a.type?(location.replace(a.data.mweb_url),t.$dialog.confirm({mes:"充值余额",opts:[{txt:"已充值",color:!1,callback:function(){i.$router.replace({path:"/user/account"})}},{txt:"查看余额",color:!1,callback:function(){i.$router.replace({path:"/user/account"})}}]})):Object(o["pay"])(a.data).finally((function(){i.now_money=Object(l["a"])(e,parseInt(i.userInfo.now_money)),i.$dialog.toast({mes:"支付成功"})})).catch((function(){i.$dialog.toast({mes:"支付失败"})}))})).catch((function(t){i.$dialog.toast({mes:t.msg})}))}}}},m=u,p=(e("c773"),e("623f")),d=Object(p["a"])(m,c,a,!1,null,"29d7515d",null);i["default"]=d.exports},8832:function(t,i,e){},c773:function(t,i,e){"use strict";var c=e("8832"),a=e.n(c);a.a}}]);
  2. //# sourceMappingURL=chunk-25849407.9b7d06bd.js.map