统一去掉绑定手机号逻辑

This commit is contained in:
wushaocheng
2022-10-22 10:28:48 +08:00
parent 7fd8892f3c
commit 3e2a454f6d
9 changed files with 94 additions and 47 deletions

View File

@@ -894,7 +894,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
@Subscribe(threadMode = ThreadMode.MAIN)
public void onNeedBindPhoneEvent(NeedBindPhoneEvent event) {
checkBindPhone();
// checkBindPhone();
}
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true)

View File

@@ -127,10 +127,7 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
binding.ivHelp.setOnClickListener { DialogWebViewActivity.start(context, UriProvider.getRedPacketRule()) }
binding.ivSend.setOnClickListener {
UserModel.get().cacheLoginUserInfo?.let {
if (!it.isBindPhone) {
BindPhoneActivity.start(context)
return@setOnClickListener
} else if (!it.isBindPaymentPwd) {
if (!it.isBindPaymentPwd) {
ModifyPwdActivity.start(context, ModifyPwdActivity.PAY_PWD)
return@setOnClickListener
}

View File

@@ -141,15 +141,10 @@ public class RouterHandler {
WithdrawModel.get().getWithdrawUserInfo(AuthModel.get().getCurrentUid())
.subscribe(withdrawInfo -> {
if (withdrawInfo != null) {
if (UserModel.get().getCacheLoginUserInfo().isBindPhone()) {
Intent intent = new Intent(context, BinderAlipayActivity.class);
Bundle mBundle = new Bundle();
mBundle.putSerializable("withdrawInfo", withdrawInfo);
intent.putExtras(mBundle);
context.startActivity(intent);
} else {
BindPhoneActivity.start(context);
}
Intent intent = new Intent(context, BinderAlipayActivity.class);
Bundle mBundle = new Bundle();
mBundle.putSerializable("withdrawInfo", withdrawInfo);
intent.putExtras(mBundle);
}
});
}
@@ -176,11 +171,7 @@ public class RouterHandler {
break;
case RouterType.SETTING_PAY_PWD:
if (UserModel.get().getCacheLoginUserInfo().isBindPhone()) {
ModifyPwdActivity.start(context, ModifyPwdActivity.PAY_PWD);
} else {
BindPhoneActivity.start(context);
}
ModifyPwdActivity.start(context, ModifyPwdActivity.PAY_PWD);
break;
//推荐卡仓库
case RouterType.MY_RECOMMEND:

View File

@@ -99,6 +99,13 @@ public class SettingActivity extends BaseActivity implements View.OnClickListene
case R.id.rly_login_pwd:
ModifyPwdActivity.start(this, ModifyPwdActivity.LOGIN_PWD);
break;
case R.id.rly_pay_pwd:
if (UserModel.get().getCacheLoginUserInfo() == null) {
toast(ResUtil.getString(R.string.ui_setting_settingactivity_06));
return;
}
ModifyPwdActivity.start(this, ModifyPwdActivity.PAY_PWD);
break;
case R.id.btn_login_out://退出登录
LogoutHelper.logout();
finish();

View File

@@ -67,6 +67,58 @@
android:layout_marginEnd="15dp"
android:background="@color/line_353548" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginEnd="15dp"
android:background="@color/line_353548" />
<RelativeLayout
android:id="@+id/rly_pay_pwd"
android:layout_width="match_parent"
android:layout_height="50dp"
android:clickable="true"
android:focusable="true"
android:onClick="@{click}">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/dp_15"
android:text="@string/text_setting_pay_password"
android:textColor="@color/text_title_color"
android:textSize="14sp" />
<ImageView
android:id="@+id/iv_pay_pwd_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/dp_15"
android:src="@drawable/arrow_right" />
<TextView
android:id="@+id/tv_pay_modify"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/dp_14"
android:layout_toStartOf="@id/iv_pay_pwd_arrow"
android:text="@string/text_modify"
android:textColor="@color/text_normal_c6c6e9"
android:textSize="12sp" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginEnd="15dp"
android:background="@color/line_353548" />
<TextView
android:id="@+id/tv_notice_setting"
android:layout_width="match_parent"

View File

@@ -18,8 +18,6 @@ public class AddBankCardAgreementPresenter extends BaseMvpPresenter<IAddBankCard
if (userInfo == null) return;
if (!userInfo.isCertified()) {
getMvpView().goToRealNamePage();
} else if (!userInfo.isBindPhone()) {
getMvpView().goToBindPhoneActivity();
} else if (!userInfo.isBindPaymentPwd()) {
getMvpView().goToSetPasswordActivity();
} else {

View File

@@ -1157,11 +1157,11 @@ public class DynamicDetailActivity extends BaseActivity implements IEmoticonSele
SingleToastUtil.showToast(XChatConstants.EMPTY_USER_INFO_TIPS);
return false;
}
if (!userInfo.isBindPhone()) {
getDialogManager().showOkCancelWithTitleDialog(ResUtil.getString(R.string.dynamic_view_dynamicdetailactivity_027),
() -> BindPhoneActivity.start(this));
return false;
}
// if (!userInfo.isBindPhone()) {
// getDialogManager().showOkCancelWithTitleDialog(ResUtil.getString(R.string.dynamic_view_dynamicdetailactivity_027),
// () -> BindPhoneActivity.start(this));
// return false;
// }
return true;
}

View File

@@ -141,12 +141,14 @@ public class PublishActivity extends BaseMvpActivity<IPublishView, PublishPresen
SingleToastUtil.showToast(XChatConstants.EMPTY_USER_INFO_TIPS);
return true;
} else if (!userInfo.isBindPhone()) {
manager.showOkCancelWithTitleDialog(ResUtil.getString(R.string.publish_view_publishactivity_01),
() -> BindPhoneActivity.start(manager.getContext()));
return true;
} else {
}
// else if (!userInfo.isBindPhone()) {
// manager.showOkCancelWithTitleDialog(ResUtil.getString(R.string.publish_view_publishactivity_01),
// () -> BindPhoneActivity.start(manager.getContext()));
// return true;
//
// }
else {
return false;
}
}

View File

@@ -450,21 +450,21 @@ public class PublicChatHallMessageFragment extends TFragment implements ModulePr
@Override
public boolean sendMessage(IMMessage msg) {
UserInfo currentUserInfo = UserModel.get().getCacheLoginUserInfo();
if (currentUserInfo != null && !currentUserInfo.isBindPhone()) {
DialogManager dialogManager = new DialogManager(getActivity());
String tips = getString(R.string.tips_need_to_bind_phone);
SpannableStringBuilder builder = new SpannableStringBuilder(tips);
builder.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), R.color.appColor)),
tips.length() - 5, tips.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
dialogManager.showTipsDialog(builder, getString(R.string.label_go_to_bind_phone), new DialogManager.AbsOkDialogListener() {
@Override
public void onOk() {
BindPhoneActivity.start(getContext());
}
});
return false;
}
// UserInfo currentUserInfo = UserModel.get().getCacheLoginUserInfo();
// if (currentUserInfo != null && !currentUserInfo.isBindPhone()) {
// DialogManager dialogManager = new DialogManager(getActivity());
// String tips = getString(R.string.tips_need_to_bind_phone);
// SpannableStringBuilder builder = new SpannableStringBuilder(tips);
// builder.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), R.color.appColor)),
// tips.length() - 5, tips.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
// dialogManager.showTipsDialog(builder, getString(R.string.label_go_to_bind_phone), new DialogManager.AbsOkDialogListener() {
// @Override
// public void onOk() {
// BindPhoneActivity.start(getContext());
// }
// });
// return false;
// }
ChatRoomMessage message = (ChatRoomMessage) msg;
if (aitContractsMap.size() > 0) {