Commit da55f1a6 by 霍志良

Merge remote-tracking branch 'origin/4.1.69(强绑手机号)' into 4.1.69(强绑手机号)

parents d5666f68 9430b62e
...@@ -205,9 +205,6 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler { ...@@ -205,9 +205,6 @@ public class P2PCustomActionHandlerImpl implements IP2PCustomActionHandler {
*/ */
@Override @Override
public void sendRedPacket(Activity activity) { public void sendRedPacket(Activity activity) {
// Bundle bundle = new Bundle();
// bundle.putString("to_uid",toChatUsername);
// ImIn.INSTANCE.SendRedPacketActivity(activity,bundle,44);
ImIn.INSTANCE.sendRedPacketIntent(activity, toChatUsername, 44); ImIn.INSTANCE.sendRedPacketIntent(activity, toChatUsername, 44);
} }
......
...@@ -13,5 +13,6 @@ data class BindPhoneJavaParam( ...@@ -13,5 +13,6 @@ data class BindPhoneJavaParam(
var phoneNumber: String,//手机号 var phoneNumber: String,//手机号
var verifyCode: String,// 验证码 var verifyCode: String,// 验证码
var uid: String, var uid: String,
var type: Int = 2//2:Android var type: Int = 2, //2:Android
var transferFlag:Int = 0 // 默认为0,1表示需要转换x账号到y账号触发 1800010011 code提醒触发重新登录标记
) )
\ No newline at end of file
...@@ -67,16 +67,7 @@ class BindPhoneActivity : BaseActivity() { ...@@ -67,16 +67,7 @@ class BindPhoneActivity : BaseActivity() {
mIsForceBindPhone = intent.getBooleanExtra("is_force_bind_phone",false) mIsForceBindPhone = intent.getBooleanExtra("is_force_bind_phone",false)
mIsFromGuide = intent.getBooleanExtra("is_from_guide", false) mIsFromGuide = intent.getBooleanExtra("is_from_guide", false)
iv_back.setOnClickListener { iv_back.setOnClickListener {
if (mIsForceBindPhone) { onBackPressed()
//清除UserInfo
setUserinfo(null)
clearImData()
logout()
EventBus.getDefault().post(RefreshRecentContactListEvent())
finish()
} else {
LoginUtils.loginSuccessOperate(this)
}
} }
tv_country_code.setOnClickListener { tv_country_code.setOnClickListener {
val intent = Intent(this, CountryListActivity::class.java) val intent = Intent(this, CountryListActivity::class.java)
...@@ -229,18 +220,18 @@ class BindPhoneActivity : BaseActivity() { ...@@ -229,18 +220,18 @@ class BindPhoneActivity : BaseActivity() {
val phone = et_phone_number.text.toString().replace(" ", "") val phone = et_phone_number.text.toString().replace(" ", "")
val code = et_code.text.toString() val code = et_code.text.toString()
val bindPhoneParams = val bindPhoneParams =
BindPhoneJavaParam("", countryCode, phone, code, UserHelper.getUserInfo()!!.uid!!) BindPhoneJavaParam("", countryCode, phone, code, UserHelper.getUserInfo()!!.uid!!,transferFlag=1)
LoginApiRequestUtil.bindPhone(bindPhoneParams) LoginApiRequestUtil.bindPhone(bindPhoneParams)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.doOnSubscribe { showProgressDialog() } .doOnSubscribe { showProgressDialog() }
.doAfterTerminate { dismissProgressDialog() } .doAfterTerminate { dismissProgressDialog() }
.subscribe({ .subscribe({
RxKeyboardTool.hideSoftInput(this)
if (it.code == 200) { if (it.code == 200) {
ToastUtil.toastShort("绑定成功") ToastUtil.toastShort("绑定成功")
UserHelper.getUserInfo()!!.userInfo!!.bind_phone = 1 UserHelper.getUserInfo()!!.userInfo!!.bind_phone = 1
UserHelper.getUserInfo()!!.userInfo!!.phone = phone UserHelper.getUserInfo()!!.userInfo!!.phone = phone
RxKeyboardTool.hideSoftInput(this)
if (mIsFromGuide) { if (mIsFromGuide) {
LoginUtils.loginSuccessOperate(this) LoginUtils.loginSuccessOperate(this)
} else { } else {
...@@ -248,12 +239,14 @@ class BindPhoneActivity : BaseActivity() { ...@@ -248,12 +239,14 @@ class BindPhoneActivity : BaseActivity() {
} }
} else if (it.code == 1300000004) { // 如果不是10分钟内注册,提示“绑定失败,此手机号已注册”,并标记此账号为无需强绑 } else if (it.code == 1300000004) { // 如果不是10分钟内注册,提示“绑定失败,此手机号已注册”,并标记此账号为无需强绑
ToastUtil.toastShort(it.msg) ToastUtil.toastShort(it.msg)
RxKeyboardTool.hideSoftInput(this)
if (mIsFromGuide) { if (mIsFromGuide) {
LoginUtils.loginSuccessOperate(this) LoginUtils.loginSuccessOperate(this)
} else { } else {
finish() finish()
} }
}else if(it.code==1800010011){
RegisterAndLoginActivity.startFromGuide(this,false,mIsFromGuide)
finish()
} else { } else {
ToastUtil.toastShort(it.msg)//服务端返回{验证码错误&异常}信息 ToastUtil.toastShort(it.msg)//服务端返回{验证码错误&异常}信息
} }
...@@ -262,6 +255,19 @@ class BindPhoneActivity : BaseActivity() { ...@@ -262,6 +255,19 @@ class BindPhoneActivity : BaseActivity() {
}) })
} }
override fun onBackPressed() {
if (mIsForceBindPhone) {
//清除UserInfo
setUserinfo(null)
clearImData()
logout()
EventBus.getDefault().post(RefreshRecentContactListEvent())
finish()
} else {
LoginUtils.loginSuccessOperate(this)
}
}
/** /**
* 开始倒计时 * 开始倒计时
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment