add validcode2mail
This commit is contained in:
@@ -2,9 +2,18 @@
|
|||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.login-form button {
|
.login-form input {
|
||||||
min-width: 100px;
|
width: 8rem;
|
||||||
}
|
}
|
||||||
|
.login-form button {
|
||||||
|
width: 6rem;
|
||||||
|
}
|
||||||
|
.login-type {
|
||||||
|
display: inline-block;
|
||||||
|
width: 6rem;
|
||||||
|
margin: 0 .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.reply-form {
|
.reply-form {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export class LoginForm extends Component {
|
|||||||
this.input_token_ref=React.createRef();
|
this.input_token_ref=React.createRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
do_sendcode() {
|
do_sendcode(api_name) {
|
||||||
if(this.state.loading_status==='loading')
|
if(this.state.loading_status==='loading')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ export class LoginForm extends Component {
|
|||||||
'×tamp='+(+new Date());
|
'×tamp='+(+new Date());
|
||||||
|
|
||||||
fetch(
|
fetch(
|
||||||
PKUHELPER_ROOT+'isop_proxy/validcode?'+param+
|
PKUHELPER_ROOT+'isop_proxy/'+api_name+'?'+param+
|
||||||
'&msg='+md5(param+ISOP_APPCODE),
|
'&msg='+md5(param+ISOP_APPCODE),
|
||||||
)
|
)
|
||||||
.then(get_json)
|
.then(get_json)
|
||||||
@@ -222,16 +222,21 @@ export class LoginForm extends Component {
|
|||||||
</p>
|
</p>
|
||||||
</div> :
|
</div> :
|
||||||
<div>
|
<div>
|
||||||
<p>登录后可以发树洞、回复、关注树洞</p>
|
<p>接收验证码来登录 PKU Helper</p>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
学号
|
学号
|
||||||
<input ref={this.username_ref} type="tel" />
|
<input ref={this.username_ref} type="tel" />
|
||||||
</label>
|
</label>
|
||||||
<button type="button" disabled={this.state.loading_status==='loading'}
|
<span className="login-type">
|
||||||
onClick={(e)=>this.do_sendcode()}>
|
<a onClick={(e)=>this.do_sendcode('validcode')}>
|
||||||
发送验证码
|
短信
|
||||||
</button>
|
</a>
|
||||||
|
/
|
||||||
|
<a onClick={(e)=>this.do_sendcode('validcode2mail')}>
|
||||||
|
邮件
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ button, .button {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
margin: 0 .5em;
|
margin: 0 .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover, .button:hover {
|
button:hover, .button:hover {
|
||||||
|
|||||||
Reference in New Issue
Block a user