1 |
- webpackJsonp([4],{"76IH":function(t,a,e){"use strict";var s=e("Dd8w"),o=e.n(s),r=e("YMWp"),n=e("vUxp"),i=e("NYxO"),m=e("mtWM"),l=e.n(m),c={components:{Amount:r.a,SelectGame:n.a},data:function(){return{selectGame:"",paymoeny:"0.00",discount:0,formData:{game_id:"",username:"",amount:0,paypass:""},reta:{gm_rmb_rate:"",ptb_rmb_rate:"",agent_rate:"",sub_agent_rate:""}}},props:{setusername:{default:"",type:String}},watch:{setusername:{immediate:!0,handler:function(t){this.formData.username=t}}},created:function(){var t=this;l.a.post("/money/rate").then(function(a){200===a.data.code&&(t.reta.gm_rmb_rate=a.data.data.gm_rmb_rate,t.reta.ptb_rmb_rate=a.data.data.ptb_rmb_rate)})},methods:{change_amount:function(){return this.formData.amount?this.formData.game_id?(this.paymoeny=this.formData.amount/this.reta.gm_rmb_rate*this.reta.ptb_rmb_rate*this.reta.agent_rate||"0",void(this.paymoeny=(this.paymoeny+0).toFixed(2))):(this.paymoeny=(this.formData.amount/this.reta.gm_rmb_rate*this.reta.ptb_rmb_rate).toFixed(2),!1):(this.formData.amount=0,this.paymoeny="0.00",!1)},change_game:function(t){var a=this.myGamelist.list.filter(function(a){return a.game_id===t})[0];this.formData.game_id=a.game_id,this.reta.agent_rate=a.agent_rate,this.reta.sub_agent_rate=a.sub_agent_rate,this.discount=a.agent_rate,this.change_amount()},pay:function(){var t=this;l.a.post("/pay/charge_for_mem",this.formData).then(function(a){200===a.data.code?(t.showNotify("成功",a.data.msg),t.formData.game_id="",t.formData.username="",t.selectGame="",t.discount=0,t.formData.amount=0,t.formData.paypass="",t.paymoeny="0.00"):t.showNotify("失败",a.data.msg,"error")})}},computed:o()({},Object(i.c)(["myGamelist"]))},u={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"form"},[t.myGamelist?e("div",{staticClass:"form_item "},[e("label",{staticClass:"form_label"},[t._v("游戏名称:")]),t._v(" "),e("div",{staticClass:"form_control"},[e("el-select",{attrs:{placeholder:"请选择要充值的游戏"},on:{change:t.change_game},model:{value:t.selectGame,callback:function(a){t.selectGame=a},expression:"selectGame"}},t._l(t.myGamelist.list,function(a,s){return"H5"!==a.classify_label?e("el-option",{key:s,attrs:{label:a.gamename,value:a.game_id}},[e("span",{staticStyle:{float:"left"}},[t._v(t._s(a.gamename)+"-"+t._s(a.classify_label))])]):t._e()}))],1)]):t._e(),t._v(" "),e("div",{staticClass:"form_item "},[e("label",{staticClass:"form_label"},[t._v("玩家账号:")]),t._v(" "),e("div",{staticClass:"form_control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.formData.username,expression:"formData.username"}],staticClass:"form_input",attrs:{autocomplete:"off",type:"text",placeholder:"请输入玩家账号"},domProps:{value:t.formData.username},on:{input:function(a){a.target.composing||t.$set(t.formData,"username",a.target.value)}}})])]),t._v(" "),e("div",{staticClass:"form_item"},[e("label",{staticClass:"form_label"},[t._v("充值金额:")]),t._v(" "),e("div",{staticClass:"form_control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.formData.amount,expression:"formData.amount"}],staticClass:"form_input larger",attrs:{autocomplete:"off",type:"number",min:"1",placeholder:"请输入充值金额"},domProps:{value:t.formData.amount},on:{input:[function(a){a.target.composing||t.$set(t.formData,"amount",a.target.value)},t.change_amount]}}),t._v(" "),e("span",{staticClass:"form_word"},[t._v("游戏币")])])]),t._v(" "),e("div",{staticClass:"form_item"},[e("label",{staticClass:"form_label"},[t._v("我的折扣:")]),t._v(" "),e("div",{staticClass:"form_control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.discount,expression:"discount"}],staticClass:"form_input",attrs:{autocomplete:"off",disabled:"",type:"text"},domProps:{value:t.discount},on:{input:function(a){a.target.composing||(t.discount=a.target.value)}}})])]),t._v(" "),e("div",{staticClass:"form_item"},[e("label",{staticClass:"form_label"},[t._v("支付金额:")]),t._v(" "),e("div",{staticClass:"form_control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.paymoeny,expression:"paymoeny"}],staticClass:"form_input\n larger lightgray",attrs:{autocomplete:"off",type:"text",placeholder:"0.00",disabled:""},domProps:{value:t.paymoeny},on:{input:function(a){a.target.composing||(t.paymoeny=a.target.value)}}}),t._v(" "),e("span",{staticClass:"form_word"},[t._v("平台币")])])]),t._v(" "),e("div",{staticClass:"form_item"},[e("label",{staticClass:"form_label"},[t._v("支付密码:")]),t._v(" "),e("div",{staticClass:"form_control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.formData.paypass,expression:"formData.paypass"}],staticClass:"form_input",attrs:{autocomplete:"off",type:"password",placeholder:"请输入支付密码"},domProps:{value:t.formData.paypass},on:{input:function(a){a.target.composing||t.$set(t.formData,"paypass",a.target.value)}}})])]),t._v(" "),e("div",{staticClass:"form_item"},[e("div",{staticClass:"form_control"},[e("button",{staticClass:"btn btn-lg btn-primary btn-resubmit",attrs:{type:"button"},on:{click:t.pay}},[t._v("立即支付")])])])])},staticRenderFns:[]};var _=e("VU/8")(c,u,!1,function(t){e("MYMc")},null,null);a.a=_.exports},MYMc:function(t,a){},i4Fw:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var s=e("YMWp"),o=e("76IH"),r={components:{Amount:s.a,aidpayform:o.a},data:function(){return{}},beforeDestroy:function(){},created:function(){},methods:{},computed:{}},n={render:function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"panel"},[a("amount",{attrs:{pay:1,withdraw:1}}),this._v(" "),a("div",{staticClass:"aidformBox"},[a("aidpayform")],1)],1)},staticRenderFns:[]};var i=e("VU/8")(r,n,!1,function(t){e("uDPe")},null,null);a.default=i.exports},uDPe:function(t,a){}});
|