第N+2次提交
This commit is contained in:
@@ -95,11 +95,11 @@ public class IMApplication extends MultiDexApplication {
|
||||
public static String schemeTeamId = null;
|
||||
public static String schemeSilverQrCode = null;
|
||||
public static String fcmpayload = "";
|
||||
|
||||
public static IMApplication getInstance() {
|
||||
return AppContext;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
@@ -280,8 +280,8 @@ public class IMApplication extends MultiDexApplication {
|
||||
}
|
||||
|
||||
private void initUIKit() {
|
||||
SDKOptions options = NimSDKOptionConfig.getSDKOptions(this, DataUtils.readAppKey(this));
|
||||
IMKitClient.init(this, getLoginInfo(), options);
|
||||
SDKOptions sdkOptions = NimSDKOptionConfig.getSDKOptions(this, DataUtils.readAppKey(this));
|
||||
IMKitClient.init(this, getLoginInfo(), sdkOptions);
|
||||
ALog.d(Constant.PROJECT_TAG, TAG, "initUIKit");
|
||||
|
||||
if (IMKitUtils.isMainProcess(this)) {
|
||||
@@ -325,7 +325,7 @@ public class IMApplication extends MultiDexApplication {
|
||||
private SDKOptions options() {
|
||||
SDKOptions options = new SDKOptions();
|
||||
//此处仅设置appkey,其他设置请自行参看信令文档设置 :https://dev.yunxin.163.com/docs/product/信令/SDK开发集成/Android开发集成/初始化
|
||||
options.appKey = "4cb6b0998f9e7af9d7673963e429959a";
|
||||
options.appKey = "23c9cbddd4b876908efdccd0a6f2638d";
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class IMUIKitConfig {
|
||||
|
||||
public static String bucketName = "letschat";//shenqi777
|
||||
|
||||
public static String OSS_URL = "https://qn.hnsdl.com/";
|
||||
public static String OSS_URL = "https://static.bijr3t.com/";
|
||||
|
||||
public static String AVATAR_DOWNLOAD_CONTROLLER_URL_ROOT = OSS_URL + "%s";
|
||||
|
||||
|
||||
@@ -470,7 +470,9 @@ public class UserInfoActivity extends BaseActivity {
|
||||
maps.put("page", 1);
|
||||
maps.put("size", 1);
|
||||
maps.put("selectType", 2);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().posts(accId, maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -191,7 +191,9 @@ public class PayDialog extends Dialog implements View.OnClickListener {
|
||||
private void checkPayPassword(){
|
||||
Map<String,String> maps= new HashMap<>();
|
||||
maps.put("payPassword",psw);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().checkPayPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
116
app/src/main/java/com/hbl/lewan/dialog/SelectBanksDialog.java
Normal file
116
app/src/main/java/com/hbl/lewan/dialog/SelectBanksDialog.java
Normal file
@@ -0,0 +1,116 @@
|
||||
package com.hbl.lewan.dialog;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.hbl.lewan.R;
|
||||
import com.hbl.lewan.adapter.CommonAdapter;
|
||||
import com.hbl.lewan.adapter.ViewHolder;
|
||||
import com.hbl.lewan.databinding.DialogSelectBanksBinding;
|
||||
import com.hbl.lewan.databinding.DialogSelectTypeBinding;
|
||||
import com.hbl.lewan.model.BankBean;
|
||||
import com.hbl.lewan.model.TiXianConfBean;
|
||||
import com.hbl.lewan.model.TypeBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class SelectBanksDialog extends Dialog {
|
||||
List<BankBean> menuActions = new ArrayList<>();
|
||||
DialogSelectBanksBinding dialogSelectTypeBinding;
|
||||
TiXianConfBean tiXianConfBean;
|
||||
BankBean bankBean;
|
||||
|
||||
public SelectBanksDialog(Context context, TiXianConfBean tiXianConfBean, List<BankBean> list, BankBean bankBean) {
|
||||
super(context, R.style.MaterialDesignDialog);
|
||||
dialogSelectTypeBinding = DialogSelectBanksBinding.inflate(getLayoutInflater());
|
||||
setContentView(dialogSelectTypeBinding.getRoot());
|
||||
this.tiXianConfBean = tiXianConfBean;
|
||||
this.menuActions = list;
|
||||
this.bankBean = bankBean;
|
||||
}
|
||||
|
||||
OnToTypeListener onNextCallListener;
|
||||
|
||||
public interface OnToTypeListener {
|
||||
void toType(BankBean type);
|
||||
void toBind(TiXianConfBean tiXianConfBean);
|
||||
|
||||
}
|
||||
|
||||
public void setOnToVipListener(OnToTypeListener onNextCallListener) {
|
||||
this.onNextCallListener = onNextCallListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
dialogSelectTypeBinding.coloseIv.setOnClickListener(v -> dismiss());
|
||||
dialogSelectTypeBinding.recycler.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
CommonAdapter commonAdapter = new CommonAdapter<BankBean>(getContext(), R.layout.item_type_banks, menuActions) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, BankBean s, int index) {
|
||||
holder.setText(R.id.item_bg, s.getCardholderName() + " " + s.getBankName() + " " + s.getNumber());
|
||||
TextView textView = holder.getView(R.id.item_bg);
|
||||
ImageView duigou_iv = holder.getView(R.id.duigou_iv);
|
||||
if(bankBean!=null) {
|
||||
if (bankBean.getId() == s.getId()) {
|
||||
duigou_iv.setImageResource(R.mipmap.dialog_gou_tt);
|
||||
} else {
|
||||
duigou_iv.setImageResource(R.mipmap.dialog_gou_ff);
|
||||
}
|
||||
}
|
||||
holder.getView(R.id.item_bg1).setOnClickListener(v -> {
|
||||
dismiss();
|
||||
notifyDataSetChanged();
|
||||
if (onNextCallListener != null) {
|
||||
onNextCallListener.toType(s);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
if (tiXianConfBean.getType() == 1) {
|
||||
dialogSelectTypeBinding.titleTv.setText("请选择银行卡");
|
||||
dialogSelectTypeBinding.toBindTipsTv.setText("暂未绑定银行卡,点击去绑定");
|
||||
}
|
||||
if(menuActions!=null&&menuActions.size()>0){
|
||||
dialogSelectTypeBinding.recycler.setVisibility(View.VISIBLE);
|
||||
dialogSelectTypeBinding.noBindLy.setVisibility(View.GONE);
|
||||
}else{
|
||||
dialogSelectTypeBinding.recycler.setVisibility(View.GONE);
|
||||
dialogSelectTypeBinding.noBindLy.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
dialogSelectTypeBinding.toBindBt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
if(onNextCallListener!=null ){
|
||||
onNextCallListener.toBind(tiXianConfBean);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
dialogSelectTypeBinding.recycler.setAdapter(commonAdapter);
|
||||
Window window = getWindow();
|
||||
WindowManager.LayoutParams wlp = window.getAttributes();
|
||||
wlp.gravity = Gravity.BOTTOM;
|
||||
wlp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
wlp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
|
||||
window.setAttributes(wlp);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -92,7 +92,9 @@ public class FunAddFriendActivity extends BaseAddFriendActivity implements BaseA
|
||||
public void doSearch(String idOrPhone) {
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
maps.put("idOrPhone", idOrPhone);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
Api.getInstance().userSearch(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
@@ -221,7 +221,9 @@ public class ChongZhiActivity extends BaseActivity {
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
maps.put("verifyCode", passwordCode);
|
||||
maps.put("newPassword", activityWelcomeBinding.passwordEt.getText().toString().trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().smsSetPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -306,7 +306,9 @@ public class PhoneLoginActivity extends BaseActivity {
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
maps.put("phone", String.valueOf(activityWelcomeBinding.passwordEt.getText()).trim());
|
||||
maps.put("areaCode", String.valueOf(activityWelcomeBinding.areaTv.getText()).trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().registered(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -394,7 +396,9 @@ public class PhoneLoginActivity extends BaseActivity {
|
||||
maps.put("verifyCode", String.valueOf(passwordCode));
|
||||
maps.put("deviceType", 0);
|
||||
maps.put("deviceId", GetAndroidUniqueMark.getUniqueId(PhoneLoginActivity.this));
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().smsLogin(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -240,7 +240,7 @@ public class MainActivity extends BaseActivity {
|
||||
// private ChatMainFragment chatMainFragment;
|
||||
// private ChatMain2Fragment chatMain2Fragment;
|
||||
// private ChatTabFragment chatTabFragment;
|
||||
private VoomFragment voomFragment;
|
||||
// private VoomFragment voomFragment;
|
||||
private MineFragment walletFragment;
|
||||
FragmentAdapter fragmentAdapter;
|
||||
|
||||
@@ -774,16 +774,16 @@ public class MainActivity extends BaseActivity {
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
// index2Fragment = new HomeFragment();
|
||||
chatTabFragment = new ChatTabFragment();
|
||||
voomFragment = new VoomFragment();
|
||||
// voomFragment = new VoomFragment();
|
||||
walletFragment = new MineFragment();
|
||||
// fragments.add(index2Fragment);
|
||||
fragments.add(chatTabFragment);
|
||||
if(ApiService.AREA_CODE.equals("+86")) {
|
||||
fragments.add(voomFragment);
|
||||
activityMainBinding.liveBtnGroup.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
activityMainBinding.liveBtnGroup.setVisibility(View.GONE);
|
||||
}
|
||||
// if(ApiService.AREA_CODE.equals("+86")) {
|
||||
// fragments.add(voomFragment);
|
||||
// activityMainBinding.liveBtnGroup.setVisibility(View.VISIBLE);
|
||||
// }else{
|
||||
// activityMainBinding.liveBtnGroup.setVisibility(View.GONE);
|
||||
// }
|
||||
fragments.add(walletFragment);
|
||||
|
||||
fragmentAdapter = new FragmentAdapter(this);
|
||||
@@ -1563,7 +1563,7 @@ public class MainActivity extends BaseActivity {
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
} else if (mCurrentTab == activityMainBinding.myselfBtnGroup) {
|
||||
// if(ApiService.AREA_CODE.equals("+86")) {
|
||||
activityMainBinding.viewPager.setCurrentItem(2, false);
|
||||
activityMainBinding.viewPager.setCurrentItem(1, false);
|
||||
// }else{
|
||||
// activityMainBinding.viewPager.setCurrentItem(1, false);
|
||||
// }
|
||||
@@ -1883,7 +1883,9 @@ public class MainActivity extends BaseActivity {
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
String lauguage = DataUtils.getLauguage(MainActivity.this);
|
||||
maps.put("language", lauguage);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
Api.getInstance().authUser(IMKitClient.account(), maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
@@ -229,7 +229,7 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
||||
registerObserver();
|
||||
EventCenter.registerEventNotify(changeDraftEvent);
|
||||
if (conversationType != 1) {
|
||||
getNotifiesCount();
|
||||
// getNotifiesCount();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -243,27 +243,27 @@ public class ChatConversationFragment extends BaseFragment implements ILoadListe
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<NotifyCountBean> feedbackResp) {
|
||||
LogUtils.i("获取到的错误:" + feedbackResp + "" + feedbackResp.data);
|
||||
String groupId = feedbackResp.data.getGroupId();
|
||||
if (!TextUtils.isEmpty(groupId)) {
|
||||
try {
|
||||
JSONArray array = new JSONArray(groupId);
|
||||
if (array.length() > 0) {
|
||||
String values = array.getString(0);
|
||||
if (!TextUtils.isEmpty(values)) {
|
||||
String[] groupIdStr = values.split(",");
|
||||
if(ApiService.AREA_CODE.equals("+86")) {
|
||||
groupIds.addAll(Arrays.asList(groupIdStr));
|
||||
LogUtils.i("获取到的错误1:" + groupIds);
|
||||
queryTeamInfo();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
// LogUtils.i("获取到的错误:" + feedbackResp + "" + feedbackResp.data);
|
||||
// String groupId = feedbackResp.data.getGroupId();
|
||||
// if (!TextUtils.isEmpty(groupId)) {
|
||||
// try {
|
||||
// JSONArray array = new JSONArray(groupId);
|
||||
// if (array.length() > 0) {
|
||||
// String values = array.getString(0);
|
||||
// if (!TextUtils.isEmpty(values)) {
|
||||
// String[] groupIdStr = values.split(",");
|
||||
// if(ApiService.AREA_CODE.equals("+86")) {
|
||||
// groupIds.addAll(Arrays.asList(groupIdStr));
|
||||
// LogUtils.i("获取到的错误1:" + groupIds);
|
||||
// queryTeamInfo();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// } catch (JSONException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
package com.hbl.lewan.main.mine;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.codersun.fingerprintcompat.AonFingerChangeCallback;
|
||||
import com.codersun.fingerprintcompat.FingerManager;
|
||||
import com.codersun.fingerprintcompat.SimpleFingerCheckCallback;
|
||||
import com.hbl.lewan.IMApplication;
|
||||
import com.hbl.lewan.IMUIKitConfig;
|
||||
import com.hbl.lewan.R;
|
||||
import com.hbl.lewan.adapter.CommonAdapter;
|
||||
import com.hbl.lewan.adapter.ViewHolder;
|
||||
import com.hbl.lewan.databinding.ActivityAccountListBinding;
|
||||
import com.hbl.lewan.databinding.ActivityBuyAccountBinding;
|
||||
import com.hbl.lewan.databinding.ActivityShimingBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
import com.hbl.lewan.dialog.PayCashDialog;
|
||||
import com.hbl.lewan.dialog.PayCashFingerDialog;
|
||||
import com.hbl.lewan.dialog.PayDialog;
|
||||
import com.hbl.lewan.dialog.SelectPayTypeDialog;
|
||||
import com.hbl.lewan.game.JsBridgeActivity;
|
||||
import com.hbl.lewan.login.PhoneLoginActivity;
|
||||
import com.hbl.lewan.main.MainActivity;
|
||||
import com.hbl.lewan.model.AccountsBean;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.ExchangeConfBean;
|
||||
import com.hbl.lewan.model.LoginBean;
|
||||
import com.hbl.lewan.model.PayInfoBean;
|
||||
import com.hbl.lewan.model.StaffServiceIdBean;
|
||||
import com.hbl.lewan.model.TopUpBean;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
import com.hbl.lewan.network.BaseObserver;
|
||||
import com.hbl.lewan.network.Result;
|
||||
import com.hbl.lewan.pay.CollectionAndPaymentActivity;
|
||||
import com.hbl.lewan.utils.Constant;
|
||||
import com.hbl.lewan.utils.DataUtils;
|
||||
import com.hbl.lewan.utils.GetAndroidUniqueMark;
|
||||
import com.hbl.lewan.utils.GsonUtils;
|
||||
import com.hbl.lewan.utils.LogUtils;
|
||||
import com.hbl.lewan.wallet.SetPayPasswordActivity;
|
||||
import com.hbl.lewan.wallet.TopUpActivity;
|
||||
import com.hbl.lewan.widget.CircleImageView;
|
||||
import com.netease.nimlib.sdk.auth.LoginInfo;
|
||||
import com.netease.yunxin.kit.alog.ALog;
|
||||
import com.netease.yunxin.kit.chatkit.ui.common.RxBus;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
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.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
public class AccoutListActivity extends BaseActivity {
|
||||
ActivityAccountListBinding viewBinding;
|
||||
|
||||
CommonAdapter commonAdapter;
|
||||
|
||||
ArrayList<AccountsBean> globalAmountList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
getWindow().setNavigationBarColor(getResources().getColor(R.color.color_f6f5f7));
|
||||
super.onCreate(savedInstanceState);
|
||||
viewBinding = ActivityAccountListBinding.inflate(getLayoutInflater());
|
||||
setContentView(viewBinding.getRoot());
|
||||
initView();
|
||||
}
|
||||
|
||||
protected void initView() {
|
||||
viewBinding.contactListActivityTitleBar.getBackImageView().setOnClickListener(v -> finish());
|
||||
iniAdapter();
|
||||
accounts();
|
||||
}
|
||||
|
||||
|
||||
private void accounts() {
|
||||
Api.getInstance().accounts()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<AccountsBean>> feedbackResp) {
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
globalAmountList = (ArrayList<AccountsBean>) feedbackResp.data;
|
||||
commonAdapter.setDates(globalAmountList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast(msg);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void iniAdapter() {
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(AccoutListActivity.this);
|
||||
viewBinding.recycler.setLayoutManager(linearLayoutManager);
|
||||
commonAdapter = new CommonAdapter<>(AccoutListActivity.this, R.layout.item_account, globalAmountList) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, AccountsBean s, int index) {
|
||||
//{"userId":61330234,"phone":"jue00lie","nickname":"jue00lie","avatar":null}
|
||||
holder.setText(R.id.title_tv, s.getNickname());
|
||||
holder.setText(R.id.des_tv, "ID:" + s.getUserId());
|
||||
CircleImageView item_iv = holder.getView(R.id.item_iv);
|
||||
Glide.with(AccoutListActivity.this).load(s.getAvatar()).placeholder(R.mipmap.default_head_img).error(R.mipmap.default_head_img).into(item_iv);
|
||||
TextView dqsy_tv = holder.getView(R.id.dqsy_tv);
|
||||
if (IMKitClient.account().equals(s.getUserId() + "")) {
|
||||
dqsy_tv.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
dqsy_tv.setVisibility(View.GONE);
|
||||
}
|
||||
TextView unreadTv = holder.getView(R.id.unreadTv);
|
||||
unreadTv.setVisibility(View.GONE);
|
||||
|
||||
if (index == 0) {
|
||||
unreadTv.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
holder.getView(R.id.big_bg).setOnClickListener(v -> {
|
||||
|
||||
if (IMKitClient.account().equals(s.getUserId() + "")) {
|
||||
return;
|
||||
} else {
|
||||
changeUser(s);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
viewBinding.recycler.setAdapter(commonAdapter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void changeUser(AccountsBean s) {
|
||||
|
||||
Api.getInstance().changeAccount(s.getUserId()+"")
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<LoginBean> feedbackResp) {
|
||||
|
||||
if (TextUtils.isEmpty(feedbackResp.data.getUser().getChatToken())) {
|
||||
ActionConfirmDialog actionConfirmDialog = new ActionConfirmDialog(AccoutListActivity.this, getString(R.string.zhbhf_jqsb_txt), false);
|
||||
actionConfirmDialog.show();
|
||||
return;
|
||||
}
|
||||
feedbackResp.data.setIsBiz(feedbackResp.data.getUser().getIsBiz());
|
||||
feedbackResp.data.setAllowGiftCoin(feedbackResp.data.getUser().getAllowGiftCoin());
|
||||
DataUtils.set(AccoutListActivity.this, "login_bean", GsonUtils.beanToJSONString(feedbackResp.data));
|
||||
// loginIM(o.data.getUser_uid(), o.data.getChatToken());
|
||||
LogUtils.i("用户信息:" + feedbackResp.data.getUser_uid() + ";;" + feedbackResp.data.getUser().getChatToken());
|
||||
loginIM(feedbackResp.data.getUser_uid(), feedbackResp.data.getUser().getChatToken());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void loginIM(String account, String token) {
|
||||
ALog.d(Constant.PROJECT_TAG, AccoutListActivity.class.getName(), "loginIM");
|
||||
// activityWelcomeBinding.getRoot().setVisibility(View.GONE);
|
||||
LoginInfo loginInfo =
|
||||
LoginInfo.LoginInfoBuilder.loginInfoDefault(account, token)
|
||||
.withAppKey(DataUtils.readAppKey(this))
|
||||
.build();
|
||||
IMKitClient.loginIM(
|
||||
loginInfo,
|
||||
new LoginCallback<>() {
|
||||
@Override
|
||||
public void onError(int errorCode, @NonNull String errorMsg) {
|
||||
ToastX.showShortToast(
|
||||
String.format(getResources().getString(R.string.login_fail), errorCode));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(@Nullable LoginInfo data) {
|
||||
DataUtils.set(AccoutListActivity.this, IMUIKitConfig.LOGIN_ACCOUNT, account);
|
||||
DataUtils.set(AccoutListActivity.this, IMUIKitConfig.LOGIN_TOKEN, token);
|
||||
DataUtils.set(AccoutListActivity.this, "last_login_time", System.currentTimeMillis());
|
||||
|
||||
showMainActivityAndFinish();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void showMainActivityAndFinish() {
|
||||
ALog.d(Constant.PROJECT_TAG, AccoutListActivity.class.getName(), "showMainActivityAndFinish");
|
||||
RxBus.getInstance().post(117765); //5秒
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.setClass(this, MainActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
this.startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -112,50 +112,82 @@ public class BuyAccountActivity extends BaseActivity implements SelectPayTypeDi
|
||||
viewBinding.sumbitBt.setOnClickListener(v -> {
|
||||
|
||||
|
||||
// if(TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())){
|
||||
// ToastX.showShortToast("请输入您的真实姓名");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if(TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())){
|
||||
// ToastX.showShortToast("请输入您本人的身份证号码");
|
||||
// return;
|
||||
// }
|
||||
if(TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())){
|
||||
ToastX.showShortToast("请输入前缀");
|
||||
return;
|
||||
}
|
||||
if(TextUtils.isEmpty(viewBinding.nameEt1.getText().toString().trim())){
|
||||
ToastX.showShortToast("请输入后缀");
|
||||
return;
|
||||
}
|
||||
if(TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())){
|
||||
ToastX.showShortToast("请输入您想要设置的密码");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(viewBinding.numberEt1.getText().toString().trim())){
|
||||
ToastX.showShortToast("请输入您想要设置的确认密码");
|
||||
return;
|
||||
}
|
||||
if(!viewBinding.numberEt1.getText().toString().trim().equals(viewBinding.numberEt.getText().toString().trim())){
|
||||
ToastX.showShortToast("密码和确认密码不一致");
|
||||
return;
|
||||
}
|
||||
LoginBean loginBean = DataUtils.getLocUserInfo();
|
||||
if (loginBean != null && loginBean.getUser() != null) {
|
||||
if (loginBean.getUser().getForbidQCoin() == 1) {
|
||||
Map<String, Object> map1 = new HashMap<>();
|
||||
map1.put("code", 0);
|
||||
map1.put("error", "金币被封禁");
|
||||
toRengong();
|
||||
return;
|
||||
}
|
||||
// PayDialog payDialog = new PayDialog(BuyAccountActivity.this, "68", false);
|
||||
// payDialog.setOntoAlbumListener(new PayDialog.OnListItemClickListener() {
|
||||
// @Override
|
||||
// public void onPayPass(String position) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void dimess() {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// payDialog.show();
|
||||
PayDialog payDialog = new PayDialog(BuyAccountActivity.this, "68", false);
|
||||
payDialog.setOntoAlbumListener(new PayDialog.OnListItemClickListener() {
|
||||
@Override
|
||||
public void onPayPass(String position) {
|
||||
buyAccount(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dimess() {
|
||||
|
||||
if (DataUtils.get(BuyAccountActivity.this, "hasFinger", false)) {
|
||||
showPayCashFingerDialog();
|
||||
} else {
|
||||
showPayCashDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
payDialog.show();
|
||||
|
||||
//
|
||||
// if (DataUtils.get(BuyAccountActivity.this, "hasFinger", false)) {
|
||||
// showPayCashFingerDialog();
|
||||
// } else {
|
||||
// showPayCashDialog();
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void buyAccount(String pass) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("prefix",viewBinding.nameEt.getText().toString().trim());
|
||||
map.put("postfix",viewBinding.nameEt1.getText().toString().trim());
|
||||
map.put("password",viewBinding.numberEt.getText().toString().trim());
|
||||
map.put("payPassword",pass);
|
||||
Api.getInstance().buyAccount(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result>() {
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
// toRengongCallTop(feedbackResp.data.getStaffServiceId(), feedbackResp.data.getStaffServiceNickname());
|
||||
startActivity(new Intent(BuyAccountActivity.this,AccoutListActivity.class));
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
// WidgetUtils.showToast(JsBridgeActivity.this, msg, WidgetUtils.ToastType.ERROR);
|
||||
// toRengongCall(400227);
|
||||
ToastX.showShortToast(msg);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void showPayCashDialog() {
|
||||
|
||||
@@ -381,7 +381,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
maps.put("phone", String.valueOf(binding.loginFormUidEdit.getText()).trim());
|
||||
maps.put("areaCode", countryBean.getAreaCodeName());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
showLoadingDialog();
|
||||
Api.getInstance().registered(maps)
|
||||
@@ -419,7 +421,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
maps.put("verifyCode", String.valueOf(binding.passwordEditText.getText()).trim());
|
||||
maps.put("phone", phone);
|
||||
maps.put("areaCode", areaCode);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().preCheckVerifyCode(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -454,7 +458,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
maps.put("verifyCode", String.valueOf(binding.passwordEditText.getText()).trim());
|
||||
maps.put("phone", phone);
|
||||
maps.put("areaCode", areaCode);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().preCheckVerifyCode(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -501,7 +507,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
maps.put("newAreaCode", countryBean.getAreaCodeName());
|
||||
maps.put("changeVerifyCode", getIntent().getStringExtra("password"));
|
||||
maps.put("bindVerifyCode", binding.passwordEditText.getText().toString().trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().smsChangeBindPhone(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -526,7 +534,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
maps.put("newAreaCode", countryBean.getAreaCodeName());
|
||||
maps.put("password", getIntent().getStringExtra("password"));
|
||||
maps.put("bindVerifyCode", binding.passwordEditText.getText().toString().trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().passwordChangeBindPhone(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -575,7 +585,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
maps.put("phone", binding.loginFormUidEdit.getText().toString().trim());
|
||||
maps.put("areaCode", countryBean.getAreaCodeName());
|
||||
maps.put("verifyCode", binding.passwordEditText.getText().toString().trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().bindPhone(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -604,7 +616,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
maps.put("areaCode", countryBean.getAreaCodeName());
|
||||
maps.put("verifyCode", binding.passwordEditText.getText().toString().trim());
|
||||
maps.put("newPassword", binding.passwordText.getText().toString().trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().smsSetPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -636,7 +650,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
maps.put("verifyCode", binding.passwordEditText.getText().toString().trim());
|
||||
maps.put("payPassword", passwordCode);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().setPayPasswordByVerifyCode(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -666,7 +682,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
maps.put("verifyCode", binding.passwordEditText.getText().toString().trim());
|
||||
maps.put("newPassword", binding.passwordText.getText().toString().trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().smsSetPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -836,7 +854,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
Map<String, String> maps = new HashMap<>();
|
||||
maps.put("phone", type == TYPE_CHANGE_PASSWORD ? bean.getPhone() : binding.loginFormUidEdit.getText().toString().trim());
|
||||
maps.put("areaCode", type == TYPE_CHANGE_PASSWORD ? bean.getAreaCode() : countryBean.getAreaCodeName());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().sendSmsForSetPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -860,7 +880,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
Map<String, String> maps = new HashMap<>();
|
||||
maps.put("phone", binding.loginFormUidEdit.getText().toString().trim());
|
||||
maps.put("areaCode", countryBean.getAreaCodeName());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().sendSmsForBindPhone(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -885,7 +907,9 @@ public class ChangeAccoutActionActivity extends BaseActivity {
|
||||
Map<String, String> maps = new HashMap<>();
|
||||
maps.put("phone", bean.getPhone());
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().sendSmsForSetPayPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -268,7 +268,9 @@ public class ChangePasswordActivity extends BaseActivity {
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
maps.put("verifyCode",viewBinding. passwordEditText.getText().toString().trim());
|
||||
maps.put("newPassword", viewBinding. passwordText.getText().toString().trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().smsSetPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -369,7 +371,9 @@ public class ChangePasswordActivity extends BaseActivity {
|
||||
Map<String, String> maps = new HashMap<>();
|
||||
maps.put("phone", String.valueOf(viewBinding.loginFormUidEdit.getText()).trim());
|
||||
maps.put("areaCode", String.valueOf(viewBinding.areaTv.getText()).trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().sendSmsForSetPassword(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -350,7 +350,9 @@ public class ChangePhoneActivity extends BaseActivity {
|
||||
maps.put("verifyCode", passwordOld);
|
||||
maps.put("phone", bean.getPhone());
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
Api.getInstance().preCheckVerifyCode(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -392,7 +394,9 @@ public class ChangePhoneActivity extends BaseActivity {
|
||||
maps.put("newAreaCode", countryBean.getAreaCodeName());
|
||||
maps.put("changeVerifyCode", passwordOld);
|
||||
maps.put("bindVerifyCode", passwordNew);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().smsChangeBindPhone(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.hbl.lewan.main.mine;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -130,7 +131,9 @@ public class FriendPermissionsActivity extends BaseActivity {
|
||||
}if(checkBox == viewBinding.groupAddSwitch){
|
||||
maps.put("allowAddFriendByGroup",checkBox.isChecked()?1:0);
|
||||
}
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().authUser(IMKitClient.account(),maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.hbl.lewan.main.MainActivity;
|
||||
import com.hbl.lewan.main.mine.photo.UserPhotoListActivity;
|
||||
import com.hbl.lewan.main.mine.setting.SettingActivity;
|
||||
import com.hbl.lewan.main.mine.setting.SettingNotifyActivity;
|
||||
import com.hbl.lewan.model.AccountsBean;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.VersionBean;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
@@ -251,19 +252,7 @@ public class MineFragment extends BaseFragment {
|
||||
});
|
||||
|
||||
binding.tvChange.setOnClickListener(v -> {
|
||||
ActionConfirmDialog actionConfirmDialog = new ActionConfirmDialog(getActivity(), "当前没有副号,是否需要购买", "取消","购买",true);
|
||||
actionConfirmDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
startActivity(new Intent(getActivity(), BuyAccountActivity.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionConfirmDialog.show();
|
||||
checkAccounts();
|
||||
});
|
||||
|
||||
binding.friendTv.setOnClickListener(v -> startActivity(new Intent(getActivity(), FriendPermissionsActivity.class)));
|
||||
@@ -274,12 +263,47 @@ public class MineFragment extends BaseFragment {
|
||||
intent.putExtra("isGame", true);
|
||||
startActivity(intent);
|
||||
});
|
||||
binding.versionTv.setOnClickListener((View.OnClickListener) v -> getVersion());
|
||||
binding.versionDescTv.setOnClickListener((View.OnClickListener) v -> getVersion());
|
||||
binding.versionTv.setOnClickListener(v -> getVersion());
|
||||
binding.versionDescTv.setOnClickListener(v -> getVersion());
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void checkAccounts() {
|
||||
Api.getInstance().accounts()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<AccountsBean>> feedbackResp) {
|
||||
if(feedbackResp.data!=null && feedbackResp.data.size()>1){
|
||||
startActivity(new Intent(getActivity(),AccoutListActivity.class));
|
||||
}else{
|
||||
ActionConfirmDialog actionConfirmDialog = new ActionConfirmDialog(getActivity(), "当前没有副号,是否需要购买", "取消","购买",true);
|
||||
actionConfirmDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
startActivity(new Intent(getActivity(), BuyAccountActivity.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionConfirmDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast(msg);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void toWalletInfo(boolean b) {
|
||||
if (bindBean != null) {
|
||||
if (!bindBean.getPhoneBind()) {
|
||||
@@ -427,7 +451,9 @@ public class MineFragment extends BaseFragment {
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
String lauguage = DataUtils.getLauguage(getActivity(), loc);
|
||||
maps.put("language", lauguage);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
Api.getInstance().authUser(IMKitClient.account(), maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
||||
@@ -210,7 +210,9 @@ public class SettingAccoutIdActivity extends BaseActivity {
|
||||
private void changeUserInfo() {
|
||||
Map<String,Object> maps = new HashMap<>();
|
||||
maps.put("nwId", binding.editText.getText().toString().trim());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().authUser(IMKitClient.account(),maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -194,7 +194,9 @@ public class UnBindPhoneActivity extends BaseActivity {
|
||||
maps.put("verifyCode", String.valueOf(viewBinding.passwordEditText.getText()).trim());
|
||||
maps.put("phone", bean.getPhone());
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
showLoadingDialog();
|
||||
Api.getInstance().preCheckVerifyCode(maps)
|
||||
@@ -338,7 +340,9 @@ public class UnBindPhoneActivity extends BaseActivity {
|
||||
Map<String, String> maps = new HashMap<>();
|
||||
maps.put("phone", bean.getPhone());
|
||||
maps.put("areaCode",bean.getAreaCode());
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().sendSmsForChangeBindPhone(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -348,7 +348,7 @@ public class UserHeadEditActivity extends BaseActivity implements CommonCallback
|
||||
try {
|
||||
if (isHead) {
|
||||
LogUtils.i("地址是啥:" + response.getString("key"));
|
||||
toPush("https://qn.hnsdl.com/" + response.getString("key"), isHead);
|
||||
toPush(IMUIKitConfig.OSS_URL + response.getString("key"), isHead);
|
||||
} else {
|
||||
LogUtils.i("地址是啥:" + response.getString("key"));
|
||||
toPush(response.getString("key"), isHead);
|
||||
@@ -485,7 +485,9 @@ public class UserHeadEditActivity extends BaseActivity implements CommonCallback
|
||||
} else {
|
||||
maps.put("postHomepageBackground", fileName);
|
||||
}
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().authUser(IMKitClient.account(), maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -864,7 +864,9 @@ public class UserInfoActivity extends BaseActivity {
|
||||
private void changeButton(SwitchCompat checkBox) {
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
maps.put("allowSearchById", checkBox.isChecked() ? 1 : 0);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().authUser(IMKitClient.account(), maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
50
app/src/main/java/com/hbl/lewan/model/AccountsBean.java
Normal file
50
app/src/main/java/com/hbl/lewan/model/AccountsBean.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/4/27 18:21
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class AccountsBean {
|
||||
private int userId;
|
||||
private String phone;
|
||||
private String nickname;
|
||||
private String avatar;
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
// {"data":[{"userId":61330234,"phone":"jue00lie","nickname":"jue00lie","avatar":null}],"code":1}
|
||||
|
||||
}
|
||||
@@ -4,20 +4,32 @@ package com.hbl.lewan.model;
|
||||
public class BankBean {
|
||||
|
||||
|
||||
private Integer id;
|
||||
private int id;
|
||||
private String bankId;
|
||||
private String bankName;
|
||||
private String abbreviation;
|
||||
private String logo;
|
||||
private String background;
|
||||
private int userId;
|
||||
private int type;
|
||||
private String number;
|
||||
private String cardholderName;
|
||||
private String createTime;
|
||||
private String createTimestamp;
|
||||
|
||||
public Integer getId() {
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getBankId() {
|
||||
return bankId;
|
||||
}
|
||||
|
||||
public void setBankId(String bankId) {
|
||||
this.bankId = bankId;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName;
|
||||
}
|
||||
@@ -26,27 +38,51 @@ public class BankBean {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getAbbreviation() {
|
||||
return abbreviation;
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setAbbreviation(String abbreviation) {
|
||||
this.abbreviation = abbreviation;
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getLogo() {
|
||||
return logo;
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setLogo(String logo) {
|
||||
this.logo = logo;
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getBackground() {
|
||||
return background;
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setBackground(String background) {
|
||||
this.background = background;
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getCardholderName() {
|
||||
return cardholderName;
|
||||
}
|
||||
|
||||
public void setCardholderName(String cardholderName) {
|
||||
this.cardholderName = cardholderName;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreateTimestamp() {
|
||||
return createTimestamp;
|
||||
}
|
||||
|
||||
public void setCreateTimestamp(String createTimestamp) {
|
||||
this.createTimestamp = createTimestamp;
|
||||
}
|
||||
}
|
||||
|
||||
95
app/src/main/java/com/hbl/lewan/model/ChongZhiLogBean.java
Normal file
95
app/src/main/java/com/hbl/lewan/model/ChongZhiLogBean.java
Normal file
@@ -0,0 +1,95 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/4/28 11:38
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class ChongZhiLogBean {
|
||||
|
||||
private String id;
|
||||
private int amount;
|
||||
// private Object sourceAmount;
|
||||
private String platform;
|
||||
private int userId;
|
||||
// private Object staffServiceId;
|
||||
// private Object deviceId;
|
||||
private String createTime;
|
||||
private String createTimestamp;
|
||||
// private Object completeTime;
|
||||
// private Object completeTimestamp;
|
||||
private int status;
|
||||
// private Object hint;
|
||||
private int chargeChannelId;
|
||||
// private Object serialNumber;
|
||||
// private Object chargeScreenshot;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
|
||||
public String getPlatform() {
|
||||
return platform;
|
||||
}
|
||||
|
||||
public void setPlatform(String platform) {
|
||||
this.platform = platform;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreateTimestamp() {
|
||||
return createTimestamp;
|
||||
}
|
||||
|
||||
public void setCreateTimestamp(String createTimestamp) {
|
||||
this.createTimestamp = createTimestamp;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getChargeChannelId() {
|
||||
return chargeChannelId;
|
||||
}
|
||||
|
||||
public void setChargeChannelId(int chargeChannelId) {
|
||||
this.chargeChannelId = chargeChannelId;
|
||||
}
|
||||
}
|
||||
76
app/src/main/java/com/hbl/lewan/model/ChongZhiQuDaoBean.java
Normal file
76
app/src/main/java/com/hbl/lewan/model/ChongZhiQuDaoBean.java
Normal file
@@ -0,0 +1,76 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/4/27 18:21
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class ChongZhiQuDaoBean {
|
||||
|
||||
private int id;
|
||||
private String platform;
|
||||
private String channel;
|
||||
private String code;
|
||||
private int minVal;
|
||||
private int maxVal;
|
||||
private int status;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPlatform() {
|
||||
return platform;
|
||||
}
|
||||
|
||||
public void setPlatform(String platform) {
|
||||
this.platform = platform;
|
||||
}
|
||||
|
||||
public String getChannel() {
|
||||
return channel;
|
||||
}
|
||||
|
||||
public void setChannel(String channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getMinVal() {
|
||||
return minVal;
|
||||
}
|
||||
|
||||
public void setMinVal(int minVal) {
|
||||
this.minVal = minVal;
|
||||
}
|
||||
|
||||
public int getMaxVal() {
|
||||
return maxVal;
|
||||
}
|
||||
|
||||
public void setMaxVal(int maxVal) {
|
||||
this.maxVal = maxVal;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,25 @@ public class LoginBean extends RosterElementEntity {
|
||||
private double silverFeeRate;//积分费率
|
||||
private double mmSilverFeeRate; //mm 积分费率
|
||||
|
||||
private String realName;
|
||||
|
||||
private String idCard;
|
||||
|
||||
public String getRealName() {
|
||||
return realName;
|
||||
}
|
||||
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public double getMmSilverFeeRate() {
|
||||
return mmSilverFeeRate;
|
||||
@@ -197,14 +216,21 @@ public class LoginBean extends RosterElementEntity {
|
||||
}
|
||||
|
||||
public Integer getAddFriendNeedVerify() {
|
||||
if(addFriendNeedVerify == null){
|
||||
return 0;
|
||||
}
|
||||
return addFriendNeedVerify;
|
||||
}
|
||||
|
||||
public void setAddFriendNeedVerify(Integer addFriendNeedVerify) {
|
||||
|
||||
this.addFriendNeedVerify = addFriendNeedVerify;
|
||||
}
|
||||
|
||||
public Integer getAllowStrangerChat() {
|
||||
if(allowStrangerChat == null){
|
||||
return 0;
|
||||
}
|
||||
return allowStrangerChat;
|
||||
}
|
||||
|
||||
@@ -213,6 +239,9 @@ public class LoginBean extends RosterElementEntity {
|
||||
}
|
||||
|
||||
public Integer getAllowSearchByPhone() {
|
||||
if(allowSearchByPhone == null){
|
||||
return 0;
|
||||
}
|
||||
return allowSearchByPhone;
|
||||
}
|
||||
|
||||
@@ -221,6 +250,9 @@ public class LoginBean extends RosterElementEntity {
|
||||
}
|
||||
|
||||
public Integer getAllowSearchById() {
|
||||
if(allowSearchById == null){
|
||||
return 0;
|
||||
}
|
||||
return allowSearchById;
|
||||
}
|
||||
|
||||
@@ -229,10 +261,14 @@ public class LoginBean extends RosterElementEntity {
|
||||
}
|
||||
|
||||
public Integer getAllowAddFriendByGroup() {
|
||||
if(allowSearchById == null){
|
||||
return 0;
|
||||
}
|
||||
return allowAddFriendByGroup;
|
||||
}
|
||||
|
||||
public void setAllowAddFriendByGroup(Integer allowAddFriendByGroup) {
|
||||
|
||||
this.allowAddFriendByGroup = allowAddFriendByGroup;
|
||||
}
|
||||
|
||||
|
||||
88
app/src/main/java/com/hbl/lewan/model/PayInfoWxBean.java
Normal file
88
app/src/main/java/com/hbl/lewan/model/PayInfoWxBean.java
Normal file
@@ -0,0 +1,88 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
|
||||
public class PayInfoWxBean {
|
||||
|
||||
private int id;
|
||||
private int userId;
|
||||
private String wxRealName;
|
||||
private String wxNo;
|
||||
private String wxQrCode;
|
||||
private String alipayRealName;
|
||||
private String alipayNo;
|
||||
private String alipayQrCode;
|
||||
private String createTime;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getWxRealName() {
|
||||
return wxRealName;
|
||||
}
|
||||
|
||||
public void setWxRealName(String wxRealName) {
|
||||
this.wxRealName = wxRealName;
|
||||
}
|
||||
|
||||
public String getWxNo() {
|
||||
return wxNo;
|
||||
}
|
||||
|
||||
public void setWxNo(String wxNo) {
|
||||
this.wxNo = wxNo;
|
||||
}
|
||||
|
||||
public String getWxQrCode() {
|
||||
return wxQrCode;
|
||||
}
|
||||
|
||||
public void setWxQrCode(String wxQrCode) {
|
||||
this.wxQrCode = wxQrCode;
|
||||
}
|
||||
|
||||
public String getAlipayRealName() {
|
||||
return alipayRealName;
|
||||
}
|
||||
|
||||
public void setAlipayRealName(String alipayRealName) {
|
||||
this.alipayRealName = alipayRealName;
|
||||
}
|
||||
|
||||
public String getAlipayNo() {
|
||||
return alipayNo;
|
||||
}
|
||||
|
||||
public void setAlipayNo(String alipayNo) {
|
||||
this.alipayNo = alipayNo;
|
||||
}
|
||||
|
||||
public String getAlipayQrCode() {
|
||||
return alipayQrCode;
|
||||
}
|
||||
|
||||
public void setAlipayQrCode(String alipayQrCode) {
|
||||
this.alipayQrCode = alipayQrCode;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
}
|
||||
51
app/src/main/java/com/hbl/lewan/model/RedLogBean.java
Normal file
51
app/src/main/java/com/hbl/lewan/model/RedLogBean.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/4/28 17:10
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class RedLogBean {
|
||||
|
||||
private Integer redPkgCount;
|
||||
private Integer redPkgAmount;
|
||||
private List<BillBean> groupGrabRecords;
|
||||
private List<BillBean> groupSendRecords;
|
||||
|
||||
public List<BillBean> getGroupSendRecords() {
|
||||
return groupSendRecords;
|
||||
}
|
||||
|
||||
public void setGroupSendRecords(List<BillBean> groupSendRecords) {
|
||||
this.groupSendRecords = groupSendRecords;
|
||||
}
|
||||
|
||||
public Integer getRedPkgCount() {
|
||||
return redPkgCount;
|
||||
}
|
||||
|
||||
public void setRedPkgCount(Integer redPkgCount) {
|
||||
this.redPkgCount = redPkgCount;
|
||||
}
|
||||
|
||||
public Integer getRedPkgAmount() {
|
||||
return redPkgAmount;
|
||||
}
|
||||
|
||||
public void setRedPkgAmount(Integer redPkgAmount) {
|
||||
this.redPkgAmount = redPkgAmount;
|
||||
}
|
||||
|
||||
public List<BillBean> getGroupGrabRecords() {
|
||||
return groupGrabRecords;
|
||||
}
|
||||
|
||||
public void setGroupGrabRecords(List<BillBean> groupGrabRecords) {
|
||||
this.groupGrabRecords = groupGrabRecords;
|
||||
}
|
||||
}
|
||||
31
app/src/main/java/com/hbl/lewan/model/SeqBean.java
Normal file
31
app/src/main/java/com/hbl/lewan/model/SeqBean.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/4/27 18:06
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class SeqBean {
|
||||
|
||||
private int seqNo;
|
||||
private int goldAmount;
|
||||
|
||||
public int getSeqNo() {
|
||||
return seqNo;
|
||||
}
|
||||
|
||||
public void setSeqNo(int seqNo) {
|
||||
this.seqNo = seqNo;
|
||||
}
|
||||
|
||||
public int getGoldAmount() {
|
||||
return goldAmount;
|
||||
}
|
||||
|
||||
public void setGoldAmount(int goldAmount) {
|
||||
this.goldAmount = goldAmount;
|
||||
}
|
||||
}
|
||||
26
app/src/main/java/com/hbl/lewan/model/SeqBeanTop.java
Normal file
26
app/src/main/java/com/hbl/lewan/model/SeqBeanTop.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/4/27 18:06
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class SeqBeanTop {
|
||||
|
||||
private List<SeqBean> amountItems;
|
||||
|
||||
public List<SeqBean> getAmountItems() {
|
||||
return amountItems;
|
||||
}
|
||||
|
||||
public void setAmountItems(List<SeqBean> amountItems) {
|
||||
this.amountItems = amountItems;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
77
app/src/main/java/com/hbl/lewan/model/TiXianConfBean.java
Normal file
77
app/src/main/java/com/hbl/lewan/model/TiXianConfBean.java
Normal file
@@ -0,0 +1,77 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/4/28 13:41
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class TiXianConfBean {
|
||||
|
||||
private int id;
|
||||
private String channel;
|
||||
private String code;
|
||||
private int type;
|
||||
private double baseFee;
|
||||
private double feeRate;
|
||||
private int status;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getChannel() {
|
||||
return channel;
|
||||
}
|
||||
|
||||
public void setChannel(String channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public double getBaseFee() {
|
||||
return baseFee;
|
||||
}
|
||||
|
||||
public void setBaseFee(double baseFee) {
|
||||
this.baseFee = baseFee;
|
||||
}
|
||||
|
||||
public double getFeeRate() {
|
||||
return feeRate;
|
||||
}
|
||||
|
||||
public void setFeeRate(double feeRate) {
|
||||
this.feeRate = feeRate;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
||||
105
app/src/main/java/com/hbl/lewan/model/TiXianLogBean.java
Normal file
105
app/src/main/java/com/hbl/lewan/model/TiXianLogBean.java
Normal file
@@ -0,0 +1,105 @@
|
||||
package com.hbl.lewan.model;
|
||||
|
||||
/**
|
||||
* **********************
|
||||
*
|
||||
* @Author bug machine
|
||||
* 创建时间: 2025/4/28 11:38
|
||||
* 用途
|
||||
* **********************
|
||||
*/
|
||||
public class TiXianLogBean {
|
||||
|
||||
private String id;
|
||||
private int type;
|
||||
private int amount;
|
||||
private int fee;
|
||||
private int userId;
|
||||
private int actualAmount;
|
||||
private int status;
|
||||
private String createTime;
|
||||
private String createTimestamp;
|
||||
private String remark;
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public int getFee() {
|
||||
return fee;
|
||||
}
|
||||
|
||||
public void setFee(int fee) {
|
||||
this.fee = fee;
|
||||
}
|
||||
|
||||
|
||||
public int getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public int getActualAmount() {
|
||||
return actualAmount;
|
||||
}
|
||||
|
||||
public void setActualAmount(int actualAmount) {
|
||||
this.actualAmount = actualAmount;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getCreateTimestamp() {
|
||||
return createTimestamp;
|
||||
}
|
||||
|
||||
public void setCreateTimestamp(String createTimestamp) {
|
||||
this.createTimestamp = createTimestamp;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.hbl.lewan.network;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.hbl.lewan.BuildConfig;
|
||||
import com.hbl.lewan.model.AccountsBean;
|
||||
import com.hbl.lewan.model.ActivityMsgBean;
|
||||
import com.hbl.lewan.model.AdBean;
|
||||
import com.hbl.lewan.model.AfterCountBean;
|
||||
@@ -15,6 +16,8 @@ import com.hbl.lewan.model.BankListBean;
|
||||
import com.hbl.lewan.model.BillBean;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.ChargingBean;
|
||||
import com.hbl.lewan.model.ChongZhiLogBean;
|
||||
import com.hbl.lewan.model.ChongZhiQuDaoBean;
|
||||
import com.hbl.lewan.model.ConfigBean;
|
||||
import com.hbl.lewan.model.CreditsConfBean;
|
||||
import com.hbl.lewan.model.ExchangeConfBean;
|
||||
@@ -35,17 +38,22 @@ import com.hbl.lewan.model.NewsBean;
|
||||
import com.hbl.lewan.model.NotifyCountBean;
|
||||
import com.hbl.lewan.model.PassWordLoginBean;
|
||||
import com.hbl.lewan.model.PayInfoBean;
|
||||
import com.hbl.lewan.model.PayInfoWxBean;
|
||||
import com.hbl.lewan.model.QuesListBean;
|
||||
import com.hbl.lewan.model.ReadMessageBean;
|
||||
import com.hbl.lewan.model.RedLogBean;
|
||||
import com.hbl.lewan.model.RegisteredBean;
|
||||
import com.hbl.lewan.model.RtcTokenBean;
|
||||
import com.hbl.lewan.model.RtcTokenResBean;
|
||||
import com.hbl.lewan.model.SendOrderBean;
|
||||
import com.hbl.lewan.model.SeqBeanTop;
|
||||
import com.hbl.lewan.model.SetUpdatesBean;
|
||||
import com.hbl.lewan.model.StaffServiceIdBean;
|
||||
import com.hbl.lewan.model.StatisticsBean;
|
||||
import com.hbl.lewan.model.StsCredentialsBean;
|
||||
import com.hbl.lewan.model.TaskBean;
|
||||
import com.hbl.lewan.model.TiXianConfBean;
|
||||
import com.hbl.lewan.model.TiXianLogBean;
|
||||
import com.hbl.lewan.model.TopBean;
|
||||
import com.hbl.lewan.model.TopOrderBean;
|
||||
import com.hbl.lewan.model.TopUpBean;
|
||||
@@ -137,6 +145,14 @@ public interface ApiService {
|
||||
@POST("/auth/smsLogin")
|
||||
Observable<Result<LoginBean>> smsLogin(@Body Map<String, Object> requestBody);
|
||||
|
||||
|
||||
/**
|
||||
* 验证码登录
|
||||
*/
|
||||
@POST("/auth/changeAccount")
|
||||
Observable<Result<LoginBean>> changeAccount(@Query("userId") String userId);
|
||||
|
||||
|
||||
/**
|
||||
* 判定手机号是否已经注册过
|
||||
*/
|
||||
@@ -1020,6 +1036,181 @@ public interface ApiService {
|
||||
@POST("/payment/sendOrder/zero_card")
|
||||
Observable<Result<String>> payInstallment(@Body Map<String, Object> requestBody);
|
||||
|
||||
/**
|
||||
* 购买副号
|
||||
*
|
||||
* {
|
||||
* "prefix": "",
|
||||
* "postfix": "",
|
||||
* "password": "",
|
||||
* "payPassword": ""
|
||||
* }
|
||||
*/
|
||||
@POST("/auth/buyAccount")
|
||||
Observable<Result> buyAccount(@Body Map<String, Object> requestBody);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取副号列表
|
||||
*/
|
||||
@GET("/auth/accounts")
|
||||
Observable<Result<List<AccountsBean>>> accounts();
|
||||
|
||||
|
||||
/**
|
||||
* 实名认证
|
||||
*
|
||||
* {
|
||||
* "realName": "",
|
||||
* "idCardNo": ""
|
||||
* }
|
||||
*/
|
||||
@POST("/auth/recent")
|
||||
Observable<Result> recent(@Body Map<String, String> requestBody);
|
||||
|
||||
|
||||
/**
|
||||
* 银行卡列表
|
||||
*/
|
||||
@GET("/auth/banks")
|
||||
Observable<Result<List<BankBean>>> getBanks();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 添加银行卡
|
||||
*
|
||||
*{
|
||||
* "bankName": "", //银行名称
|
||||
* "number": "", //银行卡号
|
||||
* "cardholderName": "" //持卡人姓名
|
||||
* }
|
||||
*/
|
||||
@POST("/auth/bank")
|
||||
Observable<Result> AuthBank(@Body Map<String, String > requestBody);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取微信支付宝信息
|
||||
*/
|
||||
@GET("/auth/payInfo")
|
||||
Observable<Result<PayInfoWxBean>> authPayInfo();
|
||||
|
||||
|
||||
/**
|
||||
* 绑定微信
|
||||
*
|
||||
{
|
||||
"wxRealName": "", //微信真实姓名
|
||||
"wxNo": "", //微信号
|
||||
"wxQrCode": "" //收款码
|
||||
}
|
||||
*/
|
||||
@POST("/auth/bindWx")
|
||||
Observable<Result> AuthBindWx(@Body Map<String, String > requestBody);
|
||||
|
||||
|
||||
/**
|
||||
* 绑定支付宝
|
||||
*
|
||||
{
|
||||
"alipayRealName": "", //支付宝真实姓名
|
||||
"alipayNo": "", //支付宝账号
|
||||
"alipayQrCode": "" //收款码
|
||||
}
|
||||
*/
|
||||
@POST("/auth/bindAlipay")
|
||||
Observable<Result> AuthBindAlipay(@Body Map<String, String> requestBody);
|
||||
|
||||
|
||||
/**
|
||||
* 收到的红包列表
|
||||
*/
|
||||
@GET("/auth/receive")
|
||||
Observable<Result<RedLogBean>> authReceive(@Query("page") int page, @Query("size") int size, @Query("monthStr") String monthStr);
|
||||
|
||||
|
||||
/**
|
||||
* 发送的红包列表
|
||||
*/
|
||||
@GET("/auth/send")
|
||||
Observable<Result<RedLogBean>> authSend(@Query("page") int page, @Query("size") int size, @Query("monthStr") String monthStr);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取充值配置枚举
|
||||
*/
|
||||
@GET("/charge/amounts")
|
||||
Observable<Result<SeqBeanTop>> chargeAmounts();
|
||||
|
||||
|
||||
/**
|
||||
* 获取充值渠道列表
|
||||
*/
|
||||
@GET("/charge/channels")
|
||||
Observable<Result<List<ChongZhiQuDaoBean>>> chargeChannels(@Query("amount") int amount);
|
||||
|
||||
|
||||
/**
|
||||
* 发起充值
|
||||
*
|
||||
{
|
||||
"amount": 1,
|
||||
"channelId": 1
|
||||
}
|
||||
*/
|
||||
@POST("/charge/apply")
|
||||
Observable<Result<String>> chargeApply(@Body Map<String, Object> requestBody);
|
||||
|
||||
|
||||
/**
|
||||
* 提现配置
|
||||
*
|
||||
{
|
||||
"token": 1,
|
||||
}
|
||||
*/
|
||||
@POST("/withdraw/conf")
|
||||
Observable<Result<List<TiXianConfBean>>> withdrawConf(@Body Map<String, Object> requestBody);
|
||||
|
||||
|
||||
/**
|
||||
* 发起提现
|
||||
*
|
||||
{
|
||||
"amount": 1,
|
||||
"withdrawConfId": 1,
|
||||
"bankCardId": 1
|
||||
}
|
||||
*/
|
||||
@POST("/withdraw/apply")
|
||||
Observable<Result> withdrawApply(@Body Map<String, Object> requestBody);
|
||||
|
||||
|
||||
/**
|
||||
* 查看提现记录详情
|
||||
*/
|
||||
@GET("/withdraw/{recordId}")
|
||||
Observable<Result> withdrawRecord(@Path("recordId") String recordId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 充值记录
|
||||
*/
|
||||
@GET("/charge")
|
||||
Observable<Result<ListBeanResult<ChongZhiLogBean>>> charge(@Query("page") int page, @Query("size") int size);
|
||||
|
||||
/**
|
||||
* 提现记录
|
||||
*/
|
||||
@GET("/withdraw")
|
||||
Observable<Result<ListBeanResult<TiXianLogBean>>> withdraw(@Query("page") int page, @Query("size") int size);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -419,7 +419,9 @@ public class PaymentActivity extends BaseActivity {
|
||||
maps.put("remark", viewBinding.memoEt.getText().toString().trim());
|
||||
}
|
||||
maps.put("coinType", 0);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
maps.put("payVerifyCode", type);
|
||||
maps.put("receiptType", 2);
|
||||
|
||||
|
||||
@@ -469,7 +469,9 @@ public class PaymentActivity1 extends BaseActivity {
|
||||
maps.put("remark", viewBinding.memoEt.getText().toString().trim());
|
||||
}
|
||||
maps.put("coinType", 0);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
maps.put("payVerifyCode", type);
|
||||
maps.put("receiptType", 1);
|
||||
|
||||
|
||||
@@ -704,7 +704,9 @@ public class SendGiftRedPacketActivity extends BaseActivity {
|
||||
maps.put("remark", getString(R.string.remarks_hit_txt));
|
||||
}
|
||||
maps.put("coinType", 2);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
maps.put("payVerifyCode", type);
|
||||
|
||||
Api.getInstance().sendGiftRedpacket(maps)
|
||||
@@ -758,7 +760,9 @@ public class SendGiftRedPacketActivity extends BaseActivity {
|
||||
maps.put("remark", getString(R.string.remarks_hit_txt));
|
||||
}
|
||||
maps.put("coinType", 2);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
maps.put("payVerifyCode", type);
|
||||
|
||||
Api.getInstance().sendRedpacket(maps)
|
||||
|
||||
@@ -850,7 +850,9 @@ public class SendRedPacketActivity extends BaseActivity {
|
||||
maps.put("remark", getString(R.string.remarks_hit_txt));
|
||||
}
|
||||
maps.put("coinType", isJinBi ? 0 : 1);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
maps.put("payVerifyCode", type);
|
||||
|
||||
Api.getInstance().sendGroupRedpacket(maps)
|
||||
@@ -904,7 +906,9 @@ public class SendRedPacketActivity extends BaseActivity {
|
||||
maps.put("remark", getString(R.string.remarks_hit_txt));
|
||||
}
|
||||
maps.put("coinType", isJinBi ? 0 : 1);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
maps.put("payVerifyCode", type);
|
||||
|
||||
Api.getInstance().sendRedpacket(maps)
|
||||
|
||||
@@ -355,7 +355,9 @@ public class TransferAccountsActivity extends BaseActivity {
|
||||
maps.put("remark", viewBinding.memoEt.getText().toString().trim());
|
||||
}
|
||||
maps.put("coinType", isJinBi ? 0 : 1);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
maps.put("payVerifyCode", type);
|
||||
maps.put("receiptType", 1);
|
||||
maps.put("feeAmount", (Integer.parseInt(viewBinding.shouxufeiTv.getText().toString())) * 100); //手续费金额
|
||||
|
||||
@@ -168,7 +168,9 @@ public class TransferInfoActivity extends BaseActivity
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("recordId",transferBean.getId());
|
||||
map.put("uid",transferBean.getSenderUid());
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().transferMoneyReturn(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -216,7 +218,9 @@ public class TransferInfoActivity extends BaseActivity
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("recordId",transferBean.getId());
|
||||
map.put("uid",transferBean.getReceiverUid());
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().receiveTransferMoney(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -445,7 +445,9 @@ public class CircleFragment extends BaseFragment {
|
||||
maps.put("page", pageSize);
|
||||
maps.put("size", 30);
|
||||
maps.put("selectType", type);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().posts(maps)
|
||||
.subscribeOn(io.reactivex.schedulers.Schedulers.io())
|
||||
|
||||
@@ -92,6 +92,7 @@ public class MessageActivity extends BaseActivity {
|
||||
binding.refreshLayout.autoRefresh();
|
||||
}
|
||||
}
|
||||
binding.layoutItem.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1066,7 +1066,9 @@ public class TiktoInfokActivity extends BaseActivity {
|
||||
private void changePost(int i,AlbumBean albumBean) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("visible",i);
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().changePost(albumBean.getPostId(),map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -1088,7 +1088,9 @@ public class TiktokActivity extends BaseActivity implements TiktokAdapter.OnToAc
|
||||
private void changePost(int i, AlbumBean albumBean, int index) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("visible", i);
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().changePost(albumBean.getPostId(), map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -184,7 +184,9 @@ public class TiktokActivityMe extends BaseActivity implements TiktokAdapterMe.On
|
||||
maps.put("page", page);
|
||||
maps.put("size", 30);
|
||||
maps.put("selectType", 2);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().posts(accId, maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -981,7 +983,9 @@ public class TiktokActivityMe extends BaseActivity implements TiktokAdapterMe.On
|
||||
private void changePost(int i, AlbumBean albumBean, int index) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("visible", i);
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().changePost(albumBean.getPostId(), map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -385,7 +385,9 @@ public class CircleFragment1 extends BaseFragment {
|
||||
maps.put("page", pageSize);
|
||||
maps.put("size", 30);
|
||||
maps.put("selectType", type);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().posts(maps)
|
||||
.subscribeOn(io.reactivex.schedulers.Schedulers.io())
|
||||
|
||||
@@ -589,7 +589,9 @@ public class CircleFragment2 extends BaseFragment {
|
||||
// maps.put("longitude", aMapLocation.getLongitude());
|
||||
// maps.put("latitude", aMapLocation.getLatitude());
|
||||
// }
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().posts(maps)
|
||||
.subscribeOn(io.reactivex.schedulers.Schedulers.io())
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.hbl.lewan.wallet;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -18,8 +20,12 @@ import com.hbl.lewan.network.Result;
|
||||
import com.hbl.lewan.utils.GsonUtils;
|
||||
import com.hbl.lewan.utils.LogUtils;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
@@ -36,109 +42,60 @@ public class AddBankActivity extends BaseActivity {
|
||||
viewBinding = ActivityAddBankBinding.inflate(getLayoutInflater());
|
||||
setContentView(viewBinding.getRoot());
|
||||
initView();
|
||||
getWallet();
|
||||
bindInfo();
|
||||
}
|
||||
|
||||
|
||||
private void bindInfo() {
|
||||
Api.getInstance().bindInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||
bindBean = feedbackResp.data;
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(bindBean));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void initView() {
|
||||
viewBinding.contactListActivityTitleBar.getBackImageView().setOnClickListener(v -> finish());
|
||||
}
|
||||
|
||||
|
||||
private void showDialogPay() {
|
||||
|
||||
com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog actionDialog = new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog(AddBankActivity.this,
|
||||
getString(com.netease.yunxin.kit.chatkit.ui.R.string.bind_phone_des_txt1), getString(com.netease.yunxin.kit.chatkit.ui.R.string.cancel_txt), getString(com.netease.yunxin.kit.chatkit.ui.R.string.to_sett_txt));
|
||||
actionDialog.setOnToActionListener(new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog.OnToActionListener() {
|
||||
viewBinding.sumbitBt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
// Intent intent = new Intent(getActivity(), ChangeAccoutActionActivity.class);
|
||||
// intent.putExtra("type", 5);
|
||||
// startActivity(intent);
|
||||
Intent intent = new Intent(AddBankActivity.this, SetPayPasswordActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
public void onClick(View v) {
|
||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您的真实姓名");
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
if (TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您本人的银行卡号");
|
||||
return;
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(viewBinding.bankEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入所属银行");
|
||||
return;
|
||||
}
|
||||
|
||||
toAddBank();
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
private void toAddBank() {
|
||||
|
||||
private void showDialog() {
|
||||
|
||||
ActionConfirmDialog actionDialog = new ActionConfirmDialog(AddBankActivity.this,
|
||||
getString(R.string.bind_phone_des_txt), getString(R.string.nobind_txt), getString(R.string.tobind_txt));
|
||||
actionDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
Intent intent = new Intent(AddBankActivity.this, ChangeAccoutActionActivity.class);
|
||||
intent.putExtra("type", ChangeAccoutActionActivity.TYPE_BIND_PHONE);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
private void getWallet() {
|
||||
Api.getInstance().walletInfo(IMKitClient.account())
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("cardholderName", viewBinding.nameEt.getText().toString().trim());
|
||||
map.put("number", viewBinding.numberEt.getText().toString().trim());
|
||||
map.put("bankName",viewBinding.bankEt.getText().toString().trim());
|
||||
Api.getInstance().AuthBank(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<WalletBean> feedbackResp) {
|
||||
walletBean = feedbackResp.data;
|
||||
changeInfo();
|
||||
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void changeInfo() {
|
||||
if (walletBean != null) {
|
||||
// viewBinding.jinbiYueTv.setText(AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
@@ -146,6 +103,4 @@ public class AddBankActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,12 +5,17 @@ import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.hbl.lewan.R;
|
||||
import com.hbl.lewan.adapter.CommonAdapter;
|
||||
import com.hbl.lewan.adapter.ViewHolder;
|
||||
import com.hbl.lewan.databinding.ActivityBankListBinding;
|
||||
import com.hbl.lewan.databinding.ActivityShimingBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
import com.hbl.lewan.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.lewan.model.BankBean;
|
||||
import com.hbl.lewan.model.BankListBean;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
@@ -19,16 +24,20 @@ import com.hbl.lewan.network.Result;
|
||||
import com.hbl.lewan.utils.GsonUtils;
|
||||
import com.hbl.lewan.utils.LogUtils;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
public class BankListActivity extends BaseActivity {
|
||||
ActivityBankListBinding viewBinding;
|
||||
WalletBean walletBean;
|
||||
BindBean bindBean;
|
||||
CommonAdapter commonAdapter;
|
||||
|
||||
ArrayList<BankBean> globalAmountList = new ArrayList<>();
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
|
||||
@@ -37,111 +46,81 @@ public class BankListActivity extends BaseActivity {
|
||||
viewBinding = ActivityBankListBinding.inflate(getLayoutInflater());
|
||||
setContentView(viewBinding.getRoot());
|
||||
initView();
|
||||
getWallet();
|
||||
bindInfo();
|
||||
}
|
||||
|
||||
|
||||
private void bindInfo() {
|
||||
Api.getInstance().bindInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<BindBean>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||
bindBean = feedbackResp.data;
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(bindBean));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void iniAdapter() {
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(BankListActivity.this);
|
||||
viewBinding.recycler.setLayoutManager(linearLayoutManager);
|
||||
commonAdapter = new CommonAdapter<BankBean>(BankListActivity.this, R.layout.item_bank, globalAmountList) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, BankBean s, int index) {
|
||||
holder.setText(R.id.title_tv,s.getBankName());
|
||||
holder.setText(R.id.des_tv,s.getCardholderName());
|
||||
holder.setText(R.id.number_tv,s.getNumber());
|
||||
|
||||
if(index%3 ==0){
|
||||
holder.getView(R.id.big_bg).setBackgroundResource(R.drawable.bank_bg1);
|
||||
}else if(index%3 ==1){
|
||||
holder.getView(R.id.big_bg).setBackgroundResource(R.drawable.bank_bg2);
|
||||
}else{
|
||||
holder.getView(R.id.big_bg).setBackgroundResource(R.drawable.bank_bg3);
|
||||
}
|
||||
}
|
||||
};
|
||||
viewBinding.recycler.setAdapter(commonAdapter);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void initView() {
|
||||
viewBinding.contactListActivityTitleBar.getBackImageView().setOnClickListener(v -> finish());
|
||||
|
||||
viewBinding.addBankBt.setOnClickListener(v -> startActivity(new Intent(BankListActivity.this, AddBankActivity.class)));
|
||||
viewBinding.addBankBt.setOnClickListener(v -> startActivityForResult(new Intent(BankListActivity.this, AddBankActivity.class),888));
|
||||
|
||||
// initTest();
|
||||
iniAdapter();
|
||||
getBankList();
|
||||
}
|
||||
|
||||
|
||||
private void showDialogPay() {
|
||||
|
||||
com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog actionDialog = new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog(BankListActivity.this,
|
||||
getString(com.netease.yunxin.kit.chatkit.ui.R.string.bind_phone_des_txt1), getString(com.netease.yunxin.kit.chatkit.ui.R.string.cancel_txt), getString(com.netease.yunxin.kit.chatkit.ui.R.string.to_sett_txt));
|
||||
actionDialog.setOnToActionListener(new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
// Intent intent = new Intent(getActivity(), ChangeAccoutActionActivity.class);
|
||||
// intent.putExtra("type", 5);
|
||||
// startActivity(intent);
|
||||
Intent intent = new Intent(BankListActivity.this, SetPayPasswordActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if(requestCode == 888&&resultCode == RESULT_OK){
|
||||
getBankList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void showDialog() {
|
||||
|
||||
ActionConfirmDialog actionDialog = new ActionConfirmDialog(BankListActivity.this,
|
||||
getString(R.string.bind_phone_des_txt), getString(R.string.nobind_txt), getString(R.string.tobind_txt));
|
||||
actionDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
Intent intent = new Intent(BankListActivity.this, ChangeAccoutActionActivity.class);
|
||||
intent.putExtra("type", ChangeAccoutActionActivity.TYPE_BIND_PHONE);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
private void getWallet() {
|
||||
Api.getInstance().walletInfo(IMKitClient.account())
|
||||
private void getBankList() {
|
||||
Api.getInstance().getBanks()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<WalletBean>>() {
|
||||
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<WalletBean> feedbackResp) {
|
||||
walletBean = feedbackResp.data;
|
||||
changeInfo();
|
||||
public void onSuccess(Result<List<BankBean>> feedbackResp) {
|
||||
if(feedbackResp!=null&&feedbackResp.data.size()>0){
|
||||
globalAmountList = (ArrayList<BankBean>) feedbackResp.data;
|
||||
commonAdapter.setDates(globalAmountList);
|
||||
viewBinding.nodataLy.setVisibility(View.GONE);
|
||||
viewBinding.recycler.setVisibility(View.VISIBLE);
|
||||
|
||||
}else{
|
||||
viewBinding.nodataLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.recycler.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void changeInfo() {
|
||||
if (walletBean != null) {
|
||||
// viewBinding.jinbiYueTv.setText(AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
||||
@@ -14,6 +14,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.hbl.lewan.IMUIKitConfig;
|
||||
import com.hbl.lewan.R;
|
||||
import com.hbl.lewan.databinding.ActivityBindWechatAlipayBinding;
|
||||
import com.hbl.lewan.databinding.ActivityShimingBinding;
|
||||
@@ -56,6 +57,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
@@ -63,7 +65,7 @@ import java.util.UUID;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
public class BindWeChatOrAliPayActivity extends BaseActivity{
|
||||
public class BindWeChatOrAliPayActivity extends BaseActivity {
|
||||
ActivityBindWechatAlipayBinding viewBinding;
|
||||
WalletBean walletBean;
|
||||
BindBean bindBean;
|
||||
@@ -111,64 +113,64 @@ public class BindWeChatOrAliPayActivity extends BaseActivity{
|
||||
|
||||
private void startPickMedia() {
|
||||
|
||||
TitleBarStyle whiteTitleBarStyle = new TitleBarStyle();
|
||||
whiteTitleBarStyle.setTitleBackgroundColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_white));
|
||||
whiteTitleBarStyle.setTitleDrawableRightResource(com.netease.yunxin.kit.chatkit.ui.R.drawable.ic_orange_arrow_down);
|
||||
whiteTitleBarStyle.setTitleLeftBackResource(com.netease.yunxin.kit.common.ui.R.drawable.ic_back);
|
||||
whiteTitleBarStyle.setTitleTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_black));
|
||||
whiteTitleBarStyle.setTitleCancelTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_53575e));
|
||||
whiteTitleBarStyle.setDisplayTitleBarLine(true);
|
||||
TitleBarStyle whiteTitleBarStyle = new TitleBarStyle();
|
||||
whiteTitleBarStyle.setTitleBackgroundColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_white));
|
||||
whiteTitleBarStyle.setTitleDrawableRightResource(com.netease.yunxin.kit.chatkit.ui.R.drawable.ic_orange_arrow_down);
|
||||
whiteTitleBarStyle.setTitleLeftBackResource(com.netease.yunxin.kit.common.ui.R.drawable.ic_back);
|
||||
whiteTitleBarStyle.setTitleTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_black));
|
||||
whiteTitleBarStyle.setTitleCancelTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_53575e));
|
||||
whiteTitleBarStyle.setDisplayTitleBarLine(true);
|
||||
|
||||
BottomNavBarStyle whiteBottomNavBarStyle = new BottomNavBarStyle();
|
||||
// whiteBottomNavBarStyle.setBottomPreviewSelectText(getResources().getString(R.string.chat_team_ait_all));
|
||||
whiteBottomNavBarStyle.setBottomNarBarBackgroundColor(Color.parseColor("#FFFFFF"));
|
||||
whiteBottomNavBarStyle.setBottomPreviewSelectTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_53575e));
|
||||
BottomNavBarStyle whiteBottomNavBarStyle = new BottomNavBarStyle();
|
||||
// whiteBottomNavBarStyle.setBottomPreviewSelectText(getResources().getString(R.string.chat_team_ait_all));
|
||||
whiteBottomNavBarStyle.setBottomNarBarBackgroundColor(Color.parseColor("#FFFFFF"));
|
||||
whiteBottomNavBarStyle.setBottomPreviewSelectTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_53575e));
|
||||
|
||||
whiteBottomNavBarStyle.setBottomPreviewNormalTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_9b));
|
||||
whiteBottomNavBarStyle.setBottomPreviewSelectTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.color_222222));
|
||||
whiteBottomNavBarStyle.setCompleteCountTips(false);
|
||||
whiteBottomNavBarStyle.setBottomPreviewNormalTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_9b));
|
||||
whiteBottomNavBarStyle.setBottomPreviewSelectTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.color_222222));
|
||||
whiteBottomNavBarStyle.setCompleteCountTips(false);
|
||||
|
||||
whiteBottomNavBarStyle.setBottomEditorTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_53575e));
|
||||
whiteBottomNavBarStyle.setBottomOriginalTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_53575e));
|
||||
whiteBottomNavBarStyle.setBottomEditorTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_53575e));
|
||||
whiteBottomNavBarStyle.setBottomOriginalTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_53575e));
|
||||
|
||||
SelectMainStyle selectMainStyle = new SelectMainStyle();
|
||||
selectMainStyle.setStatusBarColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_white));
|
||||
selectMainStyle.setDarkStatusBarBlack(true);
|
||||
selectMainStyle.setSelectNormalTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_9b));
|
||||
selectMainStyle.setSelectTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.color_222222));
|
||||
selectMainStyle.setPreviewSelectBackground(com.netease.yunxin.kit.chatkit.ui.R.drawable.ps_demo_white_preview_selector);
|
||||
selectMainStyle.setSelectBackground(com.netease.yunxin.kit.chatkit.ui.R.drawable.ps_checkbox_selector);
|
||||
SelectMainStyle selectMainStyle = new SelectMainStyle();
|
||||
selectMainStyle.setStatusBarColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_white));
|
||||
selectMainStyle.setDarkStatusBarBlack(true);
|
||||
selectMainStyle.setSelectNormalTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_9b));
|
||||
selectMainStyle.setSelectTextColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.color_222222));
|
||||
selectMainStyle.setPreviewSelectBackground(com.netease.yunxin.kit.chatkit.ui.R.drawable.ps_demo_white_preview_selector);
|
||||
selectMainStyle.setSelectBackground(com.netease.yunxin.kit.chatkit.ui.R.drawable.ps_checkbox_selector);
|
||||
// selectMainStyle.setSelectText(R.string.ps_done_front_num);
|
||||
selectMainStyle.setMainListBackgroundColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_white));
|
||||
PictureSelectorStyle selectorStyle = new PictureSelectorStyle();
|
||||
selectorStyle.setTitleBarStyle(whiteTitleBarStyle);
|
||||
selectorStyle.setBottomBarStyle(whiteBottomNavBarStyle);
|
||||
selectorStyle.setSelectMainStyle(selectMainStyle);
|
||||
selectMainStyle.setMainListBackgroundColor(ContextCompat.getColor(BindWeChatOrAliPayActivity.this, com.netease.yunxin.kit.chatkit.ui.R.color.ps_color_white));
|
||||
PictureSelectorStyle selectorStyle = new PictureSelectorStyle();
|
||||
selectorStyle.setTitleBarStyle(whiteTitleBarStyle);
|
||||
selectorStyle.setBottomBarStyle(whiteBottomNavBarStyle);
|
||||
selectorStyle.setSelectMainStyle(selectMainStyle);
|
||||
|
||||
|
||||
PictureSelector.create(this)
|
||||
.openGallery(SelectMimeType.ofImage())
|
||||
.setImageEngine(GlideEngine.createGlideEngine())
|
||||
.setMaxSelectNum(1)
|
||||
PictureSelector.create(this)
|
||||
.openGallery(SelectMimeType.ofImage())
|
||||
.setImageEngine(GlideEngine.createGlideEngine())
|
||||
.setMaxSelectNum(1)
|
||||
// .setMaxVideoSelectNum(9)
|
||||
.setSelectorUIStyle(selectorStyle)
|
||||
.forResult(new OnResultCallbackListener<LocalMedia>() {
|
||||
@Override
|
||||
public void onResult(ArrayList<LocalMedia> result) {
|
||||
for (int i = 0; i < result.size(); ++i) {
|
||||
LogUtils.i("地址是啥:" + result.get(i).getRealPath());
|
||||
File file = new File(result.get(i).getRealPath());
|
||||
toUpdateBg(file);
|
||||
}
|
||||
.setSelectorUIStyle(selectorStyle)
|
||||
.forResult(new OnResultCallbackListener<LocalMedia>() {
|
||||
@Override
|
||||
public void onResult(ArrayList<LocalMedia> result) {
|
||||
for (int i = 0; i < result.size(); ++i) {
|
||||
LogUtils.i("地址是啥:" + result.get(i).getRealPath());
|
||||
File file = new File(result.get(i).getRealPath());
|
||||
toUpdateBg(file);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {
|
||||
@Override
|
||||
public void onCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void bindInfo() {
|
||||
@@ -206,24 +208,24 @@ public class BindWeChatOrAliPayActivity extends BaseActivity{
|
||||
viewBinding.sumbitBt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())){
|
||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您的真实姓名");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())){
|
||||
if(isWeChat){
|
||||
if (TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())) {
|
||||
if (isWeChat) {
|
||||
ToastX.showShortToast("请输入您本人使用的微信账号");
|
||||
}else{
|
||||
} else {
|
||||
ToastX.showShortToast("请输入您本人使用的支付宝账号");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(imageFile == null){
|
||||
if(isWeChat){
|
||||
if (imageFile == null) {
|
||||
if (isWeChat) {
|
||||
ToastX.showShortToast("请上传微信收款码");
|
||||
}else{
|
||||
} else {
|
||||
ToastX.showShortToast("请上传支付宝收款码");
|
||||
}
|
||||
return;
|
||||
@@ -396,8 +398,8 @@ public class BindWeChatOrAliPayActivity extends BaseActivity{
|
||||
}
|
||||
|
||||
|
||||
private void toQIiNiuYunOss(File file ) {
|
||||
String updatePathPic = isWeChat?"wechat":"alipay";
|
||||
private void toQIiNiuYunOss(File file) {
|
||||
String updatePathPic = isWeChat ? "wechat" : "alipay";
|
||||
|
||||
// new Handler().post(() -> QiNiuTool.upload(convertFileToBytes(file)));
|
||||
UploadOptions options = new UploadOptions(null, null, true,
|
||||
@@ -434,10 +436,10 @@ public class BindWeChatOrAliPayActivity extends BaseActivity{
|
||||
try {
|
||||
|
||||
LogUtils.i("地址是啥:" + response.getString("key"));
|
||||
toPush("https://qn.hnsdl.com/" + response.getString("key"));
|
||||
toPush(IMUIKitConfig.OSS_URL + response.getString("key"));
|
||||
|
||||
} catch (JSONException e) {
|
||||
LogUtils.i("结果是啥失败:" +e);
|
||||
LogUtils.i("结果是啥失败:" + e);
|
||||
|
||||
}
|
||||
|
||||
@@ -450,7 +452,48 @@ public class BindWeChatOrAliPayActivity extends BaseActivity{
|
||||
}
|
||||
|
||||
private void toPush(String key) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (isWeChat) {
|
||||
map.put("wxRealName", viewBinding.nameEt.getText().toString().trim());
|
||||
map.put("wxNo", viewBinding.numberEt.getText().toString().trim());
|
||||
map.put("wxQrCode", key);
|
||||
Api.getInstance().AuthBindWx(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
map.put("alipayRealName", viewBinding.nameEt.getText().toString().trim());
|
||||
map.put("alipayNo", viewBinding.numberEt.getText().toString().trim());
|
||||
map.put("alipayQrCode", key);
|
||||
Api.getInstance().AuthBindAlipay(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.hbl.lewan.wallet;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -15,6 +16,7 @@ import com.hbl.lewan.databinding.ActivityWalletInfoNewBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
import com.hbl.lewan.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.LoginBean;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
import com.hbl.lewan.network.BaseObserver;
|
||||
@@ -25,6 +27,7 @@ import com.hbl.lewan.utils.AppUtils;
|
||||
import com.hbl.lewan.utils.GsonUtils;
|
||||
import com.hbl.lewan.utils.LogUtils;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@@ -36,6 +39,13 @@ public class MyWalletActivity extends BaseActivity {
|
||||
WalletBean walletBean;
|
||||
BindBean bindBean;
|
||||
|
||||
|
||||
public static int TYPE_TOPUP = 1;
|
||||
public static int TYPE_TIXIAN = 2;
|
||||
public static int TYPE_BANK = 3;
|
||||
public static int TYPE_WECHAT = 4;
|
||||
public static int TYPE_ALIPAY = 5;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
|
||||
@@ -46,10 +56,62 @@ public class MyWalletActivity extends BaseActivity {
|
||||
setContentView(viewBinding.getRoot());
|
||||
isG = getIntent().getBooleanExtra("isG", true);
|
||||
initView();
|
||||
getWallet();
|
||||
bindInfo();
|
||||
}
|
||||
|
||||
LoginBean locUser;
|
||||
|
||||
private void getUserInfo(int type) {
|
||||
if (locUser != null && !TextUtils.isEmpty(locUser.getRealName())) {
|
||||
toNextType(type);
|
||||
} else {
|
||||
Api.getInstance().userInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<LoginBean> feedbackResp) {
|
||||
locUser = feedbackResp.data;
|
||||
if (locUser != null && !TextUtils.isEmpty(locUser.getRealName())) {
|
||||
toNextType(type);
|
||||
} else {
|
||||
ToastX.showShortToast("请先完成实名认证!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void toNextType(int type) {
|
||||
if (type == TYPE_TOPUP) {
|
||||
startActivity(new Intent(MyWalletActivity.this, TopUpActivity.class));
|
||||
} else if (type == TYPE_TIXIAN) {
|
||||
startActivity(new Intent(MyWalletActivity.this, TiXianActivity.class));
|
||||
} else if (type == TYPE_BANK) {
|
||||
startActivity(new Intent(MyWalletActivity.this, BankListActivity.class));
|
||||
} else if (type == TYPE_WECHAT) {
|
||||
startActivity(new Intent(MyWalletActivity.this, ToBindWeChatOrAliPayActivity.class));
|
||||
} else if (type == TYPE_ALIPAY) {
|
||||
Intent i = new Intent(MyWalletActivity.this, ToBindWeChatOrAliPayActivity.class);
|
||||
i.putExtra("isWeChat", false);
|
||||
startActivity(i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
getWallet();
|
||||
}
|
||||
|
||||
private void bindInfo() {
|
||||
Api.getInstance().bindInfo(IMKitClient.account())
|
||||
@@ -84,8 +146,8 @@ public class MyWalletActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
viewBinding.czBt.setOnClickListener(v -> startActivity(new Intent(MyWalletActivity.this, TopUpActivity.class)));
|
||||
viewBinding.txBt.setOnClickListener(v -> startActivity(new Intent(MyWalletActivity.this, TiXianActivity.class)));
|
||||
viewBinding.czBt.setOnClickListener(v -> getUserInfo(TYPE_TOPUP));
|
||||
viewBinding.txBt.setOnClickListener(v -> getUserInfo(TYPE_TIXIAN));
|
||||
viewBinding.czjlBt.setOnClickListener(v -> startActivity(new Intent(MyWalletActivity.this, ChongZhiLogActivity.class)));
|
||||
viewBinding.txjlBt.setOnClickListener(v -> startActivity(new Intent(MyWalletActivity.this, TiXianLogActivity.class)));
|
||||
|
||||
@@ -103,14 +165,10 @@ public class MyWalletActivity extends BaseActivity {
|
||||
});
|
||||
|
||||
viewBinding.smrzBt.setOnClickListener(v -> startActivity(new Intent(MyWalletActivity.this, ShiMingActivity.class)));
|
||||
viewBinding.wdyhkBt.setOnClickListener(v -> startActivity(new Intent(MyWalletActivity.this, BankListActivity.class)));
|
||||
viewBinding.wdyhkBt.setOnClickListener(v -> getUserInfo(TYPE_BANK));
|
||||
|
||||
viewBinding.wdwxBt.setOnClickListener(v -> startActivity(new Intent(MyWalletActivity.this, ToBindWeChatOrAliPayActivity.class)));
|
||||
viewBinding.wdzfbBt.setOnClickListener(v ->{
|
||||
Intent i = new Intent(MyWalletActivity.this, ToBindWeChatOrAliPayActivity.class);
|
||||
i.putExtra("isWeChat",false);
|
||||
startActivity(i);
|
||||
});
|
||||
viewBinding.wdwxBt.setOnClickListener(v -> getUserInfo(TYPE_WECHAT));
|
||||
viewBinding.wdzfbBt.setOnClickListener(v -> getUserInfo(TYPE_ALIPAY));
|
||||
|
||||
|
||||
}
|
||||
@@ -184,12 +242,13 @@ public class MyWalletActivity extends BaseActivity {
|
||||
|
||||
private void changeInfo() {
|
||||
// if (walletBean != null) {
|
||||
viewBinding.jinbiYueTv.setText("¥ "+AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
viewBinding.jinbiYueTv.setText("¥ " + AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
@@ -197,6 +256,4 @@ public class MyWalletActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.hbl.lewan.wallet;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
@@ -138,7 +139,9 @@ public class PayPasswordActivity extends BaseActivity {
|
||||
maps.put("areaCode", bean.getAreaCode());
|
||||
maps.put("verifyCode", code);
|
||||
maps.put("payPassword", passwordCode);
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
maps.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
|
||||
Api.getInstance().setPayPasswordByVerifyCode(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.hbl.lewan.wallet;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
@@ -20,6 +21,7 @@ import com.hbl.lewan.databinding.ActivityWalletInfoNewBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
import com.hbl.lewan.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.LoginBean;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
import com.hbl.lewan.network.BaseObserver;
|
||||
@@ -36,6 +38,9 @@ import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
@@ -52,139 +57,107 @@ public class ShiMingActivity extends BaseActivity {
|
||||
viewBinding = ActivityShimingBinding.inflate(getLayoutInflater());
|
||||
setContentView(viewBinding.getRoot());
|
||||
initView();
|
||||
getWallet();
|
||||
bindInfo();
|
||||
getUserInfo();
|
||||
}
|
||||
|
||||
LoginBean locUser;
|
||||
|
||||
private void bindInfo() {
|
||||
Api.getInstance().bindInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<BindBean>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||
bindBean = feedbackResp.data;
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(bindBean));
|
||||
}
|
||||
private void getUserInfo() {
|
||||
Api.getInstance().userInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<LoginBean> feedbackResp) {
|
||||
locUser = feedbackResp.data;
|
||||
if (locUser != null && !TextUtils.isEmpty(locUser.getRealName())) {
|
||||
showShiMing(locUser);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void showShiMing(LoginBean locUser) {
|
||||
viewBinding.nameEt.setText(locUser.getRealName());
|
||||
viewBinding.numberEt.setText(locUser.getIdCard());
|
||||
viewBinding.tipsTv.setVisibility(View.VISIBLE);
|
||||
viewBinding.sumbitBt.setText("返回");
|
||||
viewBinding.nameEt.setClickable(false);
|
||||
viewBinding.nameEt.setEnabled(false);
|
||||
viewBinding.numberEt.setClickable(false);
|
||||
viewBinding.numberEt.setEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
protected void initView() {
|
||||
viewBinding.contactListActivityTitleBar.getBackImageView().setOnClickListener(v -> finish());
|
||||
|
||||
|
||||
viewBinding.sumbitBt.setOnClickListener(v -> {
|
||||
|
||||
if(viewBinding.sumbitBt.getText().toString().trim().equals("返回")){
|
||||
finish();
|
||||
}else {
|
||||
|
||||
if(TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())){
|
||||
ToastX.showShortToast("请输入您的真实姓名");
|
||||
return;
|
||||
}
|
||||
|
||||
if(TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())){
|
||||
ToastX.showShortToast("请输入您本人的身份证号码");
|
||||
return;
|
||||
}
|
||||
|
||||
//Context context, String content, String cancel, String sure, boolean showCancel
|
||||
ActionConfirmDialog actionConfirmDialog = new ActionConfirmDialog(ShiMingActivity.this, "实名认证一经提交,无法更改,请务必确认填写的是真实资料", "取消","确认提交",true);
|
||||
actionConfirmDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
|
||||
if (TextUtils.isEmpty(viewBinding.nameEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您的真实姓名");
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
if (TextUtils.isEmpty(viewBinding.numberEt.getText().toString().trim())) {
|
||||
ToastX.showShortToast("请输入您本人的身份证号码");
|
||||
return;
|
||||
}
|
||||
});
|
||||
actionConfirmDialog.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void showDialogPay() {
|
||||
|
||||
com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog actionDialog = new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog(ShiMingActivity.this,
|
||||
getString(com.netease.yunxin.kit.chatkit.ui.R.string.bind_phone_des_txt1), getString(com.netease.yunxin.kit.chatkit.ui.R.string.cancel_txt), getString(com.netease.yunxin.kit.chatkit.ui.R.string.to_sett_txt));
|
||||
actionDialog.setOnToActionListener(new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
// Intent intent = new Intent(getActivity(), ChangeAccoutActionActivity.class);
|
||||
// intent.putExtra("type", 5);
|
||||
// startActivity(intent);
|
||||
Intent intent = new Intent(ShiMingActivity.this, SetPayPasswordActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
|
||||
private void showDialog() {
|
||||
|
||||
ActionConfirmDialog actionDialog = new ActionConfirmDialog(ShiMingActivity.this,
|
||||
getString(R.string.bind_phone_des_txt), getString(R.string.nobind_txt), getString(R.string.tobind_txt));
|
||||
actionDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
Intent intent = new Intent(ShiMingActivity.this, ChangeAccoutActionActivity.class);
|
||||
intent.putExtra("type", ChangeAccoutActionActivity.TYPE_BIND_PHONE);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
private void getWallet() {
|
||||
Api.getInstance().walletInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<WalletBean>>() {
|
||||
//Context context, String content, String cancel, String sure, boolean showCancel
|
||||
ActionConfirmDialog actionConfirmDialog = new ActionConfirmDialog(ShiMingActivity.this, "实名认证一经提交,无法更改,请务必确认填写的是真实资料", "取消", "确认提交", true);
|
||||
actionConfirmDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
toSumbitRecent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<WalletBean> feedbackResp) {
|
||||
walletBean = feedbackResp.data;
|
||||
changeInfo();
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionConfirmDialog.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void toSumbitRecent() {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("realName", viewBinding.nameEt.getText().toString().trim());
|
||||
map.put("idCardNo", viewBinding.numberEt.getText().toString().trim());
|
||||
|
||||
Api.getInstance().recent(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
getUserInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void changeInfo() {
|
||||
if (walletBean != null) {
|
||||
// viewBinding.jinbiYueTv.setText(AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.TextView;
|
||||
@@ -19,6 +20,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.hbl.lewan.IMApplication;
|
||||
import com.hbl.lewan.IMUIKitConfig;
|
||||
import com.hbl.lewan.R;
|
||||
import com.hbl.lewan.adapter.CommonAdapter;
|
||||
@@ -26,16 +28,24 @@ import com.hbl.lewan.adapter.ViewHolder;
|
||||
import com.hbl.lewan.databinding.ActivityTixianBinding;
|
||||
import com.hbl.lewan.databinding.ActivityTopupBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
import com.hbl.lewan.dialog.PayDialog;
|
||||
import com.hbl.lewan.dialog.SelectBanksDialog;
|
||||
import com.hbl.lewan.game.JsBridgeActivity;
|
||||
import com.hbl.lewan.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.lewan.model.BankBean;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.ExchangeConfBean;
|
||||
import com.hbl.lewan.model.InstallmentBean;
|
||||
import com.hbl.lewan.model.PayInfoWxBean;
|
||||
import com.hbl.lewan.model.SendOrderBean;
|
||||
import com.hbl.lewan.model.TiXianConfBean;
|
||||
import com.hbl.lewan.model.TopUpBean;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
import com.hbl.lewan.network.BaseObserver;
|
||||
import com.hbl.lewan.network.Result;
|
||||
import com.hbl.lewan.utils.AppUtils;
|
||||
import com.hbl.lewan.utils.DataUtils;
|
||||
import com.hbl.lewan.utils.GsonUtils;
|
||||
import com.hbl.lewan.utils.LogUtils;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
@@ -56,14 +66,16 @@ public class TiXianActivity extends BaseActivity {
|
||||
ActivityTixianBinding viewBinding;
|
||||
WalletBean walletBean;
|
||||
BindBean bindBean;
|
||||
private List<ExchangeConfBean.AmountItemsDTO> globalAmountList = new ArrayList<>();
|
||||
private List<InstallmentBean> installmentBeans = new ArrayList<>();
|
||||
// CommonAdapter commonAdapter;
|
||||
CommonAdapter installmentAdapter;
|
||||
int defaultIndex = 0; //输入的金额
|
||||
private boolean isFenqi = false;
|
||||
private int installmentNum; //分期數
|
||||
TiXianConfBean bankConfBean;
|
||||
TiXianConfBean aliPayConfBean;
|
||||
TiXianConfBean tiXianConfBean;
|
||||
|
||||
ArrayList<BankBean> bankBeans = new ArrayList<>();
|
||||
ArrayList<BankBean> aliPayBeans = new ArrayList<>();
|
||||
BankBean bankBean;
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
// getWindow().setStatusBarColor(getResources().getColor(R.color.color_403d51));
|
||||
@@ -73,172 +85,56 @@ public class TiXianActivity extends BaseActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
viewBinding = ActivityTixianBinding.inflate(getLayoutInflater());
|
||||
setContentView(viewBinding.getRoot());
|
||||
setSelector(false);
|
||||
setFenqiView(false);
|
||||
initView();
|
||||
bindInfo();
|
||||
viewBinding.rbBank.setVisibility(View.GONE);
|
||||
viewBinding.rbAlipay.setVisibility(View.GONE);
|
||||
getConf();
|
||||
|
||||
getWallet();
|
||||
getBankList();
|
||||
authPayInfo();
|
||||
}
|
||||
|
||||
public void setFenqiView(boolean show) {
|
||||
// viewBinding.lineInstall.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
// viewBinding.tvPaytypeFenqi.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
viewBinding.recyclerInstallment.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void setSelector(boolean fenqi) {
|
||||
isFenqi = fenqi;
|
||||
if (fenqi) {
|
||||
// viewBinding.tvPaytypeCard.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.dialog_gou_ff), null);
|
||||
// viewBinding.tvPaytypeFenqi.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.ic_single_selected), null);
|
||||
} else {
|
||||
// viewBinding.tvPaytypeCard.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.ic_single_selected), null);
|
||||
// viewBinding.tvPaytypeFenqi.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.dialog_gou_ff), null);
|
||||
installmentNum = 0;
|
||||
if (installmentAdapter != null)
|
||||
installmentAdapter.notifyDataSetChanged();
|
||||
}
|
||||
private void authPayInfo() {
|
||||
Api.getInstance().authPayInfo()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<PayInfoWxBean> feedbackResp) {
|
||||
if(feedbackResp!=null&&feedbackResp.data!=null){
|
||||
if(!TextUtils.isEmpty(feedbackResp.data.getAlipayNo())){
|
||||
BankBean bankBean = new BankBean();
|
||||
bankBean.setBankName("支付宝");
|
||||
bankBean.setCardholderName(feedbackResp.data.getAlipayRealName());
|
||||
bankBean.setNumber(feedbackResp.data.getAlipayNo());
|
||||
bankBean.setId(-1);
|
||||
aliPayBeans.clear();
|
||||
aliPayBeans.add(bankBean);
|
||||
|
||||
if(viewBinding.rbAlipay.isChecked()){
|
||||
showAlipay();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
getWallet();
|
||||
}
|
||||
|
||||
private void bindInfo() {
|
||||
Api.getInstance().bindInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||
bindBean = feedbackResp.data;
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(bindBean));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void getFee() {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("amount", defaultIndex);
|
||||
Api.getInstance().getFee(params)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<InstallmentBean>> feedbackResp) {
|
||||
LogUtils.i("获取到的数据:" + feedbackResp.data);
|
||||
installmentBeans.clear();
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
installmentBeans.addAll(feedbackResp.data);
|
||||
installmentNum = 0;
|
||||
}
|
||||
installmentAdapter.notifyDataSetChanged();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void payInstallment(int installment) {
|
||||
if (exchangeConfBean != null) {
|
||||
if ((defaultIndex < exchangeConfBean.getMinAmount()) || (defaultIndex > exchangeConfBean.getMaxAmount())) {
|
||||
ToastUtils.showShort(String.format(getString(R.string.taixiao_topup_txt), exchangeConfBean.getMinAmount() / exchangeConfBean.getExchangeRatio(), exchangeConfBean.getMaxAmount() / exchangeConfBean.getExchangeRatio()));
|
||||
return;
|
||||
}
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
maps.put("amount", defaultIndex);
|
||||
maps.put("type", 5);
|
||||
maps.put("installment", installment);
|
||||
Api.getInstance().payInstallment(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
LogUtils.i("获取到的数据:" + feedbackResp.data);
|
||||
if (!TextUtils.isEmpty(feedbackResp.data)) {
|
||||
// String packageName = "com.chailease.tw.app.android.ccfappcust.uat"; // 目标应用的包名
|
||||
// PackageManager packageManager = getPackageManager();
|
||||
// Intent intent = new Intent();
|
||||
// intent = packageManager.getLaunchIntentForPackage(packageName);
|
||||
// intent.setData(Uri.parse(feedbackResp.data));
|
||||
// if (intent == null) {
|
||||
// ToastUtils.showShort("请安装银角零卡APP");
|
||||
// } else {
|
||||
// startActivity(intent);
|
||||
// }
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(feedbackResp.data));
|
||||
startActivity(intent);
|
||||
// Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(feedbackResp.data));
|
||||
// startActivity(intent);
|
||||
// BrowseActivity.Companion.launch(
|
||||
// TopUpActivity.this, getString(R.string.cash_cuzhi_txt), feedbackResp.data);
|
||||
// startActivity(new Intent(TopUpActivity.this, PayWebActivity.class).putExtra("url", feedbackResp.data));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void initView() {
|
||||
// Drawable drawable = viewBinding.titlebar.getBackImageView().getDrawable().mutate();//
|
||||
// Drawable wrap = DrawableCompat.wrap(drawable);
|
||||
// DrawableCompat.setTint(wrap, ContextCompat.getColor(this, R.color.color_d4ab90));
|
||||
// viewBinding.titlebar.getBackImageView().setImageDrawable(wrap);
|
||||
viewBinding.titlebar.getBackImageView().setOnClickListener(v -> finish());
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(TiXianActivity.this);
|
||||
// linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
viewBinding.recyclerInstallment.setLayoutManager(linearLayoutManager);
|
||||
installmentAdapter = new CommonAdapter<InstallmentBean>(TiXianActivity.this, R.layout.item_bill_installment, installmentBeans) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, InstallmentBean s, int index) {
|
||||
TextView titleTv = holder.getView(R.id.title_tv);
|
||||
TextView desTv = holder.getView(R.id.des_tv);
|
||||
titleTv.setText(getString(R.string.str_qi, s.getPeriodCount()));
|
||||
desTv.setText(getString(R.string.str_installment_tips, s.getAmount()));
|
||||
LinearLayout big_bg = holder.getView(R.id.big_bg);
|
||||
if (s.getPeriodCount() == installmentNum) {
|
||||
titleTv.setTextColor(Color.parseColor("#FF9C32"));
|
||||
desTv.setTextColor(Color.parseColor("#FF9C32"));
|
||||
big_bg.setBackgroundResource(R.drawable.logout_btn_main2);
|
||||
} else {
|
||||
titleTv.setTextColor(getColor(R.color.color_333333));
|
||||
desTv.setTextColor(getColor(R.color.color_333333));
|
||||
big_bg.setBackgroundResource(R.drawable.input_bg_t);
|
||||
}
|
||||
|
||||
big_bg.setOnClickListener(v -> {
|
||||
installmentNum = s.getPeriodCount();
|
||||
notifyDataSetChanged();
|
||||
// viewBinding.tvCashvalue.setText("NT$:" + (defaultIndex + s.getAmount()));
|
||||
setSelector(true);
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
viewBinding.recyclerInstallment.setAdapter(installmentAdapter);
|
||||
viewBinding.editQueryEt.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
@@ -249,132 +145,120 @@ public class TiXianActivity extends BaseActivity {
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
if (TextUtils.isEmpty(viewBinding.editQueryEt.getText().toString().trim())) {
|
||||
defaultIndex = 0;
|
||||
viewBinding.showYujiTv.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
if (exchangeConfBean != null) {
|
||||
defaultIndex = Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim()) * exchangeConfBean.getExchangeRatio();
|
||||
} else {
|
||||
defaultIndex = Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim());
|
||||
defaultIndex = Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim());
|
||||
|
||||
if(tiXianConfBean!=null) {
|
||||
viewBinding.showYujiTv.setVisibility(View.VISIBLE);
|
||||
double shouxufei = (defaultIndex * tiXianConfBean.getFeeRate()/100f);
|
||||
if(shouxufei<tiXianConfBean.getBaseFee()){
|
||||
shouxufei = tiXianConfBean.getBaseFee();
|
||||
}
|
||||
double sizes = defaultIndex*1.0-shouxufei;
|
||||
viewBinding.showYujiTv.setText(Html.fromHtml("预计到账金额:<font color = '#FA6947'>"+String.format("%.2f",sizes)+"</font>元"));
|
||||
}else{
|
||||
viewBinding.showYujiTv.setVisibility(View.INVISIBLE);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
showBottomType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
// commonAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
// AnimUtil.setAnimViews(viewBinding.topupTv);
|
||||
|
||||
// viewBinding.topupTv.setOnClickListener(v -> {
|
||||
// if (bindBean != null) {
|
||||
// if (!bindBean.getPhoneBind()) {
|
||||
// showDialog();
|
||||
// } else if (!bindBean.getPayPasswordSet()) {
|
||||
// showDialogPay();
|
||||
// } else {
|
||||
// if (isFenqi) {
|
||||
// if (installmentNum == 0) {
|
||||
// ToastUtils.showShort(getString(R.string.str_installment_toast));
|
||||
// return;
|
||||
// }
|
||||
// payInstallment(installmentNum);
|
||||
// } else {
|
||||
// sumbit();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// viewBinding.tvPaytypeCard.setOnClickListener(v -> {
|
||||
// setSelector(false);
|
||||
// });
|
||||
// viewBinding.tvPaytypeFenqi.setOnClickListener(v -> {
|
||||
// setSelector(true);
|
||||
// if (defaultIndex > 0) {
|
||||
// getFee();
|
||||
// }
|
||||
// });
|
||||
viewBinding.tipsTv.setText(Html.fromHtml("单笔提现手续费<font color = '#FA6947'>2</font>元<br>提现费率<font color = '#FA6947'>0.5%</font><br>预计到账时间<font color = '#FA6947'>2</font>小时以内"));
|
||||
// viewBinding.radioRg.setOnCheckedChangeListener(((group, checkedId) -> {
|
||||
// RadioButton radioButton = (RadioButton) findViewById(checkedId);
|
||||
// Toast.makeText(getApplicationContext(),"你选了:"+radioButton.getText(),Toast.LENGTH_LONG).show();
|
||||
// }));
|
||||
|
||||
viewBinding.radioRg.setOnCheckedChangeListener(((group, checkedId) -> {
|
||||
RadioButton radioButton = (RadioButton) findViewById(checkedId);
|
||||
Toast.makeText(getApplicationContext(),"你选了:"+radioButton.getText(),Toast.LENGTH_LONG).show();
|
||||
}));
|
||||
}
|
||||
viewBinding.rbBank.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
if(isChecked){
|
||||
showBank();
|
||||
|
||||
private void showBottomType() {
|
||||
// viewBinding.tvCashvalue.setText("NT$:" + defaultIndex);
|
||||
setFenqiView(false);
|
||||
if (defaultIndex >= 1000) {
|
||||
setFenqiView(true);
|
||||
getFee();
|
||||
}
|
||||
}
|
||||
});
|
||||
viewBinding.rbAlipay.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||
if(isChecked){
|
||||
showAlipay();
|
||||
|
||||
// if (exchangeConfBean != null) {
|
||||
// if(TextUtils.isEmpty(viewBinding.editQueryEt.getText().toString().trim())){
|
||||
// viewBinding.showZidingyiLy.setVisibility(View.GONE);
|
||||
// }else{
|
||||
// viewBinding.showZidingyiLy.setVisibility(View.VISIBLE);
|
||||
// viewBinding.zidingyicashTv.setText(defaultIndex+"");
|
||||
// }
|
||||
// }else{
|
||||
// viewBinding.showZidingyiLy.setVisibility(View.GONE);
|
||||
//
|
||||
// }
|
||||
}
|
||||
});
|
||||
viewBinding.shoukuanBt.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(tiXianConfBean!=null){
|
||||
showFloatType(tiXianConfBean);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
viewBinding.allTxTv.setOnClickListener(v -> {
|
||||
if(walletBean!=null){
|
||||
viewBinding.editQueryEt.setText((walletBean.getGoldCoin()/100)+"");
|
||||
}
|
||||
});
|
||||
|
||||
private void sumbit() {
|
||||
if (exchangeConfBean != null) {
|
||||
if ((defaultIndex < exchangeConfBean.getMinAmount()) || (defaultIndex > exchangeConfBean.getMaxAmount())) {
|
||||
ToastUtils.showShort(String.format(getString(R.string.taixiao_topup_txt), exchangeConfBean.getMinAmount() / exchangeConfBean.getExchangeRatio(), exchangeConfBean.getMaxAmount() / exchangeConfBean.getExchangeRatio()));
|
||||
return;
|
||||
viewBinding.tixianBt.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if(TextUtils.isEmpty(viewBinding.editQueryEt.getText().toString().trim())){
|
||||
ToastX.showShortToast("请先输入提现金额");
|
||||
return;
|
||||
}
|
||||
if(walletBean==null){
|
||||
ToastX.showShortToast("获取钱包信息失败");
|
||||
return;
|
||||
}
|
||||
if(Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim())>walletBean.getGoldCoin()/100){
|
||||
ToastX.showShortToast("最多可以提取"+(walletBean.getGoldCoin()/100)+"元");
|
||||
return;
|
||||
}
|
||||
if (bankBean == null){
|
||||
ToastX.showShortToast("请先选择提现渠道");
|
||||
return;
|
||||
}
|
||||
|
||||
PayDialog payDialog = new PayDialog(TiXianActivity.this, "", false);
|
||||
payDialog.setOntoAlbumListener(new PayDialog.OnListItemClickListener() {
|
||||
@Override
|
||||
public void onPayPass(String position) {
|
||||
toSumbit();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dimess() {
|
||||
|
||||
}
|
||||
});
|
||||
payDialog.show();
|
||||
}
|
||||
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("amount", defaultIndex);
|
||||
map.put("type", "3"); //信用卡支付
|
||||
Api.getInstance().sendOrderV2(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<SendOrderBean> feedbackResp) {
|
||||
startToWeb(feedbackResp.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
private void toSumbit() {
|
||||
Map<String,Object> map = new HashMap<String, Object>();
|
||||
map.put("amount", Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim())*100);
|
||||
map.put("withdrawConfId", tiXianConfBean.getId()); //信用卡支付
|
||||
if(tiXianConfBean.getType() ==1){
|
||||
map.put("bankCardId", bankBean.getId()); //信用卡支付
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void startToWeb(SendOrderBean sendOrderBean) {
|
||||
String url = IMUIKitConfig.ONLINE_PAYMENT_URL + "?" + sendOrderBean.getQuery() + "&exchangeRatio=" + exchangeConfBean.getExchangeRatio() + "&type=3";
|
||||
LogUtils.i("请求地址:" + url);
|
||||
BrowseActivity.Companion.launch(
|
||||
TiXianActivity.this, getString(R.string.cash_cuzhi_txt), url);
|
||||
}
|
||||
|
||||
|
||||
ExchangeConfBean exchangeConfBean;
|
||||
|
||||
private void getConf() {
|
||||
Api.getInstance().chargeConf()
|
||||
Api.getInstance().withdrawApply(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<ExchangeConfBean>>() {
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<ExchangeConfBean> feedbackResp) {
|
||||
exchangeConfBean = feedbackResp.data;
|
||||
if (feedbackResp != null && feedbackResp.data.getAmountItems() != null) {
|
||||
globalAmountList = feedbackResp.data.getAmountItems();
|
||||
// commonAdapter.setDates(globalAmountList);
|
||||
}
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
// startToWeb(feedbackResp.data);
|
||||
//{"data":"https://z80.fenouliu.cc/pay/wechat/250428091839829744550037","code":1}
|
||||
//{"data":"https://t501.pay24t.com/form/payorderzz.html?id=db04e412-be26-4946-8f06-c00c582137df","code":1}
|
||||
viewBinding.editQueryEt.setText("");
|
||||
getWallet();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -384,6 +268,157 @@ public class TiXianActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void showAlipay() {
|
||||
tiXianConfBean = aliPayConfBean;
|
||||
viewBinding.shoukuanBt.setHint("请选择支付宝账号");
|
||||
if(aliPayBeans!=null&&aliPayBeans.size()>0){
|
||||
viewBinding.shoukuanBt.setText(aliPayBeans.get(0).getCardholderName()+" "+aliPayBeans.get(0).getBankName()+" "+aliPayBeans.get(0).getNumber());
|
||||
bankBean =aliPayBeans.get(0);
|
||||
}
|
||||
if(tiXianConfBean!=null) {
|
||||
viewBinding.tipsTv.setText(Html.fromHtml("单笔提现手续费<font color = '#FA6947'>" + tiXianConfBean.getBaseFee() + "</font>元<br>提现费率<font color = '#FA6947'>" + tiXianConfBean.getFeeRate() + "%</font><br>预计到账时间<font color = '#FA6947'>2</font>小时以内"));
|
||||
}
|
||||
}
|
||||
|
||||
private void showBank() {
|
||||
|
||||
tiXianConfBean = bankConfBean;
|
||||
viewBinding.shoukuanBt.setHint("请选择银行卡");
|
||||
if(bankBeans!=null&&bankBeans.size()>0){
|
||||
viewBinding.shoukuanBt.setText(bankBeans.get(0).getCardholderName()+" "+bankBeans.get(0).getBankName()+" "+bankBeans.get(0).getNumber());
|
||||
bankBean =bankBeans.get(0);
|
||||
}
|
||||
if(tiXianConfBean!=null) {
|
||||
viewBinding.tipsTv.setText(Html.fromHtml("单笔提现手续费<font color = '#FA6947'>" + tiXianConfBean.getBaseFee() + "</font>元<br>提现费率<font color = '#FA6947'>" + tiXianConfBean.getFeeRate() + "%</font><br>预计到账时间<font color = '#FA6947'>2</font>小时以内"));
|
||||
}
|
||||
}
|
||||
|
||||
private void showFloatType(TiXianConfBean tiXianConfBean) {
|
||||
if(bankBean==null){
|
||||
if(tiXianConfBean.getType()==1){
|
||||
if(bankBeans!=null&&bankBeans.size()>0){
|
||||
bankBean = bankBeans.get(0);
|
||||
}
|
||||
}else{
|
||||
if(aliPayBeans!=null&&aliPayBeans.size()>0){
|
||||
bankBean = aliPayBeans.get(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SelectBanksDialog sp = new SelectBanksDialog(TiXianActivity.this,tiXianConfBean,tiXianConfBean.getType()==1?bankBeans:aliPayBeans,bankBean);
|
||||
sp.setOnToVipListener(new SelectBanksDialog.OnToTypeListener() {
|
||||
@Override
|
||||
public void toType(BankBean type) {
|
||||
bankBean = type;
|
||||
viewBinding.shoukuanBt.setText(bankBean.getCardholderName()+" "+bankBean.getBankName()+" "+bankBean.getNumber());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBind(TiXianConfBean tiXianConfBean) {
|
||||
if(tiXianConfBean.getType()==1){
|
||||
startActivityForResult(new Intent(TiXianActivity.this, AddBankActivity.class),888);
|
||||
}else{
|
||||
Intent i = new Intent(TiXianActivity.this, BindWeChatOrAliPayActivity.class);
|
||||
i.putExtra("isWeChat",false);
|
||||
startActivityForResult(i,777);
|
||||
}
|
||||
}
|
||||
});
|
||||
sp.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if(resultCode == RESULT_OK){
|
||||
if(requestCode == 888) {
|
||||
getBankList();
|
||||
}else if(requestCode == 777){
|
||||
authPayInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getConf() {
|
||||
Map<String, Object> conf = new HashMap<>();
|
||||
conf.put("token", DataUtils.getToken());
|
||||
Api.getInstance().withdrawConf(conf)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<TiXianConfBean>> feedbackResp) {
|
||||
// {"data":[{"id":1,"channel":"支付宝","code":"902","type":2,"baseFee":2.00,"feeRate":8.00,"status":1},
|
||||
// {"id":2,"channel":"银行卡","code":"900","type":1,"baseFee":2.00,"feeRate":8.00,"status":1}],"code":1}
|
||||
|
||||
if(feedbackResp!=null&&feedbackResp.data!=null&&feedbackResp.data.size()>0){
|
||||
for (int i = 0;i<feedbackResp.data.size();i++) {
|
||||
if (feedbackResp.data.get(i).getType() == 1) {
|
||||
bankConfBean = feedbackResp.data.get(i);
|
||||
} else if (feedbackResp.data.get(i).getType() == 2) {
|
||||
aliPayConfBean = feedbackResp.data.get(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
changeBottomType();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void getBankList() {
|
||||
|
||||
Api.getInstance().getBanks()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<BankBean>> feedbackResp) {
|
||||
if(feedbackResp!=null&&feedbackResp.data.size()>0){
|
||||
bankBeans = (ArrayList<BankBean>) feedbackResp.data;
|
||||
if(viewBinding.rbBank.isChecked()){
|
||||
showBank();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
// ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void changeBottomType() {
|
||||
if(bankConfBean!=null){
|
||||
tiXianConfBean = bankConfBean;
|
||||
viewBinding.rbBank.setVisibility(View.VISIBLE);
|
||||
viewBinding.shoukuanBt.setHint("请选择银行卡");
|
||||
|
||||
if(aliPayConfBean!=null){
|
||||
viewBinding.rbAlipay.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
}else {
|
||||
if(aliPayConfBean!=null){
|
||||
tiXianConfBean = aliPayConfBean;
|
||||
viewBinding.rbAlipay.setVisibility(View.VISIBLE);
|
||||
viewBinding.rbAlipay.setChecked(true);
|
||||
viewBinding.shoukuanBt.setHint("请选择支付宝账号");
|
||||
}
|
||||
}
|
||||
viewBinding.tipsTv.setText(Html.fromHtml("单笔提现手续费<font color = '#FA6947'>"+tiXianConfBean.getBaseFee()+"</font>元<br>提现费率<font color = '#FA6947'>"+tiXianConfBean.getFeeRate()+"%</font><br>预计到账时间<font color = '#FA6947'>2</font>小时以内"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void showDialogPay() {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class TiXianLogActivity extends BaseActivity {
|
||||
getWindow().setNavigationBarColor(getResources().getColor(R.color.white));
|
||||
viewBinding.contactListActivityTitleBar.setBackgroundColor(getResources().getColor(R.color.white));
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.frameLayout, WalletInfologFragment.newInstance(0))
|
||||
.replace(R.id.frameLayout, WalletInfologFragment.newInstance(1))
|
||||
.commit();
|
||||
viewBinding.bigBg.setBackgroundResource(R.color.white);
|
||||
viewBinding.contactListActivityTitleBar.getTitleTextView().setTextColor(getColor(R.color.black));
|
||||
|
||||
@@ -2,16 +2,19 @@ package com.hbl.lewan.wallet;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.hbl.lewan.R;
|
||||
import com.hbl.lewan.databinding.ActivityShimingBinding;
|
||||
import com.hbl.lewan.databinding.ActivityToBindWechatAlipayBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
import com.hbl.lewan.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.PayInfoWxBean;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
import com.hbl.lewan.network.BaseObserver;
|
||||
@@ -19,6 +22,7 @@ import com.hbl.lewan.network.Result;
|
||||
import com.hbl.lewan.utils.GsonUtils;
|
||||
import com.hbl.lewan.utils.LogUtils;
|
||||
import com.netease.yunxin.kit.common.ui.activities.BaseActivity;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
@@ -39,29 +43,46 @@ public class ToBindWeChatOrAliPayActivity extends BaseActivity {
|
||||
setContentView(viewBinding.getRoot());
|
||||
isWeChat =getIntent().getBooleanExtra("isWeChat",true);
|
||||
initView();
|
||||
getWallet();
|
||||
bindInfo();
|
||||
|
||||
authPayInfo();
|
||||
}
|
||||
|
||||
|
||||
private void bindInfo() {
|
||||
Api.getInstance().bindInfo(IMKitClient.account())
|
||||
private void authPayInfo() {
|
||||
Api.getInstance().authPayInfo()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<BindBean>>() {
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<BindBean> feedbackResp) {
|
||||
bindBean = feedbackResp.data;
|
||||
LogUtils.i("获取到的数据:" + GsonUtils.beanToJSONString(bindBean));
|
||||
public void onSuccess(Result<PayInfoWxBean> feedbackResp) {
|
||||
if(feedbackResp!=null&&feedbackResp.data!=null){
|
||||
showType(feedbackResp.data);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showType(PayInfoWxBean feedbackResp) {
|
||||
if(isWeChat){
|
||||
if(!TextUtils.isEmpty(feedbackResp.getWxNo())){
|
||||
viewBinding.noBindLy.setVisibility(View.GONE);
|
||||
viewBinding.bindLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.xingmingTv.setText("姓名:"+feedbackResp.getWxRealName());
|
||||
viewBinding.wechatAlipayTv.setText("微信号:"+feedbackResp.getWxNo());
|
||||
Glide.with(this).load(feedbackResp.getWxQrCode()).error(R.color.color_f4f4f4).placeholder(R.color.color_f4f4f4).into(viewBinding.imageIv);
|
||||
}
|
||||
}else{
|
||||
if(!TextUtils.isEmpty(feedbackResp.getAlipayNo())){
|
||||
viewBinding.noBindLy.setVisibility(View.GONE);
|
||||
viewBinding.bindLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.xingmingTv.setText("姓名:"+feedbackResp.getAlipayRealName());
|
||||
viewBinding.wechatAlipayTv.setText("支付宝账号:"+feedbackResp.getAlipayNo());
|
||||
Glide.with(this).load(feedbackResp.getAlipayQrCode()).error(R.color.color_f4f4f4).placeholder(R.color.color_f4f4f4).into(viewBinding.imageIv);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void initView() {
|
||||
@@ -86,84 +107,10 @@ public class ToBindWeChatOrAliPayActivity extends BaseActivity {
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if(requestCode == 888&&resultCode == RESULT_OK){
|
||||
|
||||
authPayInfo();
|
||||
}
|
||||
}
|
||||
|
||||
private void showDialogPay() {
|
||||
|
||||
com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog actionDialog = new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog(ToBindWeChatOrAliPayActivity.this,
|
||||
getString(com.netease.yunxin.kit.chatkit.ui.R.string.bind_phone_des_txt1), getString(com.netease.yunxin.kit.chatkit.ui.R.string.cancel_txt), getString(com.netease.yunxin.kit.chatkit.ui.R.string.to_sett_txt));
|
||||
actionDialog.setOnToActionListener(new com.netease.yunxin.kit.chatkit.ui.dialog.ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
// Intent intent = new Intent(getActivity(), ChangeAccoutActionActivity.class);
|
||||
// intent.putExtra("type", 5);
|
||||
// startActivity(intent);
|
||||
Intent intent = new Intent(ToBindWeChatOrAliPayActivity.this, SetPayPasswordActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
|
||||
private void showDialog() {
|
||||
|
||||
ActionConfirmDialog actionDialog = new ActionConfirmDialog(ToBindWeChatOrAliPayActivity.this,
|
||||
getString(R.string.bind_phone_des_txt), getString(R.string.nobind_txt), getString(R.string.tobind_txt));
|
||||
actionDialog.setOnToActionListener(new ActionConfirmDialog.OnToActionListener() {
|
||||
@Override
|
||||
public void toSumbit() {
|
||||
Intent intent = new Intent(ToBindWeChatOrAliPayActivity.this, ChangeAccoutActionActivity.class);
|
||||
intent.putExtra("type", ChangeAccoutActionActivity.TYPE_BIND_PHONE);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toCancel() {
|
||||
|
||||
}
|
||||
});
|
||||
actionDialog.show();
|
||||
}
|
||||
|
||||
private void getWallet() {
|
||||
Api.getInstance().walletInfo(IMKitClient.account())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<WalletBean>>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(Result<WalletBean> feedbackResp) {
|
||||
walletBean = feedbackResp.data;
|
||||
changeInfo();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void changeInfo() {
|
||||
if (walletBean != null) {
|
||||
// viewBinding.jinbiYueTv.setText(AppUtils.getQian(walletBean.getGoldCoin()));
|
||||
// viewBinding.yinbiYueTv.setText(AppUtils.getQian(walletBean.getSilverCoin()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
||||
@@ -27,9 +27,12 @@ import com.hbl.lewan.databinding.ActivityTopupBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
import com.hbl.lewan.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.ChongZhiQuDaoBean;
|
||||
import com.hbl.lewan.model.ExchangeConfBean;
|
||||
import com.hbl.lewan.model.InstallmentBean;
|
||||
import com.hbl.lewan.model.SendOrderBean;
|
||||
import com.hbl.lewan.model.SeqBean;
|
||||
import com.hbl.lewan.model.SeqBeanTop;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
import com.hbl.lewan.network.BaseObserver;
|
||||
@@ -56,8 +59,8 @@ public class TopUpActivity extends BaseActivity {
|
||||
ActivityTopupBinding viewBinding;
|
||||
WalletBean walletBean;
|
||||
BindBean bindBean;
|
||||
private List<ExchangeConfBean.AmountItemsDTO> globalAmountList = new ArrayList<>();
|
||||
private List<InstallmentBean> installmentBeans = new ArrayList<>();
|
||||
private List<SeqBean> globalAmountList = new ArrayList<>();
|
||||
private List<ChongZhiQuDaoBean> installmentBeans = new ArrayList<>();
|
||||
CommonAdapter commonAdapter;
|
||||
CommonAdapter installmentAdapter;
|
||||
int defaultIndex = 0; //输入的金额
|
||||
@@ -77,28 +80,50 @@ public class TopUpActivity extends BaseActivity {
|
||||
setFenqiView(false);
|
||||
initView();
|
||||
bindInfo();
|
||||
getConf();
|
||||
// getConf();
|
||||
getConf1();
|
||||
}
|
||||
|
||||
private void getConf1() {
|
||||
Api.getInstance().chargeAmounts()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<SeqBeanTop> feedbackResp) {
|
||||
exchangeConfBean = feedbackResp.data;
|
||||
if(feedbackResp!=null&&feedbackResp.data!=null&&feedbackResp.data.getAmountItems()!=null&&feedbackResp.data.getAmountItems().size() >0){
|
||||
globalAmountList = feedbackResp.data.getAmountItems();
|
||||
commonAdapter.setDates(globalAmountList);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setFenqiView(boolean show) {
|
||||
// viewBinding.lineInstall.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
// viewBinding.tvPaytypeFenqi.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
viewBinding.recyclerInstallment.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
// viewBinding.recyclerInstallment.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
public void setSelector(boolean fenqi) {
|
||||
isFenqi = fenqi;
|
||||
if (fenqi) {
|
||||
// viewBinding.tvPaytypeCard.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.dialog_gou_ff), null);
|
||||
// viewBinding.tvPaytypeFenqi.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.ic_single_selected), null);
|
||||
} else {
|
||||
// if (fenqi) {
|
||||
//// viewBinding.tvPaytypeCard.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.dialog_gou_ff), null);
|
||||
//// viewBinding.tvPaytypeFenqi.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.ic_single_selected), null);
|
||||
// } else {
|
||||
// viewBinding.tvPaytypeCard.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.ic_single_selected), null);
|
||||
// viewBinding.tvPaytypeFenqi.setCompoundDrawablesWithIntrinsicBounds(null, null, getResources().getDrawable(R.mipmap.dialog_gou_ff), null);
|
||||
installmentNum = 0;
|
||||
if (installmentAdapter != null)
|
||||
installmentAdapter.notifyDataSetChanged();
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,15 +152,15 @@ public class TopUpActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void getFee() {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("amount", defaultIndex);
|
||||
Api.getInstance().getFee(params)
|
||||
// Map<String, Object> params = new HashMap<>();
|
||||
// params.put("amount", defaultIndex);
|
||||
Api.getInstance().chargeChannels(defaultIndex)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<List<InstallmentBean>> feedbackResp) {
|
||||
LogUtils.i("获取到的数据:" + feedbackResp.data);
|
||||
public void onSuccess(Result<List<ChongZhiQuDaoBean>> feedbackResp) {
|
||||
// LogUtils.i("获取到的数据:" + feedbackResp.data);
|
||||
installmentBeans.clear();
|
||||
if (feedbackResp.data != null && feedbackResp.data.size() > 0) {
|
||||
installmentBeans.addAll(feedbackResp.data);
|
||||
@@ -152,89 +177,85 @@ public class TopUpActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void payInstallment(int installment) {
|
||||
if (exchangeConfBean != null) {
|
||||
if ((defaultIndex < exchangeConfBean.getMinAmount()) || (defaultIndex > exchangeConfBean.getMaxAmount())) {
|
||||
ToastUtils.showShort(String.format(getString(R.string.taixiao_topup_txt), exchangeConfBean.getMinAmount() / exchangeConfBean.getExchangeRatio(), exchangeConfBean.getMaxAmount() / exchangeConfBean.getExchangeRatio()));
|
||||
return;
|
||||
}
|
||||
Map<String, Object> maps = new HashMap<>();
|
||||
maps.put("amount", defaultIndex);
|
||||
maps.put("type", 5);
|
||||
maps.put("installment", installment);
|
||||
Api.getInstance().payInstallment(maps)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
LogUtils.i("获取到的数据:" + feedbackResp.data);
|
||||
if (!TextUtils.isEmpty(feedbackResp.data)) {
|
||||
// String packageName = "com.chailease.tw.app.android.ccfappcust.uat"; // 目标应用的包名
|
||||
// PackageManager packageManager = getPackageManager();
|
||||
// Intent intent = new Intent();
|
||||
// intent = packageManager.getLaunchIntentForPackage(packageName);
|
||||
//
|
||||
// private void payInstallment(int installment) {
|
||||
// if (exchangeConfBean != null) {
|
||||
// if ((defaultIndex < exchangeConfBean.getMinAmount()) || (defaultIndex > exchangeConfBean.getMaxAmount())) {
|
||||
// ToastUtils.showShort(String.format(getString(R.string.taixiao_topup_txt), exchangeConfBean.getMinAmount() / exchangeConfBean.getExchangeRatio(), exchangeConfBean.getMaxAmount() / exchangeConfBean.getExchangeRatio()));
|
||||
// return;
|
||||
// }
|
||||
// Map<String, Object> maps = new HashMap<>();
|
||||
// maps.put("amount", defaultIndex);
|
||||
// maps.put("type", 5);
|
||||
// maps.put("installment", installment);
|
||||
// Api.getInstance().payInstallment(maps)
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<String> feedbackResp) {
|
||||
// LogUtils.i("获取到的数据:" + feedbackResp.data);
|
||||
// if (!TextUtils.isEmpty(feedbackResp.data)) {
|
||||
//// String packageName = "com.chailease.tw.app.android.ccfappcust.uat"; // 目标应用的包名
|
||||
//// PackageManager packageManager = getPackageManager();
|
||||
//// Intent intent = new Intent();
|
||||
//// intent = packageManager.getLaunchIntentForPackage(packageName);
|
||||
//// intent.setData(Uri.parse(feedbackResp.data));
|
||||
//// if (intent == null) {
|
||||
//// ToastUtils.showShort("请安装银角零卡APP");
|
||||
//// } else {
|
||||
//// startActivity(intent);
|
||||
//// }
|
||||
// Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
// intent.setData(Uri.parse(feedbackResp.data));
|
||||
// if (intent == null) {
|
||||
// ToastUtils.showShort("请安装银角零卡APP");
|
||||
// } else {
|
||||
// startActivity(intent);
|
||||
// }
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(Uri.parse(feedbackResp.data));
|
||||
startActivity(intent);
|
||||
// Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(feedbackResp.data));
|
||||
// startActivity(intent);
|
||||
// BrowseActivity.Companion.launch(
|
||||
// TopUpActivity.this, getString(R.string.cash_cuzhi_txt), feedbackResp.data);
|
||||
// startActivity(new Intent(TopUpActivity.this, PayWebActivity.class).putExtra("url", feedbackResp.data));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//// Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(feedbackResp.data));
|
||||
//// startActivity(intent);
|
||||
//// BrowseActivity.Companion.launch(
|
||||
//// TopUpActivity.this, getString(R.string.cash_cuzhi_txt), feedbackResp.data);
|
||||
//// startActivity(new Intent(TopUpActivity.this, PayWebActivity.class).putExtra("url", feedbackResp.data));
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
protected void initView() {
|
||||
// Drawable drawable = viewBinding.titlebar.getBackImageView().getDrawable().mutate();//
|
||||
// Drawable wrap = DrawableCompat.wrap(drawable);
|
||||
// DrawableCompat.setTint(wrap, ContextCompat.getColor(this, R.color.color_d4ab90));
|
||||
// viewBinding.titlebar.getBackImageView().setImageDrawable(wrap);
|
||||
viewBinding.titlebar.getBackImageView().setOnClickListener(v -> finish());
|
||||
iniAdapter();
|
||||
GridLayoutManager linearLayoutManager = new GridLayoutManager(TopUpActivity.this,3);
|
||||
// linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
|
||||
viewBinding.recyclerInstallment.setLayoutManager(linearLayoutManager);
|
||||
installmentAdapter = new CommonAdapter<InstallmentBean>(TopUpActivity.this, R.layout.item_bill_installment, installmentBeans) {
|
||||
installmentAdapter = new CommonAdapter<ChongZhiQuDaoBean>(TopUpActivity.this, R.layout.item_bill_installment, installmentBeans) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, InstallmentBean s, int index) {
|
||||
public void convert(ViewHolder holder, ChongZhiQuDaoBean s, int index) {
|
||||
TextView titleTv = holder.getView(R.id.title_tv);
|
||||
TextView desTv = holder.getView(R.id.des_tv);
|
||||
titleTv.setText(getString(R.string.str_qi, s.getPeriodCount()));
|
||||
desTv.setText(getString(R.string.str_installment_tips, s.getAmount()));
|
||||
// TextView desTv = holder.getView(R.id.des_tv);
|
||||
titleTv.setText(s.getChannel());
|
||||
// desTv.setText(getString(R.string.str_installment_tips, s.getAmount()));
|
||||
LinearLayout big_bg = holder.getView(R.id.big_bg);
|
||||
if (s.getPeriodCount() == installmentNum) {
|
||||
titleTv.setTextColor(Color.parseColor("#FF9C32"));
|
||||
desTv.setTextColor(Color.parseColor("#FF9C32"));
|
||||
big_bg.setBackgroundResource(R.drawable.logout_btn_main2);
|
||||
} else {
|
||||
titleTv.setTextColor(getColor(R.color.color_333333));
|
||||
desTv.setTextColor(getColor(R.color.color_333333));
|
||||
big_bg.setBackgroundResource(R.drawable.input_bg_t);
|
||||
}
|
||||
|
||||
// if (s.getPeriodCount() == installmentNum) {
|
||||
// titleTv.setTextColor(Color.parseColor("#FF9C32"));
|
||||
// desTv.setTextColor(Color.parseColor("#FF9C32"));
|
||||
// big_bg.setBackgroundResource(R.drawable.logout_btn_main2);
|
||||
// } else {
|
||||
// titleTv.setTextColor(getColor(R.color.color_333333));
|
||||
// desTv.setTextColor(getColor(R.color.color_333333));
|
||||
// big_bg.setBackgroundResource(R.drawable.input_bg_t);
|
||||
// }
|
||||
//
|
||||
big_bg.setOnClickListener(v -> {
|
||||
installmentNum = s.getPeriodCount();
|
||||
// installmentNum = s.getPeriodCount();
|
||||
notifyDataSetChanged();
|
||||
// viewBinding.tvCashvalue.setText("NT$:" + (defaultIndex + s.getAmount()));
|
||||
setSelector(true);
|
||||
sumbit(s);
|
||||
});
|
||||
|
||||
}
|
||||
@@ -251,18 +272,15 @@ public class TopUpActivity extends BaseActivity {
|
||||
if (TextUtils.isEmpty(viewBinding.editQueryEt.getText().toString().trim())) {
|
||||
defaultIndex = 0;
|
||||
} else {
|
||||
if (exchangeConfBean != null) {
|
||||
defaultIndex = Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim()) * exchangeConfBean.getExchangeRatio();
|
||||
} else {
|
||||
defaultIndex = Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim());
|
||||
}
|
||||
defaultIndex = Integer.parseInt(viewBinding.editQueryEt.getText().toString().trim());
|
||||
}
|
||||
showBottomType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
commonAdapter.notifyDataSetChanged();
|
||||
// getFee();
|
||||
// commonAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
// AnimUtil.setAnimViews(viewBinding.topupTv);
|
||||
@@ -301,44 +319,34 @@ public class TopUpActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void showBottomType() {
|
||||
// viewBinding.tvCashvalue.setText("NT$:" + defaultIndex);
|
||||
setFenqiView(false);
|
||||
if (defaultIndex >= 1000) {
|
||||
setFenqiView(true);
|
||||
// setFenqiView(false);
|
||||
// if (defaultIndex >= 1000) {
|
||||
// setFenqiView(true);
|
||||
getFee();
|
||||
}
|
||||
|
||||
// if (exchangeConfBean != null) {
|
||||
// if(TextUtils.isEmpty(viewBinding.editQueryEt.getText().toString().trim())){
|
||||
// viewBinding.showZidingyiLy.setVisibility(View.GONE);
|
||||
// }else{
|
||||
// viewBinding.showZidingyiLy.setVisibility(View.VISIBLE);
|
||||
// viewBinding.zidingyicashTv.setText(defaultIndex+"");
|
||||
// }
|
||||
// }else{
|
||||
// viewBinding.showZidingyiLy.setVisibility(View.GONE);
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private void sumbit() {
|
||||
|
||||
private void sumbit(ChongZhiQuDaoBean s) {
|
||||
if (exchangeConfBean != null) {
|
||||
if ((defaultIndex < exchangeConfBean.getMinAmount()) || (defaultIndex > exchangeConfBean.getMaxAmount())) {
|
||||
ToastUtils.showShort(String.format(getString(R.string.taixiao_topup_txt), exchangeConfBean.getMinAmount() / exchangeConfBean.getExchangeRatio(), exchangeConfBean.getMaxAmount() / exchangeConfBean.getExchangeRatio()));
|
||||
return;
|
||||
}
|
||||
// if ((defaultIndex < exchangeConfBean.()) || (defaultIndex > exchangeConfBean.getMaxAmount())) {
|
||||
// ToastUtils.showShort(String.format(getString(R.string.taixiao_topup_txt), exchangeConfBean.getMinAmount() / exchangeConfBean.getExchangeRatio(), exchangeConfBean.getMaxAmount() / exchangeConfBean.getExchangeRatio()));
|
||||
// return;
|
||||
// }
|
||||
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("amount", defaultIndex);
|
||||
map.put("type", "3"); //信用卡支付
|
||||
Api.getInstance().sendOrderV2(map)
|
||||
map.put("amount", defaultIndex*100);
|
||||
map.put("channelId", s.getId()); //信用卡支付
|
||||
Api.getInstance().chargeApply(map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<SendOrderBean> feedbackResp) {
|
||||
public void onSuccess(Result<String> feedbackResp) {
|
||||
startToWeb(feedbackResp.data);
|
||||
//{"data":"https://z80.fenouliu.cc/pay/wechat/250428091839829744550037","code":1}
|
||||
//{"data":"https://t501.pay24t.com/form/payorderzz.html?id=db04e412-be26-4946-8f06-c00c582137df","code":1}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -350,57 +358,59 @@ public class TopUpActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
private void startToWeb(SendOrderBean sendOrderBean) {
|
||||
String url = IMUIKitConfig.ONLINE_PAYMENT_URL + "?" + sendOrderBean.getQuery() + "&exchangeRatio=" + exchangeConfBean.getExchangeRatio() + "&type=3";
|
||||
private void startToWeb(String url) {
|
||||
// String url = IMUIKitConfig.ONLINE_PAYMENT_URL + "?" + sendOrderBean.getQuery() + "&exchangeRatio=" + exchangeConfBean.getAmountItems().get(0).getGoldAmount() + "&type=3";
|
||||
LogUtils.i("请求地址:" + url);
|
||||
BrowseActivity.Companion.launch(
|
||||
TopUpActivity.this, getString(R.string.cash_cuzhi_txt), url);
|
||||
TopUpActivity.this,"充值", url);
|
||||
}
|
||||
|
||||
|
||||
ExchangeConfBean exchangeConfBean;
|
||||
SeqBeanTop exchangeConfBean;
|
||||
//
|
||||
// private void getConf() {
|
||||
// Api.getInstance().chargeConf()
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new BaseObserver<Result<ExchangeConfBean>>() {
|
||||
// @Override
|
||||
// public void onSuccess(Result<ExchangeConfBean> feedbackResp) {
|
||||
//// exchangeConfBean = feedbackResp.data;
|
||||
//// if (feedbackResp != null && feedbackResp.data.getAmountItems() != null) {
|
||||
//// globalAmountList = feedbackResp.data.getAmountItems();
|
||||
//// commonAdapter.setDates(globalAmountList);
|
||||
//// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(int code, String msg) {
|
||||
// ToastX.showShortToast(msg);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
private void getConf() {
|
||||
Api.getInstance().chargeConf()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<ExchangeConfBean>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<ExchangeConfBean> feedbackResp) {
|
||||
exchangeConfBean = feedbackResp.data;
|
||||
if (feedbackResp != null && feedbackResp.data.getAmountItems() != null) {
|
||||
globalAmountList = feedbackResp.data.getAmountItems();
|
||||
commonAdapter.setDates(globalAmountList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
ToastX.showShortToast(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void iniAdapter() {
|
||||
GridLayoutManager linearLayoutManager = new GridLayoutManager(TopUpActivity.this, 3);
|
||||
viewBinding.recylerview.setLayoutManager(linearLayoutManager);
|
||||
commonAdapter = new CommonAdapter<ExchangeConfBean.AmountItemsDTO>(TopUpActivity.this, R.layout.item_bill_top, globalAmountList) {
|
||||
commonAdapter = new CommonAdapter<SeqBean>(TopUpActivity.this, R.layout.item_bill_top, globalAmountList) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, ExchangeConfBean.AmountItemsDTO s, int index) {
|
||||
public void convert(ViewHolder holder, SeqBean s, int index) {
|
||||
holder.setText(R.id.title_tv, String.format("%d", s.getGoldAmount()));
|
||||
holder.setText(R.id.des_tv, String.format("NT$ %d", s.getNtAmount()));
|
||||
// holder.setText(R.id.des_tv, String.format("NT$ %d", s.getNtAmount()));
|
||||
LinearLayout big_bg = holder.getView(R.id.big_bg);
|
||||
if (s.getNtAmount() == defaultIndex) {
|
||||
if (s.getGoldAmount() == defaultIndex) {
|
||||
big_bg.setBackgroundResource(R.drawable.logout_btn_main2);
|
||||
} else {
|
||||
big_bg.setBackgroundResource(R.drawable.input_bg_t);
|
||||
}
|
||||
|
||||
big_bg.setOnClickListener(v -> {
|
||||
viewBinding.editQueryEt.setText("");
|
||||
defaultIndex = s.getNtAmount();
|
||||
viewBinding.editQueryEt.clearFocus();
|
||||
// viewBinding.editQueryEt.setText("");
|
||||
defaultIndex = s.getGoldAmount();
|
||||
// viewBinding.editQueryEt.clearFocus();
|
||||
notifyDataSetChanged();
|
||||
showBottomType();
|
||||
|
||||
|
||||
@@ -727,7 +727,9 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
return getString(R.string.danzhujiduizhu_txt);
|
||||
} else if (s.getType() == 23 || s.getType() == 24) {
|
||||
return s.getCoinModifyRemark() + "";
|
||||
} else {
|
||||
} else if (s.getType() == 32) {
|
||||
return "购买副号";
|
||||
}else {
|
||||
return TextUtils.isEmpty(s.getCoinModifyRemark()) ? getString(R.string.weizhi_txt) : s.getCoinModifyRemark() + "";
|
||||
}
|
||||
}
|
||||
@@ -887,6 +889,8 @@ public class WalletInfoFragment extends BaseFragment {
|
||||
}
|
||||
case 30:
|
||||
return R.mipmap.type_s_24;
|
||||
case 32:
|
||||
return R.mipmap.mojiang_img;
|
||||
default:
|
||||
return R.mipmap.guanli_xiugai_img;
|
||||
}
|
||||
|
||||
@@ -17,11 +17,13 @@ import com.hbl.lewan.databinding.ActivityWalletInfoNew1Binding;
|
||||
import com.hbl.lewan.databinding.ActivityWalletInfoRedBinding;
|
||||
import com.hbl.lewan.dialog.ActionConfirmDialog;
|
||||
import com.hbl.lewan.main.mine.ChangeAccoutActionActivity;
|
||||
import com.hbl.lewan.model.BillBean;
|
||||
import com.hbl.lewan.model.BindBean;
|
||||
import com.hbl.lewan.model.WalletBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
import com.hbl.lewan.network.BaseObserver;
|
||||
import com.hbl.lewan.network.Result;
|
||||
import com.hbl.lewan.utils.AppUtils;
|
||||
import com.hbl.lewan.utils.DataUtils;
|
||||
import com.hbl.lewan.utils.GsonUtils;
|
||||
import com.hbl.lewan.utils.LogUtils;
|
||||
@@ -62,12 +64,41 @@ public class WalletInfoRedActivity extends BaseActivity {
|
||||
initRightChange();
|
||||
initViewPager();
|
||||
refrshUser(IMKitClient.account());
|
||||
|
||||
// chargeAmounts();
|
||||
}
|
||||
|
||||
private void chargeAmounts() {
|
||||
|
||||
Api.getInstance().chargeAmounts()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result feedbackResp) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setReceive(Integer redPkgCount,Integer redPkgAmount){
|
||||
viewBinding.shoubaoCountTv.setText(""+(redPkgCount==null?0:redPkgCount));
|
||||
viewBinding.shoubaoAmoutTv.setText(""+(redPkgAmount==null?0:AppUtils.getQian(redPkgAmount)));
|
||||
|
||||
}
|
||||
|
||||
public void setSend(Integer redPkgCount,Integer redPkgAmount){
|
||||
viewBinding.fabaoCountTv.setText(""+(redPkgCount==null?0:redPkgCount));
|
||||
viewBinding.fabaoAmoutTv.setText(""+(redPkgAmount==null?0:AppUtils.getQian(redPkgAmount)));
|
||||
}
|
||||
private void initViewPager() {
|
||||
listFragment.clear();
|
||||
listFragment.add(shoudaoRedFragment = WalletInfoRedFragment.newInstance(0));
|
||||
listFragment.add(fachuRedFragment = WalletInfoRedFragment.newInstance(1));
|
||||
listFragment.add(shoudaoRedFragment = WalletInfoRedFragment.newInstance(0,dataString));
|
||||
listFragment.add(fachuRedFragment = WalletInfoRedFragment.newInstance(1,dataString));
|
||||
|
||||
CommunityAdapter adapter = new CommunityAdapter(WalletInfoRedActivity.this, listFragment);
|
||||
viewBinding.viewpager.setAdapter(adapter);
|
||||
@@ -82,6 +113,7 @@ public class WalletInfoRedActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
changeType(position);
|
||||
// changeTop(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,6 +124,16 @@ public class WalletInfoRedActivity extends BaseActivity {
|
||||
|
||||
}
|
||||
|
||||
private void changeTop(int position) {
|
||||
if(position == 0){
|
||||
viewBinding.shoudaoLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.fasongLy.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
viewBinding.shoudaoLy.setVisibility(View.VISIBLE);
|
||||
viewBinding.fasongLy.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
public void refrshUser(String account) {
|
||||
CommonRepo.getUserInfo(
|
||||
account,
|
||||
@@ -182,6 +224,13 @@ public class WalletInfoRedActivity extends BaseActivity {
|
||||
timestamp -> {
|
||||
viewBinding.typeTv1.setText(DataUtils.getCurrentTimeMonth(timestamp));
|
||||
data = DataUtils.getCurrentTimeType(timestamp);
|
||||
if(shoudaoRedFragment!=null){
|
||||
shoudaoRedFragment.setTime(viewBinding.typeTv1.getText().toString());
|
||||
}
|
||||
if(fachuRedFragment!=null){
|
||||
fachuRedFragment.setTime(viewBinding.typeTv1.getText().toString());
|
||||
}
|
||||
|
||||
},
|
||||
beginTime,
|
||||
endTime, data);
|
||||
|
||||
@@ -13,6 +13,7 @@ import android.widget.ImageView;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -29,6 +30,7 @@ import com.hbl.lewan.databinding.FragmentWalletInfoNewBinding;
|
||||
import com.hbl.lewan.dialog.SelectTypeDialog;
|
||||
import com.hbl.lewan.model.BillBean;
|
||||
import com.hbl.lewan.model.ListBeanResult;
|
||||
import com.hbl.lewan.model.RedLogBean;
|
||||
import com.hbl.lewan.model.StatisticsBean;
|
||||
import com.hbl.lewan.model.TaskBean;
|
||||
import com.hbl.lewan.model.TypeBean;
|
||||
@@ -47,6 +49,7 @@ import com.netease.nimlib.sdk.uinfo.UserService;
|
||||
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
|
||||
import com.netease.yunxin.kit.common.ui.fragments.BaseFragment;
|
||||
import com.netease.yunxin.kit.common.ui.utils.TimeFormatUtils;
|
||||
import com.netease.yunxin.kit.common.ui.utils.ToastX;
|
||||
import com.netease.yunxin.kit.corekit.im.IMKitClient;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -80,10 +83,12 @@ public class WalletInfoRedFragment extends BaseFragment {
|
||||
List<TaskBean> taskBeans = null;
|
||||
int loc = 0;
|
||||
FragmentWalletInfoNewBinding binding;
|
||||
|
||||
public static WalletInfoRedFragment newInstance(int type) {
|
||||
WalletInfoRedActivity walletInfoRedActivity;
|
||||
public static WalletInfoRedFragment newInstance(int type, String monthStr) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt("type1", type);
|
||||
bundle.putString("monthStr", monthStr);
|
||||
|
||||
WalletInfoRedFragment view = new WalletInfoRedFragment();
|
||||
view.setArguments(bundle);
|
||||
return view;
|
||||
@@ -108,19 +113,28 @@ public class WalletInfoRedFragment extends BaseFragment {
|
||||
|
||||
|
||||
protected void initViews() {
|
||||
walletInfoRedActivity = (WalletInfoRedActivity) getActivity();
|
||||
type = getArguments().getInt("type1");
|
||||
|
||||
Calendar selectedDate = Calendar.getInstance();//系统当前时间
|
||||
time = selectedDate.get(Calendar.YEAR) + "-" + ((selectedDate.get(Calendar.MONTH) + 1) < 10 ? "0" + (selectedDate.get(Calendar.MONTH) + 1) : (selectedDate.get(Calendar.MONTH) + 1));
|
||||
|
||||
|
||||
time = getArguments().getString("monthStr");
|
||||
loc = DataUtils.get(IMApplication.getInstance(), "locale", 1);
|
||||
|
||||
|
||||
initList();
|
||||
initRefreshLayout();
|
||||
binding.refreshLayout.autoRefresh();
|
||||
|
||||
}
|
||||
|
||||
public void setTime(String monthStr) {
|
||||
this.time = monthStr;
|
||||
initOne();
|
||||
|
||||
}
|
||||
|
||||
private void initOne() {
|
||||
pageSize = 1;
|
||||
binding.refreshLayout.setVisibility(View.VISIBLE);
|
||||
binding.nodateLy.setVisibility(View.GONE);
|
||||
binding.refreshLayout.setEnableLoadMore(true);
|
||||
getDateList();
|
||||
}
|
||||
|
||||
|
||||
@@ -478,12 +492,7 @@ public class WalletInfoRedFragment extends BaseFragment {
|
||||
|
||||
private void initRefreshLayout() {
|
||||
binding.refreshLayout.setOnRefreshListener(refreshlayout -> {
|
||||
pageSize = 1;
|
||||
binding.refreshLayout.setVisibility(View.VISIBLE);
|
||||
binding.nodateLy.setVisibility(View.GONE);
|
||||
binding.refreshLayout.setEnableLoadMore(true);
|
||||
getDateList();
|
||||
|
||||
initOne();
|
||||
});
|
||||
binding.refreshLayout.setOnLoadMoreListener(refreshLayout -> {
|
||||
pageSize += 1;
|
||||
@@ -495,117 +504,65 @@ public class WalletInfoRedFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
String name = DataUtils.get(getActivity(), "wallet_info_" + IMKitClient.account(), "");
|
||||
|
||||
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
binding.refreshLayout.autoRefresh();
|
||||
} else {
|
||||
titles = (ArrayList<BillBean>) GsonUtils.getListFromJSON(name, BillBean.class);
|
||||
if (titles != null && titles.size() > 0) {
|
||||
commonAdapter.setDates(titles);
|
||||
getDateList();
|
||||
} else {
|
||||
binding.refreshLayout.autoRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getDateList() {
|
||||
if (type == 0) {
|
||||
Api.getInstance().authReceive(pageSize, 20, time)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<RedLogBean> feedbackResp) {
|
||||
// changeDate(feedbackResp.data);
|
||||
if(walletInfoRedActivity!=null)
|
||||
walletInfoRedActivity.setReceive(feedbackResp.data.getRedPkgCount(),feedbackResp.data.getRedPkgAmount());
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (type == -1) {
|
||||
if (TextUtils.isEmpty(typeInfo)) {
|
||||
map.put("page", pageSize);
|
||||
} else {
|
||||
String statTime = time + "-01 00:00:01";
|
||||
String endTime = time + "-" + getMonth(time) + " 23:59:59";
|
||||
map.put("page", pageSize);
|
||||
map.put("timeGe", statTime);
|
||||
map.put("timeLe", endTime);
|
||||
}
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
changeView(false);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (TextUtils.isEmpty(typeInfo)) {
|
||||
map.put("page", pageSize);
|
||||
map.put("type", type);
|
||||
Api.getInstance().authSend(pageSize, 20, time)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<>() {
|
||||
@Override
|
||||
public void onSuccess(Result<RedLogBean> feedbackResp) {
|
||||
if(walletInfoRedActivity!=null)
|
||||
walletInfoRedActivity.setSend(feedbackResp.data.getRedPkgCount(),feedbackResp.data.getRedPkgAmount());
|
||||
|
||||
} else {
|
||||
String statTime = time + "-01 00:00:01";
|
||||
String endTime = time + "-" + getMonth(time) + " 23:59:59";
|
||||
// changeDate(feedbackResp.data.getGroupSendRecords());
|
||||
}
|
||||
|
||||
map.put("page", pageSize);
|
||||
map.put("timeGe", statTime);
|
||||
map.put("timeLe", endTime);
|
||||
map.put("type", type);
|
||||
}
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
changeView(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
Api.getInstance().goldDetails(IMKitClient.account(), map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<ListBeanResult<BillBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<ListBeanResult<BillBean>> feedbackResp) {
|
||||
changeDate(feedbackResp.data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
changeView(false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private String getMonth(String time) {
|
||||
if (time.endsWith("01") || time.endsWith("03") || time.endsWith("05") || time.endsWith("07") || time.endsWith("08") || time.endsWith("10") || time.endsWith("12")) {
|
||||
return "31";
|
||||
} else if (time.endsWith("02")) {
|
||||
Calendar selectedDate = Calendar.getInstance();//系统当前时间
|
||||
int year = selectedDate.get(Calendar.YEAR);
|
||||
if (year % 400 == 0) {// 判断能否被400整除
|
||||
return "29";
|
||||
} else if (year % 100 == 0) {// 判断能否被100整除
|
||||
return "28";
|
||||
} else if (year % 4 == 0) {// 判断能否被4整除
|
||||
return "29";
|
||||
} else {
|
||||
return "28";
|
||||
}
|
||||
|
||||
} else {
|
||||
return "30";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void changeDate(ListBeanResult<BillBean> data) {
|
||||
if (data.getList() != null) {
|
||||
if (pageSize == 1) {
|
||||
titles = (ArrayList<BillBean>) data.getList();
|
||||
|
||||
if (type == -1)
|
||||
DataUtils.set(getActivity(), "wallet_info_" + IMKitClient.account(), GsonUtils.beanToJSONString(titles));
|
||||
|
||||
commonAdapter.setDates(titles);
|
||||
} else {
|
||||
commonAdapter.addDates(data.getList());
|
||||
titles = (ArrayList<BillBean>) commonAdapter.getDates();
|
||||
}
|
||||
|
||||
commonAdapter.addDates(data.getList());
|
||||
titles = (ArrayList<BillBean>) commonAdapter.getDates();
|
||||
}
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
if (titles.size() == data.getTotal()) {
|
||||
binding.refreshLayout.finishLoadMoreWithNoMoreData();
|
||||
}
|
||||
// if (titles.size() == data.getTotal()) {
|
||||
// binding.refreshLayout.finishLoadMoreWithNoMoreData();
|
||||
// }
|
||||
changeView(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,11 @@ import com.hbl.lewan.databinding.FragmentWalletInfoBinding;
|
||||
import com.hbl.lewan.databinding.FragmentWalletInfoLogBinding;
|
||||
import com.hbl.lewan.dialog.SelectTypeDialog;
|
||||
import com.hbl.lewan.model.BillBean;
|
||||
import com.hbl.lewan.model.ChongZhiLogBean;
|
||||
import com.hbl.lewan.model.ListBeanResult;
|
||||
import com.hbl.lewan.model.StatisticsBean;
|
||||
import com.hbl.lewan.model.TaskBean;
|
||||
import com.hbl.lewan.model.TiXianLogBean;
|
||||
import com.hbl.lewan.model.TypeBean;
|
||||
import com.hbl.lewan.model.WithdrawCashBean;
|
||||
import com.hbl.lewan.network.Api;
|
||||
@@ -74,13 +76,11 @@ public class WalletInfologFragment extends BaseFragment {
|
||||
|
||||
int pageSize = 1;
|
||||
// private TimePickerView pvTime;
|
||||
String time = "2022-06";
|
||||
int type = -1;
|
||||
String typeInfo = "";
|
||||
CommonAdapter commonAdapter;
|
||||
private ArrayList<BillBean> titles = new ArrayList<>();
|
||||
List<TaskBean> taskBeans = null;
|
||||
int loc = 0;
|
||||
private ArrayList<ChongZhiLogBean> titles = new ArrayList<>();
|
||||
private ArrayList<TiXianLogBean> tiXianLogBeans = new ArrayList<>();
|
||||
|
||||
FragmentWalletInfoLogBinding binding;
|
||||
// String dataString;
|
||||
|
||||
@@ -112,19 +112,9 @@ public class WalletInfologFragment extends BaseFragment {
|
||||
|
||||
protected void initViews() {
|
||||
type = getArguments().getInt("type1");
|
||||
|
||||
Calendar selectedDate = Calendar.getInstance();//系统当前时间
|
||||
time = selectedDate.get(Calendar.YEAR) + "-" + ((selectedDate.get(Calendar.MONTH) + 1) < 10 ? "0" + (selectedDate.get(Calendar.MONTH) + 1) : (selectedDate.get(Calendar.MONTH) + 1));
|
||||
|
||||
|
||||
loc = DataUtils.get(IMApplication.getInstance(), "locale", 1);
|
||||
|
||||
// }
|
||||
|
||||
initList();
|
||||
initRefreshLayout();
|
||||
|
||||
time = DataUtils.getCurrentTimeMonth(System.currentTimeMillis());
|
||||
binding.refreshLayout.autoRefresh();
|
||||
|
||||
}
|
||||
|
||||
@@ -132,55 +122,48 @@ public class WalletInfologFragment extends BaseFragment {
|
||||
private void initList() {
|
||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
|
||||
binding.recyclerview.setLayoutManager(linearLayoutManager);
|
||||
commonAdapter = new CommonAdapter<BillBean>(getContext(), R.layout.item_bill_list, titles) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, BillBean s, int index) {
|
||||
boolean isShowRate;
|
||||
// holder.setText(R.id.price_tv, AppUtils.getQian(s.getAmount()) + (status == 0 ? getString(R.string.species_txt) :
|
||||
// getString(R.string.silver_coins_txt)));
|
||||
TextView textView = holder.getView(R.id.price_tv);
|
||||
textView.setText(AppUtils.getQian(s.getAmount()));
|
||||
RelativeLayout layoutroot = holder.getView(R.id.big_bg);
|
||||
if (s.getAmount() < 0) {
|
||||
textView.setTextColor(getResources().getColor(R.color.black));
|
||||
} else {
|
||||
textView.setTextColor(getResources().getColor(R.color.black));
|
||||
if(type == 0) {
|
||||
commonAdapter = new CommonAdapter<>(getContext(), R.layout.item_bill_log, titles) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, ChongZhiLogBean s, int index) {
|
||||
holder.setText(R.id.title_tv, "充值" + (s.getAmount()/100));
|
||||
holder.setText(R.id.orderid_tv, "订单号" + s.getId());
|
||||
holder.setText(R.id.time_tv, "" + s.getCreateTime());
|
||||
TextView statusTv = holder.getView(R.id.status_tv);
|
||||
if (s.getStatus() == 1) {
|
||||
holder.setText(R.id.status_tv, "成功");
|
||||
statusTv.setTextColor(Color.parseColor("#2ECC70"));
|
||||
} else {
|
||||
holder.setText(R.id.status_tv, "充值中");
|
||||
statusTv.setTextColor(Color.parseColor("#1F8FFF"));
|
||||
}
|
||||
|
||||
}
|
||||
if (s.getTransferMoneyRecord() != null && s.getTransferMoneyRecord().getFeeAmount() > 0 && s.getAmount() < 0) {
|
||||
isShowRate = true;
|
||||
textView.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.mipmap.ic_transfer_tips), null, null, null);
|
||||
} else {
|
||||
isShowRate = false;
|
||||
textView.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
|
||||
}
|
||||
TextView statusTv = holder.getView(R.id.status_tv);
|
||||
statusTv.setVisibility(View.GONE);
|
||||
if (s.getType() == 5) {
|
||||
if (s.getWithdrawCashRecord() != null) {
|
||||
statusTv.setVisibility(View.VISIBLE);
|
||||
statusTv.setText(getStatusTxt(s.getWithdrawCashRecord()));
|
||||
};
|
||||
}else{
|
||||
commonAdapter = new CommonAdapter<>(getContext(), R.layout.item_bill_log, tiXianLogBeans) {
|
||||
@Override
|
||||
public void convert(ViewHolder holder, TiXianLogBean s, int index) {
|
||||
holder.setText(R.id.title_tv, "提现" + (s.getAmount() / 100));
|
||||
holder.setText(R.id.orderid_tv, "" + s.getCreateTime());
|
||||
holder.setText(R.id.time_tv, "预计到账:" + (s.getActualAmount() / 100));
|
||||
TextView statusTv = holder.getView(R.id.status_tv);
|
||||
if (s.getStatus() == 1) {
|
||||
holder.setText(R.id.status_tv, "已通过");
|
||||
statusTv.setTextColor(Color.parseColor("#2ECC70"));
|
||||
} else if (s.getStatus() == 0) {
|
||||
holder.setText(R.id.status_tv, "待审核");
|
||||
statusTv.setTextColor(Color.parseColor("#1F8FFF"));
|
||||
} else if (s.getStatus() == 2) {
|
||||
holder.setText(R.id.status_tv, "已拒绝");
|
||||
statusTv.setTextColor(Color.parseColor("#FF4A4A"));
|
||||
} else if (s.getStatus() == 3) {
|
||||
holder.setText(R.id.status_tv, "已打款");
|
||||
statusTv.setTextColor(Color.parseColor("#2ECC70"));
|
||||
}
|
||||
}
|
||||
|
||||
holder.setText(R.id.balan_tv, getString(R.string.yuee_2f_txt1) + AppUtils.getQian(s.getBalance()));
|
||||
// holder.setText(R.id.title_tv,getUserInfo(s)+getTypeString(s.getType()));
|
||||
holder.setText(R.id.title_tv, getTypeNoteString(s));
|
||||
|
||||
holder.setText(R.id.time_tv, s.getCreateTime());
|
||||
if (!TextUtils.isEmpty(s.getCreateTimestamp())) {
|
||||
holder.setText(R.id.time_tv, TimeFormatUtils.formatMillisecond(getActivity(), Long.parseLong(s.getCreateTimestamp())));
|
||||
|
||||
}
|
||||
layoutroot.setOnClickListener(v -> {
|
||||
//弹窗
|
||||
if (isShowRate) {
|
||||
showPopWindow(textView, s.getTransferMoneyRecord().getFeeAmount(), s.getTransferMoneyRecord().getCoinType());
|
||||
}
|
||||
});
|
||||
((ImageView) holder.getView(R.id.logo_iv)).setImageResource(getTypeRes(s));
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
binding.recyclerview.setAdapter(commonAdapter);
|
||||
}
|
||||
|
||||
@@ -485,6 +468,7 @@ public class WalletInfologFragment extends BaseFragment {
|
||||
private void initRefreshLayout() {
|
||||
binding.refreshLayout.setOnRefreshListener(refreshlayout -> {
|
||||
pageSize = 1;
|
||||
titles.clear();
|
||||
binding.refreshLayout.setVisibility(View.VISIBLE);
|
||||
binding.nodateLy.setVisibility(View.GONE);
|
||||
binding.refreshLayout.setEnableLoadMore(true);
|
||||
@@ -501,130 +485,57 @@ public class WalletInfologFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
String name = DataUtils.get(getActivity(), "wallet_info_" + IMKitClient.account(), "");
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
binding.refreshLayout.autoRefresh();
|
||||
} else {
|
||||
titles = (ArrayList<BillBean>) GsonUtils.getListFromJSON(name, BillBean.class);
|
||||
if (titles != null && titles.size() > 0) {
|
||||
commonAdapter.setDates(titles);
|
||||
getDateList();
|
||||
} else {
|
||||
binding.refreshLayout.autoRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void getDateList() {
|
||||
if(type == 0){
|
||||
Api.getInstance().charge(pageSize,20)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<ListBeanResult<ChongZhiLogBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<ListBeanResult<ChongZhiLogBean>> feedbackResp) {
|
||||
changeDate(feedbackResp.data);
|
||||
}
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (type == -1) {
|
||||
if (TextUtils.isEmpty(typeInfo)) {
|
||||
map.put("page", pageSize);
|
||||
} else {
|
||||
String statTime = time + "-01 00:00:01";
|
||||
String endTime = time + "-" + getMonth(time) + " 23:59:59";
|
||||
map.put("page", pageSize);
|
||||
map.put("timeGe", statTime);
|
||||
map.put("timeLe", endTime);
|
||||
}
|
||||
} else {
|
||||
if (TextUtils.isEmpty(typeInfo)) {
|
||||
map.put("page", pageSize);
|
||||
map.put("type", type);
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
changeView(false);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
Api.getInstance().withdraw(pageSize,20)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<ListBeanResult<TiXianLogBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<ListBeanResult<TiXianLogBean>> feedbackResp) {
|
||||
changeDates(feedbackResp.data);
|
||||
}
|
||||
|
||||
} else {
|
||||
String statTime = time + "-01 00:00:01";
|
||||
String endTime = time + "-" + getMonth(time) + " 23:59:59";
|
||||
|
||||
map.put("page", pageSize);
|
||||
map.put("timeGe", statTime);
|
||||
map.put("timeLe", endTime);
|
||||
map.put("type", type);
|
||||
}
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
changeView1(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
Api.getInstance().goldDetails(IMKitClient.account(), map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<ListBeanResult<BillBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<ListBeanResult<BillBean>> feedbackResp) {
|
||||
changeDate(feedbackResp.data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
changeView(false);
|
||||
}
|
||||
});
|
||||
|
||||
if (!TextUtils.isEmpty(IMUIKitConfig.SUBSTATIONID)) {
|
||||
map.put("substationId", IMUIKitConfig.SUBSTATIONID);
|
||||
}
|
||||
Api.getInstance().silverDetails(IMKitClient.account(), map)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new BaseObserver<Result<ListBeanResult<BillBean>>>() {
|
||||
@Override
|
||||
public void onSuccess(Result<ListBeanResult<BillBean>> feedbackResp) {
|
||||
changeDate(feedbackResp.data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
LogUtils.i("获取到的错误:" + code + "" + msg);
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
changeView(false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private String getMonth(String time) {
|
||||
if (time.endsWith("01") || time.endsWith("03") || time.endsWith("05") || time.endsWith("07") || time.endsWith("08") || time.endsWith("10") || time.endsWith("12")) {
|
||||
return "31";
|
||||
} else if (time.endsWith("02")) {
|
||||
Calendar selectedDate = Calendar.getInstance();//系统当前时间
|
||||
int year = selectedDate.get(Calendar.YEAR);
|
||||
if (year % 400 == 0) {// 判断能否被400整除
|
||||
return "29";
|
||||
} else if (year % 100 == 0) {// 判断能否被100整除
|
||||
return "28";
|
||||
} else if (year % 4 == 0) {// 判断能否被4整除
|
||||
return "29";
|
||||
} else {
|
||||
return "28";
|
||||
}
|
||||
|
||||
} else {
|
||||
return "30";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void changeDate(ListBeanResult<BillBean> data) {
|
||||
private void changeDate(ListBeanResult<ChongZhiLogBean> data) {
|
||||
if (data.getList() != null) {
|
||||
if (pageSize == 1) {
|
||||
titles = (ArrayList<BillBean>) data.getList();
|
||||
|
||||
if (type == -1)
|
||||
DataUtils.set(getActivity(), "wallet_info_" + IMKitClient.account(), GsonUtils.beanToJSONString(titles));
|
||||
|
||||
commonAdapter.setDates(titles);
|
||||
} else {
|
||||
commonAdapter.addDates(data.getList());
|
||||
titles = (ArrayList<BillBean>) commonAdapter.getDates();
|
||||
}
|
||||
|
||||
titles = (ArrayList<ChongZhiLogBean>) commonAdapter.getDates();
|
||||
}
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
@@ -634,6 +545,20 @@ public class WalletInfologFragment extends BaseFragment {
|
||||
changeView(true);
|
||||
}
|
||||
|
||||
private void changeDates(ListBeanResult<TiXianLogBean> data) {
|
||||
if (data.getList() != null) {
|
||||
commonAdapter.addDates(data.getList());
|
||||
tiXianLogBeans = (ArrayList<TiXianLogBean>) commonAdapter.getDates();
|
||||
}
|
||||
binding.refreshLayout.finishRefresh();
|
||||
binding.refreshLayout.finishLoadMore();
|
||||
if (tiXianLogBeans.size() == data.getTotal()) {
|
||||
binding.refreshLayout.finishLoadMoreWithNoMoreData();
|
||||
}
|
||||
changeView1(true);
|
||||
}
|
||||
|
||||
|
||||
private void changeView(boolean isNodate) {
|
||||
if (titles == null || (titles.size() == 0)) {
|
||||
binding.nodateLy.setVisibility(View.VISIBLE);
|
||||
@@ -656,4 +581,27 @@ public class WalletInfologFragment extends BaseFragment {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void changeView1(boolean isNodate) {
|
||||
if (tiXianLogBeans == null || (tiXianLogBeans.size() == 0)) {
|
||||
binding.nodateLy.setVisibility(View.VISIBLE);
|
||||
binding.refreshLayout.setVisibility(View.GONE);
|
||||
if (isNodate) {
|
||||
binding.nodateTv.setText(getString(R.string.nodate_txt));
|
||||
binding.nodateIv.setImageResource(R.mipmap.pyq_nodate);
|
||||
} else {
|
||||
binding.nodateTv.setText(getString(R.string.net_error_txt));
|
||||
binding.nodateIv.setImageResource(R.mipmap.pyq_nodate);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
binding.refreshLayout.setVisibility(View.VISIBLE);
|
||||
binding.nodateLy.setVisibility(View.GONE);
|
||||
}
|
||||
binding.nodateLy.setOnClickListener(view -> {
|
||||
binding.refreshLayout.autoRefresh();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class WelcomeActivity extends BaseActivity {
|
||||
IMApplication.setColdStart(true);
|
||||
activityWelcomeBinding = ActivityWelcomeBinding.inflate(getLayoutInflater());
|
||||
setContentView(activityWelcomeBinding.getRoot());
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR);
|
||||
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
|
||||
Uri uri = getIntent().getData();
|
||||
getScheme(uri);
|
||||
@@ -158,7 +158,7 @@ public class WelcomeActivity extends BaseActivity {
|
||||
// activityWelcomeBinding.lottieView.playAnimation();
|
||||
// }else{
|
||||
// activityWelcomeBinding.lottieView.setVisibility(View.GONE);
|
||||
activityWelcomeBinding.lottieView1.setVisibility(View.VISIBLE);
|
||||
// activityWelcomeBinding.lottieView1.setVisibility(View.VISIBLE);
|
||||
// }
|
||||
|
||||
// getWindow().setBackgroundDrawableResource(com.netease.yunxin.nertc.ui.R.color.white);
|
||||
@@ -351,6 +351,7 @@ public class WelcomeActivity extends BaseActivity {
|
||||
loginBean.setSilverFeeRate(feedbackResp.data.getSilverFeeRate());
|
||||
loginBean.setMmSilverFeeRate(feedbackResp.data.getMmSilverFeeRate());
|
||||
DataUtils.set(WelcomeActivity.this, "login_bean", GsonUtils.beanToJSONString(loginBean));
|
||||
// IMKitClient.init(WelcomeActivity.this, null, IMApplication.getSdkOptions());
|
||||
|
||||
|
||||
new Handler().postDelayed(() -> loginIM(account, token), 3000);
|
||||
@@ -422,7 +423,7 @@ public class WelcomeActivity extends BaseActivity {
|
||||
.build();
|
||||
IMKitClient.loginIM(
|
||||
loginInfo,
|
||||
new LoginCallback<LoginInfo>() {
|
||||
new LoginCallback<>() {
|
||||
@Override
|
||||
public void onError(int errorCode, @NonNull String errorMsg) {
|
||||
activityWelcomeBinding.getRoot().setVisibility(View.GONE);
|
||||
@@ -438,11 +439,8 @@ public class WelcomeActivity extends BaseActivity {
|
||||
DataUtils.set(WelcomeActivity.this, IMUIKitConfig.LOGIN_TOKEN, token);
|
||||
|
||||
activityWelcomeBinding.getRoot().setVisibility(View.GONE);
|
||||
DataUtils.set(WelcomeActivity.this,"last_login_time",System.currentTimeMillis());
|
||||
|
||||
|
||||
DataUtils.set(WelcomeActivity.this, "last_login_time", System.currentTimeMillis());
|
||||
showMainActivityAndFinish();
|
||||
// IMApplication.getInstance().toLogin();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user