登录添加未成功不可重复点击判断
This commit is contained in:
parent
041bcaf2ec
commit
e59e2d0fa4
@ -98,8 +98,11 @@ public class LoginActivity extends BaseActivity {
|
||||
Log.e("--短信发送res--", "短信发送成功");
|
||||
}
|
||||
if (CacheGroup.cacheList.get(LOGIN_RESULT) != null) {
|
||||
if (customDialog!=null&&customDialog.isShowing())
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
|
||||
btn_login.setEnabled(true);
|
||||
btn_login.setBackgroundResource(R.drawable.bg_btn);
|
||||
//存储登录记录
|
||||
loginBean = new Gson().fromJson(CacheGroup.cacheList.get(LOGIN_RESULT), LoginBean.class);
|
||||
Log.e("--登录信息--", new Gson().toJson(loginBean));
|
||||
@ -112,18 +115,25 @@ public class LoginActivity extends BaseActivity {
|
||||
// JPushInterface.setAlias(con, 0, loginBean.getData().getUname());
|
||||
appInfoBean.setStatus("0");
|
||||
appInfoBean.setUserPhone(String.valueOf(input_phone.getText()));
|
||||
ur.postAppInfo(appInfoBean,"post");
|
||||
ur.postAppInfo(appInfoBean, "post");
|
||||
UiAuxiliary.homeRequest("登录成功");
|
||||
finish();
|
||||
} else {
|
||||
appInfoBean.setStatus("1");
|
||||
appInfoBean.setUserPhone(String.valueOf(input_phone.getText()));
|
||||
ur.postAppInfo(appInfoBean,"post");
|
||||
ur.postAppInfo(appInfoBean, "post");
|
||||
Toast.makeText(con, loginBean.getMsg(), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
CacheGroup.cacheList.remove(LOGIN_RESULT);
|
||||
}
|
||||
break;
|
||||
|
||||
case RequsetCodeConstants.ERROR:
|
||||
if (customDialog != null && customDialog.isShowing())
|
||||
customDialog.dismiss();
|
||||
btn_login.setEnabled(true);
|
||||
btn_login.setBackgroundResource(R.drawable.bg_btn);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -238,6 +248,8 @@ public class LoginActivity extends BaseActivity {
|
||||
Log.e("--code--", code);
|
||||
if (judgeFormat(phone, code)) {
|
||||
if (key) {
|
||||
btn_login.setEnabled(false);
|
||||
btn_login.setBackgroundResource(R.drawable.bg_btn_gray);
|
||||
customDialog = new CustomDialog(con, "登陆中...");
|
||||
customDialog.show();
|
||||
LoginRegInputBean lb = new LoginRegInputBean();
|
||||
|
10
app/src/main/res/drawable/bg_btn_gray.xml
Normal file
10
app/src/main/res/drawable/bg_btn_gray.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#AAAAAA" />
|
||||
<corners android:topLeftRadius="@dimen/dp_29" android:topRightRadius="@dimen/dp_29"
|
||||
android:bottomLeftRadius="@dimen/dp_29" android:bottomRightRadius="@dimen/dp_29" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -26,10 +26,11 @@
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_marginTop="@dimen/dp_210"
|
||||
android:id="@+id/img"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/face_success"></ImageView>
|
||||
|
||||
<TextView
|
||||
|
Loading…
Reference in New Issue
Block a user