-
Notifications
You must be signed in to change notification settings - Fork 0
/
614b8988.7cdc4632.js
1 lines (1 loc) · 2.09 KB
/
614b8988.7cdc4632.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{93:function(e,t,a){"use strict";a.r(t);var n=a(0),s=a.n(n);class i extends s.a.Component{constructor(e){super(e),this.state={value:"",desenvolvimento:"",producao:""},this.handleChange=this.handleChange.bind(this),this.handleSubmit=this.handleSubmit.bind(this)}handleChange(e){this.setState({value:e.target.value})}handleSubmit(e){var t=this.state.value;if(null!==t&&""!==t){var a="<script type='text/javascript'>var s=document.createElement('script');s.type='text/javascript';var v=parseInt(Math.random()*1000000);s.src='https://sandbox.gerencianet.com.br/v1/cdn/"+t+"/'+v;s.async=false;s.id='"+t+"';if(!document.getElementById('"+t+"')){document.getElementsByTagName('head')[0].appendChild(s);};$gn={validForm:true,processed:false,done:{},ready:function(fn){$gn.done=fn;}};<\/script>",n="<script type='text/javascript'>var s=document.createElement('script');s.type='text/javascript';var v=parseInt(Math.random()*1000000);s.src='https://api.gerencianet.com.br/v1/cdn/"+t+"/'+v;s.async=false;s.id='"+t+"';if(!document.getElementById('"+t+"')){document.getElementsByTagName('head')[0].appendChild(s);};$gn={validForm:true,processed:false,done:{},ready:function(fn){$gn.done=fn;}};<\/script>",i=s.a.createElement("h2",null,"Desenvolvimento"),l=s.a.createElement("h2",null,"Produ\xe7\xe3o");this.updateContent(a,n,i,l)}else alert("Insira um identificador v\xe1lido");e.preventDefault(),console.log(t)}updateContent(e,t,a,n){this.setState({desenvolvimento:e}),this.setState({producao:t}),this.setState({hdesenvolvimento:a}),this.setState({hproducao:n})}render(){return s.a.createElement("div",null,s.a.createElement("form",{onSubmit:this.handleSubmit},s.a.createElement("label",null,s.a.createElement("input",{type:"text",placeholder:"Identificador da conta",className:"input_account",value:this.state.value,onChange:this.handleChange})),s.a.createElement("input",{type:"submit",className:"button1",value:"Gerar"})),s.a.createElement("div",null,this.state.hdesenvolvimento,this.state.desenvolvimento,s.a.createElement("hr",null),this.state.hproducao,this.state.producao))}}t.default=i}}]);