private void doCheckVerify(AbstractActionFuture future) { LoginModule login = (LoginModule)getContext().getModule(AbstractModule.Type.LOGIN); QQAccount account = (QQAccount)getContext().getAccount(); login.checkVerify(account.getUsername(), delegate(QQActionEvent evt) { if (evt.getType() == QQActionEvent.Type.EVT_OK) { CheckVerifyArgs args = (CheckVerifyArgs)(evt.getTarget()); account.setUin(args.uin); if (args.result == 0) { doWebLogin(args.code, future); } else { doGetVerify("为了保证您账号的安全,请输入验证码中字符继续登录。", future); } } else if (evt.getType() == QQActionEvent.Type.EVT_ERROR) { future.notifyActionEvent( QQActionEvent.Type.EVT_ERROR, evt.getTarget()); } }); }