1:修改巡乐会抽奖次数,更改为1-5-8
2:修改手机换绑和手机绑定 3:修改系统消息展示背景
This commit is contained in:
@@ -117,6 +117,7 @@ public class AppUpdateDialog extends BaseDialog<DialogAppUpdateBinding> implemen
|
|||||||
mProgressDialog.dismiss();
|
mProgressDialog.dismiss();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
LogUtils.e("installAppSuccess",localPath);
|
||||||
AppUtils.installApp(localPath);
|
AppUtils.installApp(localPath);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.e("installAppError", e);
|
Logger.e("installAppError", e);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public interface ApiServer {
|
|||||||
|
|
||||||
@FormUrlEncoded //手机换绑
|
@FormUrlEncoded //手机换绑
|
||||||
@POST(Constants.MODIFY_MOBILE)
|
@POST(Constants.MODIFY_MOBILE)
|
||||||
Call<BaseModel<String>> mobileView(@Field("mobile") String mobile, @Field("new_mobile") String new_mobile, @Field("sms_code") String sms_code);
|
Call<BaseModel<String>> mobileView(@Field("mobile") String mobile, @Field("new_mobile") String new_mobile, @Field("sms_code") String sms_code,@Field("new_sms_code") String new_sms_code);
|
||||||
|
|
||||||
@GET(Constants.GET_EMOTION)
|
@GET(Constants.GET_EMOTION)
|
||||||
Call<BaseModel<List<Emotion>>> upEmotion();
|
Call<BaseModel<List<Emotion>>> upEmotion();
|
||||||
|
|||||||
@@ -241,8 +241,8 @@ public class RetrofitClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mobileView(String mobile, String new_mobile, String sms_code, BaseObserver<String> observer) {
|
public void mobileView(String mobile, String new_mobile, String sms_code,String new_sms_code, BaseObserver<String> observer) {
|
||||||
sApiServer.mobileView(mobile, new_mobile, sms_code).enqueue(new Callback<BaseModel<String>>() {
|
sApiServer.mobileView(mobile, new_mobile, sms_code,new_sms_code).enqueue(new Callback<BaseModel<String>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||||
if (response.code() == 200) {
|
if (response.code() == 200) {
|
||||||
|
|||||||
@@ -168,4 +168,28 @@ public class TextViewUtils {
|
|||||||
public interface OnClickableTextListener {
|
public interface OnClickableTextListener {
|
||||||
void onClick();
|
void onClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用正则表达式格式化手机号,中间4位替换为****
|
||||||
|
* @param phone 原始手机号
|
||||||
|
* @return 格式化后的手机号
|
||||||
|
*/
|
||||||
|
public static String formatPhoneNumberWithRegex(String phone) {
|
||||||
|
if (phone == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理带区号的手机号,中间4位替换为****
|
||||||
|
* @param phone 原始手机号(可能带区号)
|
||||||
|
* @return 格式化后的手机号
|
||||||
|
*/
|
||||||
|
public static String formatAnyPhone(String phone) {
|
||||||
|
if (phone == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -444,7 +444,8 @@ public class Constants {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static final String MODIFY_MOBILE = "/api/UserData/modify_mobile";//手机换绑
|
// public static final String MODIFY_MOBILE = "/api/UserData/modify_mobile";//手机换绑
|
||||||
|
public static final String MODIFY_MOBILE = "/api/UserData/modify_mobiles";//手机换绑
|
||||||
public static final String BIND_MOBILE = "/api/UserData/bind_mobile";//手机绑定
|
public static final String BIND_MOBILE = "/api/UserData/bind_mobile";//手机绑定
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -544,7 +544,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_3"
|
android:layout_marginTop="@dimen/dp_3"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="抽十次"
|
android:text="抽五次"
|
||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -573,7 +573,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_3"
|
android:layout_marginTop="@dimen/dp_3"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="抽百次"
|
android:text="抽八次"
|
||||||
android:textSize="@dimen/sp_12" />
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -8,9 +8,12 @@
|
|||||||
|
|
||||||
<application android:theme="@style/AppTheme">
|
<application android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".TransparentActivity"
|
android:name=".activity.user.activity.MobilePhoneActivity"
|
||||||
android:theme="@style/TransparentActivityTheme"
|
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
<activity
|
||||||
|
android:name=".TransparentActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:theme="@style/TransparentActivityTheme" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.user.activity.TotalRevenueActivity"
|
android:name=".activity.user.activity.TotalRevenueActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
package com.xscm.modulemain.activity.user.activity;
|
package com.xscm.modulemain.activity.user.activity;
|
||||||
|
|
||||||
|
import static android.view.View.GONE;
|
||||||
|
import static android.view.View.VISIBLE;
|
||||||
|
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.xscm.modulemain.R;
|
import com.xscm.modulemain.R;
|
||||||
import com.xscm.modulemain.databinding.ActivityPhoneReplacementBinding;
|
import com.xscm.modulemain.databinding.ActivityPhoneReplacementBinding;
|
||||||
@@ -9,14 +13,15 @@ import com.hjq.toast.ToastUtils;
|
|||||||
import com.xscm.modulemain.activity.user.conacts.PhoneReplacementConacts;
|
import com.xscm.modulemain.activity.user.conacts.PhoneReplacementConacts;
|
||||||
import com.xscm.modulemain.activity.user.presenter.PhoneReplacementPresenter;
|
import com.xscm.modulemain.activity.user.presenter.PhoneReplacementPresenter;
|
||||||
import com.xscm.modulemain.BaseMvpActivity;
|
import com.xscm.modulemain.BaseMvpActivity;
|
||||||
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
import com.xscm.moduleutil.color.ThemeableDrawableUtils;
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*@author
|
* @author
|
||||||
*@data
|
* @data
|
||||||
*@description: 手机换绑
|
* @description: 手机换绑
|
||||||
*/
|
*/
|
||||||
public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPresenter, ActivityPhoneReplacementBinding> implements PhoneReplacementConacts.View {
|
public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPresenter, ActivityPhoneReplacementBinding> implements PhoneReplacementConacts.View {
|
||||||
private CountDownTimer mTimer;
|
private CountDownTimer mTimer;
|
||||||
@@ -28,9 +33,14 @@ public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPr
|
|||||||
if (SpUtil.getUserBean().getMobile() == null || SpUtil.getUserBean().getMobile().equals("")) {
|
if (SpUtil.getUserBean().getMobile() == null || SpUtil.getUserBean().getMobile().equals("")) {
|
||||||
type = "2";
|
type = "2";
|
||||||
mBinding.topBar.setTitle("手机绑定");
|
mBinding.topBar.setTitle("手机绑定");
|
||||||
|
mBinding.relTheOldPhone.setVisibility(GONE);
|
||||||
|
mBinding.rlTheOldCode.setVisibility(GONE);
|
||||||
} else {
|
} else {
|
||||||
type = "1";
|
type = "1";
|
||||||
mBinding.topBar.setTitle("手机换绑");
|
mBinding.topBar.setTitle("手机换绑");
|
||||||
|
mBinding.relTheOldPhone.setVisibility(VISIBLE);
|
||||||
|
mBinding.tvPhone.setText(SpUtil.getUserBean().getMobile());
|
||||||
|
mBinding.rlTheOldCode.setVisibility(VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,6 +55,8 @@ public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPr
|
|||||||
mBinding.tvSendCode.setOnClickListener(this::onClick);
|
mBinding.tvSendCode.setOnClickListener(this::onClick);
|
||||||
mBinding.btnSubmit.setOnClickListener(this::onClick);
|
mBinding.btnSubmit.setOnClickListener(this::onClick);
|
||||||
|
|
||||||
|
mBinding.tvSendTheOldCode.setOnClickListener(this::onClick);
|
||||||
|
|
||||||
mBinding.tvSendCode.setTextColor(ColorManager.getInstance().getPrimaryColorInt());
|
mBinding.tvSendCode.setTextColor(ColorManager.getInstance().getPrimaryColorInt());
|
||||||
|
|
||||||
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.btnSubmit, ColorManager.getInstance().getPrimaryColorInt(), 53);
|
ThemeableDrawableUtils.setThemeableRoundedBackground(mBinding.btnSubmit, ColorManager.getInstance().getPrimaryColorInt(), 53);
|
||||||
@@ -57,7 +69,12 @@ public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onClick(View view) {
|
private void onClick(View view) {
|
||||||
if (view.getId() == R.id.tv_send_code) {
|
if (view.getId() == R.id.tv_send_the_old_code) {
|
||||||
|
if (MvpPre == null) {
|
||||||
|
MvpPre = bindPresenter();
|
||||||
|
}
|
||||||
|
MvpPre.sendCode(SpUtil.getUserBean().getMobile(), type, mBinding.tvSendTheOldCode);
|
||||||
|
} else if (view.getId() == R.id.tv_send_code) {
|
||||||
if (mBinding.edPhone.getText().toString().isEmpty()) {
|
if (mBinding.edPhone.getText().toString().isEmpty()) {
|
||||||
ToastUtils.show("请输入手机号");
|
ToastUtils.show("请输入手机号");
|
||||||
return;
|
return;
|
||||||
@@ -66,10 +83,29 @@ public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPr
|
|||||||
if (MvpPre == null) {
|
if (MvpPre == null) {
|
||||||
MvpPre = bindPresenter();
|
MvpPre = bindPresenter();
|
||||||
}
|
}
|
||||||
MvpPre.sendCode(mBinding.edPhone.getText().toString(), type);
|
MvpPre.sendCode(mBinding.edPhone.getText().toString(), type, mBinding.tvSendCode);
|
||||||
|
|
||||||
} else if (view.getId() == R.id.btnSubmit) {
|
} else if (view.getId() == R.id.btnSubmit) {
|
||||||
|
if (type.equals("1")){
|
||||||
|
|
||||||
|
if(mBinding.edTheOldPassword.getText().toString().isEmpty()){
|
||||||
|
com.blankj.utilcode.util.ToastUtils.showShort("请输入旧手机验证码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mBinding.edPhone.getText().toString().isEmpty()) {
|
||||||
|
com.blankj.utilcode.util.ToastUtils.showShort("请输入新手机号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mBinding.edPassword.getText().toString().isEmpty()) {
|
||||||
|
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (MvpPre!=null){
|
||||||
|
MvpPre.mobileView(SpUtil.getUserBean().getMobile(), mBinding.edPhone.getText().toString(),mBinding.edTheOldPassword.getText().toString(), mBinding.edPassword.getText().toString(), type);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if (type.equals("2")){
|
||||||
if (mBinding.edPhone.getText().toString().isEmpty()) {
|
if (mBinding.edPhone.getText().toString().isEmpty()) {
|
||||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
||||||
return;
|
return;
|
||||||
@@ -78,20 +114,26 @@ public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPr
|
|||||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
|
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MvpPre != null) {
|
if (MvpPre!=null){
|
||||||
if (SpUtil.getUserBean().getMobile() == null || SpUtil.getUserBean().getMobile().equals("")) {
|
MvpPre.mobileView("", mBinding.edPhone.getText().toString(), mBinding.edPassword.getText().toString(),"", type);
|
||||||
MvpPre.mobileView(mBinding.edPhone.getText().toString(), mBinding.edPhone.getText().toString(), mBinding.edPassword.getText().toString(), type);
|
|
||||||
} else {
|
|
||||||
MvpPre.mobileView(SpUtil.getUserBean().getMobile(), mBinding.edPhone.getText().toString(), mBinding.edPassword.getText().toString(), type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendCodeSuccess2(String phoneNumber) {
|
|
||||||
|
// if (MvpPre != null) {
|
||||||
|
// if (SpUtil.getUserBean().getMobile() == null || SpUtil.getUserBean().getMobile().equals("")) {
|
||||||
|
// MvpPre.mobileView(mBinding.edPhone.getText().toString(), mBinding.edPhone.getText().toString(), mBinding.edPassword.getText().toString(), type);
|
||||||
|
// } else {
|
||||||
|
// MvpPre.mobileView(SpUtil.getUserBean().getMobile(), mBinding.edPhone.getText().toString(), mBinding.edPassword.getText().toString(), type);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendCodeSuccess2(String phoneNumber,TextView textView) {
|
||||||
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
|
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
|
||||||
mBinding.tvSendCode.setEnabled(false);
|
textView.setEnabled(false);
|
||||||
mBinding.tvSendCode.setAlpha(0.5f);
|
textView.setAlpha(0.5f);
|
||||||
releaseTimer();
|
releaseTimer();
|
||||||
if (mTimer != null) {
|
if (mTimer != null) {
|
||||||
mTimer.cancel();
|
mTimer.cancel();
|
||||||
@@ -99,16 +141,16 @@ public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPr
|
|||||||
mTimer = new CountDownTimer(60000L, 1000L) {
|
mTimer = new CountDownTimer(60000L, 1000L) {
|
||||||
@Override
|
@Override
|
||||||
public void onTick(long millisUntilFinished) {
|
public void onTick(long millisUntilFinished) {
|
||||||
if (mBinding.tvSendCode != null) {
|
if (textView != null) {
|
||||||
mBinding.tvSendCode.setText(String.format("重新发送(%s)", millisUntilFinished / 1000));
|
textView.setText(String.format("重新发送(%s)", millisUntilFinished / 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFinish() {
|
public void onFinish() {
|
||||||
mBinding.tvSendCode.setAlpha(1f);
|
textView.setAlpha(1f);
|
||||||
mBinding.tvSendCode.setEnabled(true);
|
textView.setEnabled(true);
|
||||||
mBinding.tvSendCode.setText("重新发送");
|
textView.setText("重新发送");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
mTimer.start();
|
mTimer.start();
|
||||||
@@ -122,18 +164,22 @@ public class PhoneReplacementActivity extends BaseMvpActivity<PhoneReplacementPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendCodeSuccess1(String phoneNumber) {
|
public void sendCodeSuccess1(String phoneNumber, TextView textView) {
|
||||||
sendCodeSuccess2(mBinding.edPhone.getText().toString());
|
sendCodeSuccess2(mBinding.edPhone.getText().toString(),textView);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendCodeSuccess(String s) {
|
public void sendCodeSuccess(String s) {
|
||||||
if (s.contains("失败")) {
|
if (s.contains("成功")) {
|
||||||
ToastUtils.show(s);
|
ToastUtils.show(s);
|
||||||
|
try {
|
||||||
|
CommonAppContext.getInstance().clearLoginInfo();
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
finish();
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.show(s);
|
ToastUtils.show(s);
|
||||||
|
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import com.xscm.moduleutil.dialog.RealNameDialog;
|
|||||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||||
import com.xscm.moduleutil.utils.ColorManager;
|
import com.xscm.moduleutil.utils.ColorManager;
|
||||||
import com.xscm.moduleutil.utils.SpUtil;
|
import com.xscm.moduleutil.utils.SpUtil;
|
||||||
|
import com.xscm.moduleutil.utils.TextViewUtils;
|
||||||
import com.xscm.moduleutil.widget.CommonAppConfig;
|
import com.xscm.moduleutil.widget.CommonAppConfig;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -81,6 +82,13 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
|||||||
} else {
|
} else {
|
||||||
mBinding.llQhdz.setVisibility(View.GONE);
|
mBinding.llQhdz.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
if (userInfo.getMobile()!=null && !userInfo.getMobile().equals("")) {
|
||||||
|
mBinding.tvPhoneTitle.setText("手机换绑");
|
||||||
|
mBinding.tvPhone.setText(TextViewUtils.formatAnyPhone(userInfo.getMobile()));
|
||||||
|
}else {
|
||||||
|
mBinding.tvPhoneTitle.setText("手机绑定");
|
||||||
|
mBinding.tvPhone.setText("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +138,12 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
|||||||
} else if (id == R.id.ll_szmm) {//设置密码
|
} else if (id == R.id.ll_szmm) {//设置密码
|
||||||
startActivity(new Intent(this, ChangPassActivity.class));
|
startActivity(new Intent(this, ChangPassActivity.class));
|
||||||
} else if (id == R.id.ll_shb) {
|
} else if (id == R.id.ll_shb) {
|
||||||
|
LogUtils.e("点击了", SpUtil.getUserBean().getMobile());
|
||||||
|
if (TextUtils.isEmpty(SpUtil.getUserBean().getMobile())){
|
||||||
startActivity(new Intent(this, PhoneReplacementActivity.class));
|
startActivity(new Intent(this, PhoneReplacementActivity.class));
|
||||||
|
}else {
|
||||||
|
startActivity(new Intent(this, MobilePhoneActivity.class));
|
||||||
|
}
|
||||||
} else if (id == R.id.ll_smrz) {//实名认证
|
} else if (id == R.id.ll_smrz) {//实名认证
|
||||||
if (SpUtil.getRealName()) {
|
if (SpUtil.getRealName()) {
|
||||||
startActivity(new Intent(this, RealDetailActivity.class));
|
startActivity(new Intent(this, RealDetailActivity.class));
|
||||||
@@ -208,12 +221,12 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
|||||||
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
if( SpUtil.getUserBean().getMobile()==null){
|
if (SpUtil.getUserBean().getMobile() == null) {
|
||||||
if (MvpPre == null) {
|
if (MvpPre == null) {
|
||||||
MvpPre = bindPresenter();
|
MvpPre = bindPresenter();
|
||||||
}
|
}
|
||||||
MvpPre.cancel("");
|
MvpPre.cancel("");
|
||||||
}else {
|
} else {
|
||||||
showSecondaryVerificationDialog();
|
showSecondaryVerificationDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +348,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
|
|||||||
MvpPre.cancel(code);
|
MvpPre.cancel(code);
|
||||||
|
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
}else {
|
} else {
|
||||||
com.hjq.toast.ToastUtils.show("请输入正确的验证码");
|
com.hjq.toast.ToastUtils.show("请输入正确的验证码");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.xscm.modulemain.activity.user.conacts;
|
package com.xscm.modulemain.activity.user.conacts;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.xscm.moduleutil.activity.IPresenter;
|
import com.xscm.moduleutil.activity.IPresenter;
|
||||||
import com.xscm.moduleutil.activity.IView;
|
import com.xscm.moduleutil.activity.IView;
|
||||||
@@ -8,15 +9,15 @@ import com.xscm.moduleutil.activity.IView;
|
|||||||
|
|
||||||
public class PhoneReplacementConacts {
|
public class PhoneReplacementConacts {
|
||||||
public interface View extends IView<Activity> {
|
public interface View extends IView<Activity> {
|
||||||
void sendCodeSuccess1(String phoneNumber);
|
void sendCodeSuccess1(String phoneNumber,TextView textView);
|
||||||
|
|
||||||
void sendCodeSuccess(String s);
|
void sendCodeSuccess(String s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IMePre extends IPresenter {
|
public interface IMePre extends IPresenter {
|
||||||
void sendCode(String phoneNumber, String type);
|
void sendCode(String phoneNumber, String type, TextView tvSendCode);
|
||||||
|
|
||||||
void mobileView(String mobile, String new_mobile, String sms_code,String type);
|
void mobileView(String mobile, String new_mobile, String sms_code,String new_sms_code,String type);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.xscm.modulemain.activity.user.presenter;
|
package com.xscm.modulemain.activity.user.presenter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.xscm.modulemain.activity.user.conacts.PhoneReplacementConacts;
|
import com.xscm.modulemain.activity.user.conacts.PhoneReplacementConacts;
|
||||||
import com.xscm.moduleutil.bean.UserBean;
|
import com.xscm.moduleutil.bean.UserBean;
|
||||||
@@ -21,7 +22,7 @@ public class PhoneReplacementPresenter extends BasePresenter<PhoneReplacementCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendCode(String phoneNumber, String type) {
|
public void sendCode(String phoneNumber, String type, TextView textView) {
|
||||||
api.sendCode(phoneNumber, type, new BaseObserver<String>() {
|
api.sendCode(phoneNumber, type, new BaseObserver<String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -34,16 +35,16 @@ public class PhoneReplacementPresenter extends BasePresenter<PhoneReplacementCon
|
|||||||
if (MvpRef == null) {
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
MvpRef.get().sendCodeSuccess1(phoneNumber);
|
MvpRef.get().sendCodeSuccess1(phoneNumber,textView);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mobileView(String mobile, String new_mobile, String sms_code, String type) {
|
public void mobileView(String mobile, String new_mobile, String sms_code,String new_sms_code, String type) {
|
||||||
if (type.equals("1")) {
|
if (type.equals("1")) {
|
||||||
api.mobileView(mobile, new_mobile, sms_code, new BaseObserver<String>() {
|
api.mobileView(mobile, new_mobile, sms_code,new_sms_code, new BaseObserver<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Disposable d) {
|
public void onSubscribe(Disposable d) {
|
||||||
addDisposable(d);
|
addDisposable(d);
|
||||||
@@ -54,9 +55,11 @@ public class PhoneReplacementPresenter extends BasePresenter<PhoneReplacementCon
|
|||||||
if (MvpRef == null) {
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
|
if (s.contains("成功")) {
|
||||||
UserBean userInfo = SpUtil.getUserBean();
|
UserBean userInfo = SpUtil.getUserBean();
|
||||||
userInfo.setMobile(new_mobile);
|
userInfo.setMobile(new_mobile);
|
||||||
SpUtil.saveUserBean(userInfo);
|
SpUtil.saveUserBean(userInfo);
|
||||||
|
}
|
||||||
MvpRef.get().sendCodeSuccess(s);
|
MvpRef.get().sendCodeSuccess(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -72,9 +75,11 @@ public class PhoneReplacementPresenter extends BasePresenter<PhoneReplacementCon
|
|||||||
if (MvpRef == null) {
|
if (MvpRef == null) {
|
||||||
MvpRef = new WeakReference<>(mView);
|
MvpRef = new WeakReference<>(mView);
|
||||||
}
|
}
|
||||||
|
if (s.contains("成功")) {
|
||||||
UserBean userInfo = SpUtil.getUserBean();
|
UserBean userInfo = SpUtil.getUserBean();
|
||||||
userInfo.setMobile(new_mobile);
|
userInfo.setMobile(new_mobile);
|
||||||
SpUtil.saveUserBean(userInfo);
|
SpUtil.saveUserBean(userInfo);
|
||||||
|
}
|
||||||
MvpRef.get().sendCodeSuccess(s);
|
MvpRef.get().sendCodeSuccess(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
|||||||
if (!isDrawing) {
|
if (!isDrawing) {
|
||||||
isDrawing = true;
|
isDrawing = true;
|
||||||
prepareForNewLottery();
|
prepareForNewLottery();
|
||||||
num = "10";
|
num = "5";
|
||||||
MvpPre.xlhChou(roomId, num);
|
MvpPre.xlhChou(roomId, num);
|
||||||
} else {
|
} else {
|
||||||
// com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
// com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
||||||
@@ -285,7 +285,7 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
|||||||
if (!isDrawing) {
|
if (!isDrawing) {
|
||||||
isDrawing = true;
|
isDrawing = true;
|
||||||
prepareForNewLottery();
|
prepareForNewLottery();
|
||||||
num = "100";
|
num = "8";
|
||||||
MvpPre.xlhChou(roomId, num);
|
MvpPre.xlhChou(roomId, num);
|
||||||
} else {
|
} else {
|
||||||
// com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
// com.hjq.toast.ToastUtils.show("正在抽奖中...");
|
||||||
@@ -411,8 +411,8 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
|||||||
private void upTitle(int boxPrice) {
|
private void upTitle(int boxPrice) {
|
||||||
this.mboxPrice = boxPrice;
|
this.mboxPrice = boxPrice;
|
||||||
mBinding.tvOne.setText(boxPrice + "币一次");
|
mBinding.tvOne.setText(boxPrice + "币一次");
|
||||||
mBinding.tvTen.setText((boxPrice * 10) + "币十次");
|
mBinding.tvTen.setText((boxPrice * 5) + "币五次");
|
||||||
mBinding.tvHundred.setText((boxPrice * 100) + "币百次");
|
mBinding.tvHundred.setText((boxPrice * 8) + "币八次");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 2025/8/29 接收im推送过来的消息
|
// TODO: 2025/8/29 接收im推送过来的消息
|
||||||
@@ -619,12 +619,12 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
|||||||
mBinding.llOne.setClickable( false);
|
mBinding.llOne.setClickable( false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icon>=mboxPrice*10){
|
if (icon>=mboxPrice*5){
|
||||||
mBinding.llTen.setClickable( true);
|
mBinding.llTen.setClickable( true);
|
||||||
}else {
|
}else {
|
||||||
mBinding.llTen.setClickable( false);
|
mBinding.llTen.setClickable( false);
|
||||||
}
|
}
|
||||||
if (icon>=mboxPrice*100){
|
if (icon>=mboxPrice*8){
|
||||||
mBinding.llHundred.setClickable( true);
|
mBinding.llHundred.setClickable( true);
|
||||||
}else {
|
}else {
|
||||||
mBinding.llHundred.setClickable( false);
|
mBinding.llHundred.setClickable( false);
|
||||||
|
|||||||
@@ -18,6 +18,98 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rel_the_old_phone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_44"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_17"
|
||||||
|
android:layout_marginRight="@dimen/dp_16"
|
||||||
|
android:background="@drawable/bg_r16_ffeff2f8"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_user1"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:src="@mipmap/icon_login_user_new" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_phone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_28"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginStart="13dp"
|
||||||
|
android:layout_marginRight="25dp"
|
||||||
|
android:layout_toEndOf="@+id/iv_user1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="@string/login_hint_phion"
|
||||||
|
android:maxLength="11"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/color_FFCCCCCC"
|
||||||
|
android:textSize="@dimen/sp_17" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/rl_the_old_code"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_44"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_marginTop="15dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
|
android:background="@drawable/bg_r16_ffeff2f8">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_the_old_code"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:src="@mipmap/icon_login_code" />
|
||||||
|
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/ed_the_old_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_28"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginLeft="13dp"
|
||||||
|
android:layout_marginRight="25dp"
|
||||||
|
android:layout_toRightOf="@+id/iv_the_old_code"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:hint="@string/login_hint_code"
|
||||||
|
android:inputType="textVisiblePassword "
|
||||||
|
android:maxLength="20"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textColorHint="@color/color_FFCCCCCC"
|
||||||
|
android:textSize="@dimen/sp_16" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_send_the_old_code"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="@dimen/dp_30"
|
||||||
|
android:gravity="right"
|
||||||
|
android:text="@string/login_send_code"
|
||||||
|
android:textColor="#FF8ACC"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rel_phone"
|
android:id="@+id/rel_phone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -84,7 +176,7 @@
|
|||||||
android:layout_toRightOf="@+id/iv_code"
|
android:layout_toRightOf="@+id/iv_code"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:hint="@string/login_hint_code"
|
android:hint="@string/login_hint_code"
|
||||||
android:inputType="textPassword"
|
android:inputType="textVisiblePassword"
|
||||||
android:maxLength="20"
|
android:maxLength="20"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
|
|||||||
@@ -145,10 +145,17 @@
|
|||||||
android:background="@drawable/bg_r15_white">
|
android:background="@drawable/bg_r15_white">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_phone_title"
|
||||||
style="@style/My_Info_Item_Title_Style"
|
style="@style/My_Info_Item_Title_Style"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="@string/bind_phone" />
|
android:text="@string/bind_phone" />
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_phone"
|
||||||
|
style="@style/My_Info_Item_Title_Style"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center|end"/>
|
||||||
|
|
||||||
<ImageView style="@style/My_Info_Item_Arrow_Style" />
|
<ImageView style="@style/My_Info_Item_Arrow_Style" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -154,7 +154,8 @@
|
|||||||
<com.xscm.moduleutil.widget.ScrollViewPager
|
<com.xscm.moduleutil.widget.ScrollViewPager
|
||||||
android:id="@+id/view_pager"
|
android:id="@+id/view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_transparent" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_16"
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
android:background="@drawable/bg_r16_fff"
|
android:background="@drawable/bg_r16_fff"
|
||||||
|
android:backgroundTint="#EFF2F8"
|
||||||
android:gravity="left|center"
|
android:gravity="left|center"
|
||||||
android:padding="@dimen/dp_12"
|
android:padding="@dimen/dp_12"
|
||||||
android:text="系统消息"
|
android:text="系统消息"
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_16"
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
android:background="@drawable/bg_r16_fff"
|
android:background="@drawable/bg_r16_fff"
|
||||||
|
android:backgroundTint="#EFF2F8"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.tencent.qcloud.tuikit.timcommon.component.RoundCornerImageView
|
<com.tencent.qcloud.tuikit.timcommon.component.RoundCornerImageView
|
||||||
@@ -113,6 +115,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_r16_fff"
|
android:background="@drawable/bg_r16_fff"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:backgroundTint="#EFF2F8"
|
||||||
android:padding="@dimen/dp_10"
|
android:padding="@dimen/dp_10"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|||||||
Reference in New Issue
Block a user