From cda14bb92e39a2e1d82d876fda90c13970a3c1ca Mon Sep 17 00:00:00 2001 From: snoop Date: Thu, 25 May 2017 17:57:10 +0900 Subject: [PATCH] move container --- src/ts/containers/member/regist.tsx | 194 ++++++++++++++-------------- 1 file changed, 99 insertions(+), 95 deletions(-) diff --git a/src/ts/containers/member/regist.tsx b/src/ts/containers/member/regist.tsx index b175942..3c2e185 100644 --- a/src/ts/containers/member/regist.tsx +++ b/src/ts/containers/member/regist.tsx @@ -54,7 +54,7 @@ const muiTheme = getMuiTheme({ }, }); -export class MemberRegist extends React.Component { +export class MemberRegist extends React.Component { constructor(props: any, context: any) { super(props, context); @@ -64,15 +64,15 @@ export class MemberRegist extends React.Component { open: false, value: 1, - email:"", - name:"", - company:"", - phone:"", - pw:"", + email: "", + name: "", + company: "", + phone: "", + pw: "", }; } - handleChange = () => this.setState({ }); + handleChange = () => this.setState({}); private emailInput: any; @@ -89,48 +89,52 @@ export class MemberRegist extends React.Component { } handleSignUp = () => { - + let output: string; let obj: any; //new object declaration - obj = {"email":this.state.email, - "pwSalt":this.state.pw, - "name":this.state.name, - "company":this.state.company, - "phone":this.state.phone}; + obj = { + "email": this.state.email, + "pwSalt": this.state.pw, + "name": this.state.name, + "company": this.state.company, + "phone": this.state.phone + }; -output = JSON.stringify(obj); + output = JSON.stringify(obj); -obj = {"value":output}; + obj = { "value": output }; -fetch('http://192.168.1.209:8080/v1/example/echo', { - method: 'POST', - headers: { - 'Accept': 'application/json', - // mode: 'no-cors' - }, - body: JSON.stringify(obj) -}).then(function (response) { - return response.json(); -}).then(function (json) { - console.log(json); -}).catch((err) => { + fetch('http://192.168.1.209:8080/v1/example/echo', { + method: 'POST', + headers: { + 'Accept': 'application/json', + // mode: 'no-cors' + }, + body: JSON.stringify(obj) + }).then(function (response) { + return response.json(); + }).then(function (json) { + console.log(json); + ReactDOM.render(, document.getElementById('example') + ); + }).catch((err) => { console.log(err); -}); - + }); + } - -handleResultContainer = () => { - ReactDOM.render( - , - document.getElementById('example') -); -} + + handleResultContainer = () => { + ReactDOM.render( + , + document.getElementById('example') + ); + } btnTouchTap = () => { @@ -141,70 +145,70 @@ handleResultContainer = () => { return ( - -
- Get started with Overflow -
- this.setState({ email: newValue})} - /> -
- this.setState({ name: newValue})} - - /> -
- + Get started with Overflow +
+ this.setState({ email: newValue })} + /> +
+ this.setState({ name: newValue })} + + /> +
+ + this.setState({ company: newValue})} - /> -
+ hintText="Loafle" + floatingLabelText="Company*" + style={styles.textfield} + underlineShow={true} + value={this.state.company} + onChange={(e, newValue) => this.setState({ company: newValue })} + /> +
- this.setState({ phone: newValue})} - /> -
+ this.setState({ phone: newValue })} + /> +
- this.setState({ pw: newValue})} - /> -
+ this.setState({ pw: newValue })} + /> +
+ + + + +
- - - - -
); }