修改转账,付款等文案
This commit is contained in:
@@ -196,7 +196,7 @@ public class MainActivity extends BaseActivity {
|
||||
|
||||
|
||||
/**
|
||||
* 转账
|
||||
* 赠送
|
||||
*/
|
||||
public static final int TYPE_TRANSFER = 1;
|
||||
|
||||
@@ -1814,7 +1814,7 @@ public class MainActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
/**
|
||||
* 转账开关配置
|
||||
* 赠送开关配置
|
||||
*/
|
||||
private void getConfig() {
|
||||
Api.getInstance().getConfig()
|
||||
|
||||
@@ -35,10 +35,13 @@ import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
|
||||
import com.dskj.rbchat.databinding.ActivitySecurityBinding;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import com.dskj.rbchat.model.BindBean;
|
||||
import com.dskj.rbchat.model.LoginBean;
|
||||
|
||||
public class AccountAndSecurityActivity extends BaseActivity {
|
||||
|
||||
BindBean bean;
|
||||
@@ -50,7 +53,7 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
getWindow().setStatusBarColor(getResources().getColor(R.color.color_white));
|
||||
getWindow().setNavigationBarColor(getResources().getColor(R.color.color_white));
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR|View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
viewBinding = ActivitySecurityBinding.inflate(getLayoutInflater());
|
||||
@@ -61,11 +64,11 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
.unsubscribeOn(rx.schedulers.Schedulers.io())
|
||||
.subscribe(changeImageViewBean -> {
|
||||
LogUtils.i(GsonUtils.beanToJSONString(changeImageViewBean));
|
||||
if(changeImageViewBean.getType()==1){
|
||||
if (changeImageViewBean.getType() == 1) {
|
||||
getAccessToken(changeImageViewBean.getCode());
|
||||
}else{
|
||||
} else {
|
||||
ToastX.showShortToast(
|
||||
String.format(getResources().getString(R.string.login_fail),changeImageViewBean.getType()));
|
||||
String.format(getResources().getString(R.string.login_fail), changeImageViewBean.getType()));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -92,7 +95,7 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void data) {
|
||||
if (AccountAndSecurityActivity.this.getApplicationContext() instanceof IMApplication) {
|
||||
((IMApplication)AccountAndSecurityActivity.this.getApplicationContext())
|
||||
((IMApplication) AccountAndSecurityActivity.this.getApplicationContext())
|
||||
.clearActivity(AccountAndSecurityActivity.this);
|
||||
}
|
||||
DataUtils.set(AccountAndSecurityActivity.this, IMUIKitConfig.LOGIN_ACCOUNT, "");
|
||||
@@ -115,16 +118,15 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
|
||||
protected void initView() {
|
||||
|
||||
wxAPI = WXAPIFactory.createWXAPI(this, IMUIKitConfig.WECHAT_APPID,true);
|
||||
wxAPI = WXAPIFactory.createWXAPI(this, IMUIKitConfig.WECHAT_APPID, true);
|
||||
wxAPI.registerApp(IMUIKitConfig.WECHAT_APPID);
|
||||
initListeners();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void getAccessToken(String code) {
|
||||
|
||||
Api.getInstance().getAccessToken(IMUIKitConfig.WECHAT_APPID,IMUIKitConfig.WECHAT_SECRET,code,"authorization_code")
|
||||
Api.getInstance().getAccessToken(IMUIKitConfig.WECHAT_APPID, IMUIKitConfig.WECHAT_SECRET, code, "authorization_code")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver1<WeiXinToken>() {
|
||||
@@ -137,14 +139,14 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast( msg);
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getWeiXinUserInfo(WeiXinToken result) {
|
||||
|
||||
Api.getInstance().getAccessUserInfo(result.getAccess_token(),result.getOpenid())
|
||||
Api.getInstance().getAccessUserInfo(result.getAccess_token(), result.getOpenid())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver1<WeiXinInfo>() {
|
||||
@@ -155,21 +157,20 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast( msg);
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
loginBean = DataUtils.getLocUserInfo();
|
||||
if(loginBean!=null) {
|
||||
if(TextUtils.isEmpty(loginBean.getNwId())){
|
||||
if (loginBean != null) {
|
||||
if (TextUtils.isEmpty(loginBean.getNwId())) {
|
||||
viewBinding.accoutTv.setText(getString(R.string.weishezhi_txt));
|
||||
}else{
|
||||
} else {
|
||||
viewBinding.accoutTv.setText(loginBean.getNwId());
|
||||
}
|
||||
|
||||
@@ -182,10 +183,10 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
viewBinding.settingTitleBar.setOnBackIconClickListener(v -> onBackPressed());
|
||||
|
||||
viewBinding.zhmmBt.setOnClickListener(v -> {
|
||||
if(bean!=null) {
|
||||
if(bean.getPhoneBind()== false){
|
||||
if (bean != null) {
|
||||
if (bean.getPhoneBind() == false) {
|
||||
showDialog();
|
||||
}else{
|
||||
} else {
|
||||
// Intent intent = new Intent(AccountAndSecurityActivity.this,ChangeAccoutActionActivity.class);
|
||||
// intent.putExtra("type",ChangeAccoutActionActivity.TYPE_CHANGE_PASSWORD);
|
||||
// startActivity(intent);
|
||||
@@ -199,30 +200,33 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
});
|
||||
|
||||
viewBinding.bindPhoneBt.setOnClickListener(v -> {
|
||||
if(bean!=null&&bean.getPhoneBind()== false) {
|
||||
if (bean != null && bean.getPhoneBind() == false) {
|
||||
Intent intent = new Intent(AccountAndSecurityActivity.this, ChangeAccoutActionActivity.class);
|
||||
intent.putExtra("type", ChangeAccoutActionActivity.TYPE_BIND_PHONE);
|
||||
startActivity(intent);
|
||||
}else{
|
||||
startActivity(new Intent(this,ChangePhoneActivity.class));
|
||||
} else {
|
||||
startActivity(new Intent(this, ChangePhoneActivity.class));
|
||||
}
|
||||
});
|
||||
|
||||
viewBinding.bindWechatBt.setOnClickListener(v -> {
|
||||
if(bean!=null&&bean.getWechatBind()== false){
|
||||
if (bean != null && bean.getWechatBind() == false) {
|
||||
SendAuth.Req req = new SendAuth.Req();
|
||||
req.scope = "snsapi_userinfo";
|
||||
req.state = String.valueOf(System.currentTimeMillis());
|
||||
wxAPI.sendReq(req);
|
||||
}else{
|
||||
} else {
|
||||
ToastX.showShortToast(R.string.yibind_wechat_txt);
|
||||
|
||||
}
|
||||
});
|
||||
viewBinding.accoutBt.setOnClickListener(v ->{
|
||||
startActivityForResult(new Intent(AccountAndSecurityActivity.this,SettingAccoutIdActivity.class),888);
|
||||
} );
|
||||
|
||||
viewBinding.accoutBt.setOnClickListener(v -> {
|
||||
startActivityForResult(new Intent(AccountAndSecurityActivity.this, SettingAccoutIdActivity.class), 888);
|
||||
});
|
||||
viewBinding.closeAccount.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(this, CloseAccountActivity.class);
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -241,6 +245,7 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
intent.putExtra("type", ChangeAccoutActionActivity.TYPE_BIND_PHONE);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
@@ -259,7 +264,7 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
|
||||
|
||||
private void bindWechat(WeiXinInfo obj) {
|
||||
if(obj!=null&&loginBean!=null){
|
||||
if (obj != null && loginBean != null) {
|
||||
obj.setUserId(loginBean.getUser_uid());
|
||||
obj.setSubstationId(IMUIKitConfig.SUBSTATIONID);
|
||||
Api.getInstance().bindWechat(obj)
|
||||
@@ -275,7 +280,7 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast( msg);
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -292,13 +297,13 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
bean = feedbackResp.data;
|
||||
//只有这是个参数允许切换
|
||||
// viewBinding.bindWechatTv.setText(feedbackResp.data.getWechatBind()?getString(R.string.yibangding_txt):getString(R.string.weibangding_txt));
|
||||
viewBinding.bindPhoneTv.setText(feedbackResp.data.getPhoneBind()?(feedbackResp.data.getAreaCode()+feedbackResp.data.getPhone()):getString(R.string.weibangding_txt));
|
||||
viewBinding.bindPhoneTv.setText(feedbackResp.data.getPhoneBind() ? (feedbackResp.data.getAreaCode() + feedbackResp.data.getPhone()) : getString(R.string.weibangding_txt));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:"+code+""+ msg);
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
// WidgetUtils.showToast(getActivity(), msg, WidgetUtils.ToastType.ERROR);
|
||||
}
|
||||
});
|
||||
@@ -307,8 +312,8 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if(requestCode == 888 && resultCode == RESULT_OK){
|
||||
if(loginBean!=null) {
|
||||
if (requestCode == 888 && resultCode == RESULT_OK) {
|
||||
if (loginBean != null) {
|
||||
getUserInfo(loginBean.getUser_uid());
|
||||
}
|
||||
}
|
||||
@@ -334,9 +339,9 @@ public class AccountAndSecurityActivity extends BaseActivity {
|
||||
loginBean.getUser().setNwIdSetTime(feedbackResp.data.getNwIdSetTime());
|
||||
DataUtils.set(AccountAndSecurityActivity.this, "login_bean", GsonUtils.beanToJSONString(loginBean));
|
||||
|
||||
if(TextUtils.isEmpty(loginBean.getNwId())){
|
||||
if (TextUtils.isEmpty(loginBean.getNwId())) {
|
||||
viewBinding.accoutTv.setText(getString(R.string.weishezhi_txt));
|
||||
}else{
|
||||
} else {
|
||||
viewBinding.accoutTv.setText(loginBean.getNwId());
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,260 @@
|
||||
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
package com.dskj.rbchat.main.mine;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import androidx.activity.result.ActivityResultLauncher;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.dskj.rbchat.IMApplication;
|
||||
import com.dskj.rbchat.IMUIKitConfig;
|
||||
import com.dskj.rbchat.R;
|
||||
import com.dskj.rbchat.databinding.ActivityChongzhiBinding;
|
||||
import com.dskj.rbchat.databinding.ActivityCloseAccountBinding;
|
||||
import com.dskj.rbchat.dialog.ActionConfirmDialog;
|
||||
import com.dskj.rbchat.dialog.ActionConfirmDialog1;
|
||||
import com.dskj.rbchat.login.LoginActivity;
|
||||
import com.dskj.rbchat.model.BindBean;
|
||||
import com.dskj.rbchat.model.CountryBean;
|
||||
import com.dskj.rbchat.model.RegisteredBean;
|
||||
import com.dskj.rbchat.network.Api;
|
||||
import com.dskj.rbchat.network.BaseObserver;
|
||||
import com.dskj.rbchat.network.Result;
|
||||
import com.dskj.rbchat.utils.AnimUtil;
|
||||
import com.dskj.rbchat.utils.Constant;
|
||||
import com.dskj.rbchat.utils.DataUtils;
|
||||
import com.dskj.rbchat.utils.LogUtils;
|
||||
import com.dskj.rbchat.welcome.WelcomeActivity;
|
||||
import com.netease.yunxin.kit.alog.ALog;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.dialog.LoadingDialog;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
import com.netease.yunxin.kit.corekit.im.login.LoginCallback;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
/**
|
||||
* 注销账号
|
||||
*/
|
||||
public class CloseAccountActivity extends BaseActivity {
|
||||
protected ActivityResultLauncher<String[]> permissionLauncher;
|
||||
private static final String TAG = "WelcomeActivity";
|
||||
private ActivityCloseAccountBinding closeAccountBinding;
|
||||
CountryBean countryBean;
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().setStatusBarColor(getResources().getColor(R.color.color_fcfcfc));
|
||||
getWindow().setNavigationBarColor(getResources().getColor(R.color.color_white));
|
||||
|
||||
ALog.d(Constant.PROJECT_TAG, TAG, "onCreateView");
|
||||
IMApplication.setColdStart(true);
|
||||
closeAccountBinding = ActivityCloseAccountBinding.inflate(getLayoutInflater());
|
||||
setContentView(closeAccountBinding.getRoot());
|
||||
myCountDownTimer = new MyCountDownTimer(60000, 1000);
|
||||
closeAccountBinding.aboutTitleBar.setOnBackIconClickListener(v -> {
|
||||
onBackPressed();
|
||||
});
|
||||
|
||||
countryBean = DataUtils.getLocCountry(CloseAccountActivity.this);
|
||||
bindInfo(IMKitClient.account());
|
||||
|
||||
|
||||
closeAccountBinding.sendSmsTv.setOnClickListener(v -> {
|
||||
toStep2();
|
||||
});
|
||||
|
||||
closeAccountBinding.tvCloseAccount.setOnClickListener(v -> {
|
||||
//确认注销账号
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
BindBean bean;
|
||||
|
||||
private void bindInfo(String user_uid) {
|
||||
Api.getInstance().bindInfo(user_uid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<BindBean>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||
bean = feedbackResp.data;
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
hideSoftInput(CloseAccountActivity.this);
|
||||
if (!TextUtils.isEmpty(bean.getAreaCode()) && !TextUtils.isEmpty(bean.getPhone())) {
|
||||
closeAccountBinding.sendSmsTipsTv.setText(Html.fromHtml(String.format(getString(R.string.djfsyzm_txt),
|
||||
bean.getAreaCode() + " " + bean.getPhone())));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
// WidgetUtils.showToast(getActivity(), msg, WidgetUtils.ToastType.ERROR);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void toStep2() {
|
||||
hideSoftInput(CloseAccountActivity.this);
|
||||
Map<String, String> maps = new HashMap<>();
|
||||
maps.put("phone", bean.getPhone());
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
Api.getInstance().sendSmsForSetPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<String>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
myCountDownTimer.start();
|
||||
ActionConfirmDialog actionConfirmDialog = new ActionConfirmDialog(CloseAccountActivity.this, getString(R.string.yzmyfs_txt), false);
|
||||
actionConfirmDialog.show();
|
||||
closeAccountBinding.sendSmsTipsTv.setText(Html.fromHtml(String.format(getString(R.string.djfsyzm_txt1),
|
||||
bean.getAreaCode() + " " + bean.getPhone())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
MyCountDownTimer myCountDownTimer;
|
||||
|
||||
//倒计时函数
|
||||
private class MyCountDownTimer extends CountDownTimer {
|
||||
|
||||
public MyCountDownTimer(long millisInFuture, long countDownInterval) {
|
||||
super(millisInFuture, countDownInterval);
|
||||
}
|
||||
|
||||
//计时过程
|
||||
@Override
|
||||
public void onTick(long l) {
|
||||
//防止计时过程中重复点击
|
||||
closeAccountBinding.sendSmsTv.setClickable(false);
|
||||
// getcodeTv.setTextColor(getResources().getColor(R.color.color_adb5bd));
|
||||
closeAccountBinding.sendSmsTv.setText(String.format(getString(R.string.get_code1_txt), (l / 1000)));
|
||||
|
||||
}
|
||||
|
||||
//计时完毕的方法
|
||||
@Override
|
||||
public void onFinish() {
|
||||
//重新给Button设置文字
|
||||
closeAccountBinding.sendSmsTv.setText(R.string.get_code_txt);
|
||||
//设置可点击
|
||||
closeAccountBinding.sendSmsTv.setClickable(true);
|
||||
// getcodeTv.setTextColor(getResources().getColor(R.color.colorAccent));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 隐藏软键盘
|
||||
*/
|
||||
public void hideSoftInput(Activity activity) {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (getCurrentFocus() != null && null != imm) {
|
||||
imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
// View view = activity.getCurrentFocus();
|
||||
//
|
||||
// if (view != null) {
|
||||
//
|
||||
// InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
//
|
||||
// inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
|
||||
private void showMainActivityAndFinish() {
|
||||
ALog.d(Constant.PROJECT_TAG, TAG, "showMainActivityAndFinish");
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, LoginActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
this.startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
public LoadingDialog loadingDialog;
|
||||
|
||||
public void showLoadingDialog() {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
public void showLoadingDialog(String msg) {
|
||||
if (loadingDialog == null)
|
||||
loadingDialog = new LoadingDialog(this);
|
||||
loadingDialog.setLoadingText(msg);
|
||||
loadingDialog.show();
|
||||
}
|
||||
|
||||
|
||||
public void dimessLoadingDialog() {
|
||||
if (loadingDialog != null) {
|
||||
loadingDialog.dismiss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if (null != this.getCurrentFocus()) {
|
||||
/**
|
||||
* 点击空白位置 隐藏软键盘
|
||||
*/
|
||||
InputMethodManager mInputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
return mInputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ public class PushBean {
|
||||
|
||||
public static List<PushBean> getList(){
|
||||
List<PushBean> typeBeans = new ArrayList<>();
|
||||
//0 群红包,1 私聊红包,2 转账,3 金币银币互转
|
||||
//0 群红包,1 私聊红包,2 赠送,3 金币银币互转
|
||||
typeBeans.add(new PushBean(0, IMApplication.getAppContext().getString(R.string.all_visible_txt)));
|
||||
typeBeans.add(new PushBean(1,IMApplication.getAppContext().getString(R.string.friend_visible_txt)));
|
||||
typeBeans.add(new PushBean(2,IMApplication.getAppContext().getString(R.string.onlyme_visible_txt)));
|
||||
|
||||
@@ -37,8 +37,8 @@ public class TypeBean {
|
||||
|
||||
public static List<TypeBean> getList(boolean isGold){
|
||||
List<TypeBean> typeBeans = new ArrayList<>();
|
||||
//0 群红包,1 私聊红包,2 转账,3 金币银币互转
|
||||
//0 群红包,1 私聊红包,2 转账,3 金币银币互转,4 充值,5 提现,6 直播间礼物,7 线下支付,8 第三方应用充值,
|
||||
//0 群红包,1 私聊红包,2 赠送,3 金币银币互转
|
||||
//0 群红包,1 私聊红包,2 赠送,3 金币银币互转,4 充值,5 提现,6 直播间礼物,7 线下支付,8 第三方应用充值,
|
||||
// 9 第三方应用提现,10 娃娃机收付款,11 电子游戏转入转出,12 管理员修改余额,13 牛牛下注冻结,14 牛牛结算,15 牛牛领包费
|
||||
typeBeans.add(new TypeBean(-1, IMApplication.getAppContext().getString(R.string.all_billing_txt)));
|
||||
if(isGold) {
|
||||
|
||||
@@ -375,7 +375,7 @@ public interface ApiService {
|
||||
Observable<Result<RedpacketGroupBean>> redGroupGiftPacketInfo(@Path("recordId") String userId);
|
||||
|
||||
/**
|
||||
* 发起转账
|
||||
* 发起赠送
|
||||
*/
|
||||
@POST("/wallet/transferMoney/initiate")
|
||||
Observable<Result<TransferBean>> transferMoney(@Body Map<String, Object> requestBody);
|
||||
@@ -384,19 +384,19 @@ public interface ApiService {
|
||||
Observable<Result> transferCashPay(@Body Map<String, Object> requestBody);
|
||||
|
||||
/**
|
||||
* 接收转账
|
||||
* 接收赠送
|
||||
*/
|
||||
@POST("/wallet/transferMoney/receive")
|
||||
Observable<Result<TransferBean>> receiveTransferMoney(@Body Map<String, Object> requestBody);
|
||||
|
||||
/**
|
||||
* 转账详情
|
||||
* 赠送详情
|
||||
*/
|
||||
@GET("/wallet/transferMoney/{recordId}")
|
||||
Observable<Result<TransferBean>> receiveTransferMoney(@Path("recordId") String recordId);
|
||||
|
||||
/**
|
||||
* 退回转账
|
||||
* 退回赠送
|
||||
*/
|
||||
@POST("/wallet/transferMoney/return")
|
||||
Observable<Result<TransferBean>> transferMoneyReturn(@Body Map<String, Object> requestBody);
|
||||
@@ -994,7 +994,7 @@ public interface ApiService {
|
||||
|
||||
|
||||
/**
|
||||
* 获取转账开关配置
|
||||
* 获取赠送开关配置
|
||||
*/
|
||||
@GET("/config/list")
|
||||
Observable<Result<List<ConfigBean>>> getConfig();
|
||||
|
||||
@@ -580,7 +580,7 @@ public class PaymentActivity1 extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
/*************************************************以下是去转账的流程***************************************************************/
|
||||
/*************************************************以下是去赠送的流程***************************************************************/
|
||||
private LinearLayout layoutSelectorroot;
|
||||
private BackTitleBar title;
|
||||
private EditText editSelectorFriends;
|
||||
@@ -935,7 +935,7 @@ public class PaymentActivity1 extends BaseActivity {
|
||||
|
||||
|
||||
}
|
||||
/*************************************************以上是去转账的流程***************************************************************/
|
||||
/*************************************************以上是去赠送的流程***************************************************************/
|
||||
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if(null != this.getCurrentFocus()){
|
||||
|
||||
@@ -64,7 +64,7 @@ public class TransferAccountsActivity extends BaseActivity {
|
||||
|
||||
LoginBean u;
|
||||
WalletBean walletBean;
|
||||
float number = 0;
|
||||
int number = 0;
|
||||
PayCashFingerDialog payCashFingerDialog;
|
||||
PayCashDialog payDialog;
|
||||
private boolean isJinBi = false;
|
||||
@@ -107,13 +107,13 @@ public class TransferAccountsActivity extends BaseActivity {
|
||||
ToastX.showShortToast(R.string.zzjebnwk_txt);
|
||||
return;
|
||||
}
|
||||
float number1 = Float.parseFloat(viewBinding.numberHintEt.getText().toString().trim()) * 100;
|
||||
LogUtils.i("红包金额:" + number1);
|
||||
if (number1 < 1) {
|
||||
ToastX.showShortToast(R.string.zzjebnsy_txt);
|
||||
|
||||
return;
|
||||
}
|
||||
// long number1 = Long.parseLong(viewBinding.numberHintEt.getText().toString().trim()) * 100;
|
||||
// LogUtils.i("红包金额:" + number1);
|
||||
// if (number1 < 1) {
|
||||
// ToastX.showShortToast(R.string.zzjebnsy_txt);
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (walletBean != null) {
|
||||
if (Float.parseFloat(viewBinding.numberHintEt.getText().toString().trim()) > (isJinBi ? walletBean.getGoldCoin() / 100f : walletBean.getSilverCoin() / 100f)) {
|
||||
@@ -146,7 +146,7 @@ public class TransferAccountsActivity extends BaseActivity {
|
||||
|
||||
return;
|
||||
}
|
||||
number = Float.parseFloat(viewBinding.numberHintEt.getText().toString().trim());
|
||||
number = Integer.parseInt(viewBinding.numberHintEt.getText().toString().trim());
|
||||
|
||||
// if(DataUtils.get(TransferAccountsActivity.this, "hasMianMi", false)){
|
||||
// toChange(null, number,2);
|
||||
@@ -332,7 +332,7 @@ public class TransferAccountsActivity extends BaseActivity {
|
||||
// }
|
||||
}
|
||||
|
||||
private void toChange(String password, float number, int type) {
|
||||
private void toChange(String password, long number, int type) {
|
||||
hideSoftInput(this);
|
||||
HashMap<String, Object> maps = new HashMap<>();
|
||||
maps.put("amount", (int) (number * 100));
|
||||
|
||||
@@ -409,7 +409,7 @@ public class TransferInfoActivity extends BaseActivity
|
||||
|
||||
NimUserInfo nimUserInfo = NIMClient.getService(UserService.class).getUserInfo(transferBean.getReceiverUid()+"");
|
||||
if(nimUserInfo!=null){
|
||||
// viewBinding.titleTvv.setText("来自%s的金币转账")
|
||||
// viewBinding.titleTvv.setText("来自%s的金币赠送")
|
||||
if(transferBean.getCoinType().equals(0)) {
|
||||
viewBinding.titleTvv.setText(String.format(getString(R.string.xiangshuijinbi_txt),nimUserInfo.getName()));
|
||||
}else{
|
||||
@@ -447,7 +447,7 @@ public class TransferInfoActivity extends BaseActivity
|
||||
|
||||
NimUserInfo nimUserInfo = NIMClient.getService(UserService.class).getUserInfo(transferBean.getSenderUid()+"");
|
||||
if(nimUserInfo!=null){
|
||||
// viewBinding.titleTvv.setText("来自%s的金币转账")
|
||||
// viewBinding.titleTvv.setText("来自%s的金币赠送")
|
||||
if(transferBean.getCoinType().equals(0)) {
|
||||
viewBinding.titleTvv.setText(String.format(getString(R.string.xiangshuijinbi_txt1),nimUserInfo.getName()));
|
||||
}else{
|
||||
|
||||
@@ -36,7 +36,7 @@ public class QRCodeScheme {
|
||||
/** 2维码内容前缀:储币机兑币 */
|
||||
public final static String QR_CODE_PSCHEME_PAYMENT_BEAD = "time_go_chat://payment_bead/";
|
||||
/**
|
||||
* 2维码内容前缀:商家码转账
|
||||
* 2维码内容前缀:商家码赠送
|
||||
*/
|
||||
public final static String QR_CODE_PSCHEME_BIZ_RECEIVE = "time_go_chat://biz_receive_qr_code/";
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ public class GiftInfoFragment extends BaseFragment {
|
||||
|
||||
|
||||
private String getTypeNoteString(BillBean s) {
|
||||
//0 群红包,1 私聊红包,2 转账,3 金币银币互转
|
||||
//0 群红包,1 私聊红包,2 赠送,3 金币银币互转
|
||||
|
||||
|
||||
if (s.getType() == 1) {
|
||||
|
||||
@@ -315,13 +315,13 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
}
|
||||
}
|
||||
|
||||
//转账给商家 type 31
|
||||
//赠送给商家 type 31
|
||||
private String getAmount(BillBean s, long amount) {
|
||||
return status == 1 && s.getType() == 31 ? String.valueOf(amount) : AppUtils.getQian(amount);
|
||||
}
|
||||
|
||||
private String getTypeNoteString(BillBean s) {
|
||||
//0 群红包,1 私聊红包,2 转账,3 金币银币互转
|
||||
//0 群红包,1 私聊红包,2 赠送,3 金币银币互转
|
||||
|
||||
if (status == 1) {
|
||||
if (s.getType() == 1) {
|
||||
@@ -363,7 +363,7 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
return getString(R.string.yinbizhuanzhang_tuikuan_txt);
|
||||
}
|
||||
|
||||
String name = "转账";
|
||||
String name = "赠送";
|
||||
// RosterElementEntity friendInfo = MyApplication.getInstance2().getIMClientManager().getFriendsListProvider().getFriendInfoByUid2(s.getFromUserId() + "");
|
||||
NimUserInfo friendInfo = NIMClient.getService(UserService.class).getUserInfo(s.getFromUserId() + "");
|
||||
|
||||
@@ -375,7 +375,7 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
}
|
||||
return name;
|
||||
} else {
|
||||
String name = "红利积分转账";
|
||||
String name = "红利积分赠送";
|
||||
NimUserInfo friendInfo = NIMClient.getService(UserService.class).getUserInfo(s.getToUserId() + "");
|
||||
// ** 显示头像和昵称
|
||||
if (friendInfo != null) {
|
||||
@@ -507,7 +507,7 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
return getString(R.string.jinbizhuanzhang_tk_txt);
|
||||
}
|
||||
|
||||
String name = "转账";
|
||||
String name = "赠送";
|
||||
// RosterElementEntity friendInfo = MyApplication.getInstance2().getIMClientManager().getFriendsListProvider().getFriendInfoByUid2(s.getFromUserId() + "");
|
||||
NimUserInfo friendInfo = NIMClient.getService(UserService.class).getUserInfo(s.getFromUserId() + "");
|
||||
|
||||
@@ -519,7 +519,7 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
}
|
||||
return name;
|
||||
} else {
|
||||
String name = "转账";
|
||||
String name = "赠送";
|
||||
// RosterElementEntity friendInfo = MyApplication.getInstance2().getIMClientManager().getFriendsListProvider().getFriendInfoByUid2(s.getToUserId() + "");
|
||||
NimUserInfo friendInfo = NIMClient.getService(UserService.class).getUserInfo(s.getToUserId() + "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user