-
-
Save leiweibo/bc3ffa74b16deab80378 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override public void doLogin(final Context context, final String userName, String password) { | |
UserInterface userNetworkService = | |
JApplication.getNetworkManager().getServiceByClass(UserInterface.class); | |
LoginRequest request = new LoginRequest(); | |
request.username = userName; | |
request.password = password; | |
JApplication.getNetworkManager() | |
.async(context, Constant.LOGINING, userNetworkService.signin(request), | |
new NetworkCallback<SignupResponse>(context) { | |
@Override | |
public void onSuccess(SignupResponse signupResponse) { | |
((JFragmentActivity) context).dialogHelper.dismissProgressDialog(); | |
sharedPreferenceHelper.saveLoginName(context, userName); //TODO 放到异步里面去做 | |
doAfterSignin(context, signupResponse); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment