RestClient.builder()
.url(Api.URL_ReREGISTER)
.params("studentNo",ed_studentNo.getText().toString())
.params("userName",ed_userName.getText().toString())
.params("password",ed_password.getText().toString())
.params("phone",ed_phone.getText().toString())
.params("mail",ed_mail.getText().toString())
.success(new ISuccess() {
@Override
public void onSuccess(String response) {
JSONObject jsonObject = JSON.parseObject(response);
int code = jsonObject.getInteger("code");
if (code == 0){
Toast.makeText(RegisterClass.this,
"注冊成功",Toast.LENGTH_SHORT).show();
Intent intent = new Intent(RegisterClass.this,LoginActivity.class);
startActivity(intent);
}else {
Toast.makeText(RegisterClass.this,
"用戶已存在",Toast.LENGTH_SHORT).show();
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/156584.html
標籤:Android
上一篇:jwplayer播放器播放rtmp實時流,延時越來越大
下一篇:海外服務器怎么開通微信支付
