@Override public void doComplete(Object o) { // TODO Auto-generated method stub Map map = (Map) o; System.out.println("map" + map); int status = Integer.parseInt(map.get("status").toString()); if (status == 100) { } else if (status == 101) { Toast.makeText(getApplicationContext(), "通讯异常!", 500).show(); System.out.println("内部,用户名或密码错误"); return; } else if (status == 102) { Toast.makeText(getApplicationContext(), "通讯异常!", 500).show(); System.out.println("没有接口权限或接口不存在"); return; } else if (status == 103) { Toast.makeText(getApplicationContext(), "通讯异常!", 500).show(); System.out.println("用户对该接口的当日访问量用完"); return; } else { Toast.makeText(getApplicationContext(), "通讯异常!", 500).show(); System.out.println("验证程序异常 稍后重试"); return; } String operaStatus = map.get("operaStatus").toString(); // 0 登录成功 1 登录出错 2 帐号或密码错误 3 帐号未激活 if ("0".equals(operaStatus)) { mApp.setUserName(userName); // 记录全局变量 ,用户名 System.out.println("登录成功!"); Intent it = new Intent(); it.setClass(LoginActivity.this, HFBusMain.class); startActivity(it); finish(); } else if ("1".equals(operaStatus)) { Toast.makeText(getApplicationContext(), "登录出错!", 500).show(); } else if ("2".equals(operaStatus)) { Toast.makeText(getApplicationContext(), "帐号或密码错误!", 500).show(); } else if ("3".equals(operaStatus)) { Toast.makeText(getApplicationContext(), " 帐号未激活!", 500).show(); } super.doComplete(o); }
@Override public void doError(Exception e) { // TODO Auto-generated method stub super.doError(e); }
@Override public void doTimeout() { // TODO Auto-generated method stub super.doTimeout(); }