Esempio n. 1
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
   setContentViewRes(R.layout.activity_login_layout);
   setViews();
 }
Esempio n. 2
0
 @Override
 protected void handleJson(int reqeustCode, String jsonString, String message) {
   // TODO Auto-generated method stub
   super.handleJson(reqeustCode, jsonString, message);
   switch (reqeustCode) {
     case 0:
       cookieHandler.sendEmptyMessageDelayed(0, 200);
       showToast("登录成功");
       bean = LogicPerson.parseLogin(jsonString);
       userShare.SaveFlag(true);
       userShare.SaveActivity(false);
       userShare.SaveLoginAccount(mPhone);
       userShare.SavePhone(etPhone.getText().toString().trim());
       userShare.SavePwd(etPwd.getText().toString().trim());
       userShare.SavePhone(bean.getPhone());
       userShare.SaveId(bean.getUser_id());
       userShare.SaveName(bean.getUser_name());
       userShare.SaveOpenFlag(bean.getOpenflag());
       userShare.SaveBuyPwd(bean.getTrade_pwd());
       userShare.SaveToken(bean.getToken());
       userShare.SaveRealname(bean.getRealname());
       userShare.SaveIdcard(bean.getIdcard());
       userShare.SaveTradeacco(bean.getTradeacco());
       this.finish();
       // requestUserInfo();
       break;
     case 1:
       break;
   }
 }
Esempio n. 3
0
 @Override
 protected void doClickAction(int viewId) {
   // TODO Auto-generated method stub
   super.doClickAction(viewId);
   Intent intent;
   switch (viewId) {
     case R.id.title_iv_left:
       this.finish();
       AnimUtil.pushRightInAndOut(LoginActivity.this);
       break;
     case R.id.activity_login_bt_register:
       intent = new Intent(this, RegisterSecondActivity.class);
       startActivity(intent);
       AnimUtil.pushLeftInAndOut(LoginActivity.this);
       break;
     case R.id.activity_login_bt_login:
       mPhone = etPhone.getText().toString().trim();
       mPwd = etPwd.getText().toString().trim();
       KeyBoard.demissKeyBoard(getApplicationContext(), etPhone);
       KeyBoard.demissKeyBoard(getApplicationContext(), etPwd);
       if (TextUtils.isEmpty(mPhone)) {
         showToast("请输入请输入手机号或身份证号");
       } else if (TextUtils.isEmpty(mPwd)) {
         showToast("请输入密码");
       } else {
         requestLogin();
       }
       break;
     case R.id.activity_login_tv_forget: // 忘记密码
       intent = new Intent(this, FindPwdActivity.class);
       startActivity(intent);
       AnimUtil.pushLeftInAndOut(LoginActivity.this);
       break;
     default:
       break;
   }
 }