|
|
@@ -67,7 +67,7 @@ public class ActPayPassword extends BaseContainerActivity {
|
|
|
if (action == ACTION_COMPLETION) {
|
|
|
return new CompletionInfoFragment();
|
|
|
} else if (action == ACTION_SEND_CAPTCHA) {
|
|
|
- return new CheckCaptchaFragment();
|
|
|
+ return CheckCaptchaFragment.newInstance(getIntent().getStringExtra("mobile"));
|
|
|
} else if (action == ACTION_CONFIRM_UPDATE) {
|
|
|
return new ConfirmUpdateFragment();
|
|
|
} else if (action == ACTION_SET_PWD) {
|
|
|
@@ -85,7 +85,7 @@ public class ActPayPassword extends BaseContainerActivity {
|
|
|
}
|
|
|
|
|
|
public static void setPwd(Context context) {
|
|
|
- CommonUtil.getInstance().getUserInfo(SpUtils.getToken(context), (user)->{
|
|
|
+ CommonUtil.getInstance().getUserInfo(SpUtils.getToken(context), (user) -> {
|
|
|
Intent in = new Intent(context, ActPayPassword.class);
|
|
|
if (TextUtils.isEmpty(user.getMobile())) {
|
|
|
in.putExtra("action", ACTION_COMPLETION);
|
|
|
@@ -93,26 +93,27 @@ public class ActPayPassword extends BaseContainerActivity {
|
|
|
in.putExtra("action", ACTION_CONFIRM_UPDATE);
|
|
|
} else {
|
|
|
in.putExtra("action", ACTION_SEND_CAPTCHA);
|
|
|
+ in.putExtra("mobile", user.getMobile());
|
|
|
}
|
|
|
context.startActivity(in);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
public static void verifyPwd(Activity activity, String token, String ext, PayPasswordCallback callback) {
|
|
|
- CommonUtil.getInstance().getUserInfo(token, (user)->{
|
|
|
- if(user.hasPayPwd()) {
|
|
|
+ CommonUtil.getInstance().getUserInfo(token, (user) -> {
|
|
|
+ if (user.hasPayPwd()) {
|
|
|
Intent in = new Intent(activity, ActPayPassword.class);
|
|
|
in.putExtra("action", ACTION_VERIFY_PAY_PWD);
|
|
|
in.putExtra("ext", ext);
|
|
|
activity.startActivityForResult(in, 3);
|
|
|
callback.callback(true);
|
|
|
- } else{
|
|
|
+ } else {
|
|
|
callback.callback(false);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- public interface PayPasswordCallback{
|
|
|
+ public interface PayPasswordCallback {
|
|
|
void callback(boolean ret);
|
|
|
}
|
|
|
|