1.fix支付优化 2.普通公会成员隐藏搜索功能

This commit is contained in:
oujunhui
2020-10-15 16:07:14 +08:00
parent a36eb1b6fd
commit 2d754c9d61
7 changed files with 32 additions and 25 deletions

View File

@@ -38,7 +38,7 @@ public class ChargePresenter extends PayPresenter<IChargeView> {
*/ */
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
public void getChargeList() { public void getChargeList() {
payModel.getChargeList(1) payModel.getChargeList(1,0L)
.compose(bindToLifecycle()) .compose(bindToLifecycle())
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())

View File

@@ -166,26 +166,27 @@ public class ChargeActivity extends BaseActivity {
this.payChannel = payChannel; this.payChannel = payChannel;
boolean selectWeChatPay = (Objects.equals(this.payChannel, Constants.CHARGE_WX)); boolean selectWeChatPay = (Objects.equals(this.payChannel, Constants.CHARGE_WX));
boolean selectAliPay = (Objects.equals(this.payChannel, Constants.CHARGE_ALIPAY)); boolean selectAliPay = (Objects.equals(this.payChannel, Constants.CHARGE_ALIPAY));
if (selectAliPay){ if (!ListUtils.isListEmpty(mBigList)) {
if (mList.size() != mListSize)return; if (selectAliPay) {
for(ChargeBean bigList:mBigList) { if (mList.size() == mListSize){
mList.add(bigList); for (ChargeBean bigList : mBigList) {
} mList.add(bigList);
mChargeAdapter.setNewData(mList); }
mChargeAdapter.notifyDataSetChanged(); mChargeAdapter.setNewData(mList);
} else { mChargeAdapter.notifyDataSetChanged();
if (mList.size() > mListSize){ }
if (ListUtils.isListEmpty(mBigList))return; } else {
if (mSelectChargeBean.equals(mBigList.get(0))) if (mList.size() > mListSize) {
setItemSelect(0); setItemSelect(0);
for(ChargeBean bigList:mBigList) { }
for (ChargeBean bigList : mBigList) {
mList.remove(bigList); mList.remove(bigList);
} }
mChargeAdapter.setNewData(mList); mChargeAdapter.setNewData(mList);
mChargeAdapter.notifyDataSetChanged(); mChargeAdapter.notifyDataSetChanged();
} }
} }
switch (defaultPay){ switch (defaultPay){
case ALI_PAY_CLOSE: case ALI_PAY_CLOSE:
iv_sel_first.setSelected(selectAliPay); iv_sel_first.setSelected(selectAliPay);
@@ -262,8 +263,8 @@ public class ChargeActivity extends BaseActivity {
// ll_type_first.setVisibility(View.VISIBLE); // ll_type_first.setVisibility(View.VISIBLE);
// } // }
}); });
onLoadingData();
onRefreshing(); onRefreshing();
onLoadingData();
} }
private void setItemSelect(int position){ private void setItemSelect(int position){
@@ -306,13 +307,16 @@ public class ChargeActivity extends BaseActivity {
} }
public void onRefreshing() { public void onRefreshing() {
PayModel.get().getChargeList(1).subscribe(new BeanObserver<ChargeListResult>() { PayModel.get().getChargeList(1,AuthModel.get().getCurrentUid()).subscribe(new BeanObserver<ChargeListResult>() {
@Override @Override
public void onSuccess(ChargeListResult chargeBeans) { public void onSuccess(ChargeListResult chargeBeans) {
if (chargeBeans == null)return;
mBigList = chargeBeans.getBigList(); mBigList = chargeBeans.getBigList();
mList = chargeBeans.getList(); mList = chargeBeans.getList();
mListSize = chargeBeans.getList().size(); mListSize = chargeBeans.getList().size();
onGetChargeList(chargeBeans.getList()); onGetChargeList(chargeBeans.getList());
//默认选中
selectPayChannelDisplay(payChannel,chargeBeans.getDefaultPay());
} }
@Override @Override
@@ -560,8 +564,7 @@ public class ChargeActivity extends BaseActivity {
defaultPay(defaultPay); defaultPay(defaultPay);
break; break;
} }
//默认选中
selectPayChannelDisplay(payChannel,defaultPay);
} }
/** /**

View File

@@ -263,8 +263,10 @@ public class ModuleHallActivity extends BaseMvpActivity<IModuleHallView, ModuleH
// } // }
// }, 0); // }, 0);
ivSetting.setVisibility(View.VISIBLE); ivSetting.setVisibility(View.VISIBLE);
ivHallMemberSearch.setVisibility(View.VISIBLE);
}else { }else {
ivSetting.setVisibility(View.GONE); ivSetting.setVisibility(View.GONE);
ivHallMemberSearch.setVisibility(View.GONE);
} }
} }

View File

@@ -14,4 +14,5 @@ import lombok.Data;
public class ChargeListResult { public class ChargeListResult {
List<ChargeBean> list; List<ChargeBean> list;
List<ChargeBean> bigList; List<ChargeBean> bigList;
private int defaultPay;
} }

View File

@@ -38,7 +38,7 @@ public interface IPayModel extends IModel {
3苹果充值 3苹果充值
*/ */
Single<ChargeListResult> getChargeList(int channelType); Single<ChargeListResult> getChargeList(int channelType,long uid);
//发起充值u //发起充值u
Single<JsonObject> requestCharge(Context context, String chargeProdId, String payChannel); Single<JsonObject> requestCharge(Context context, String chargeProdId, String payChannel);

View File

@@ -175,9 +175,9 @@ public class PayModel extends BaseModel implements IPayModel {
} }
@Override @Override
public Single<ChargeListResult> getChargeList(int channelType) { public Single<ChargeListResult> getChargeList(int channelType,long uid) {
return api.getChargeList( return api.getChargeList(
String.valueOf(channelType) String.valueOf(channelType),uid
) )
.compose(RxHelper.handleBeanData()) .compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers()); .compose(RxHelper.handleSchedulers());
@@ -452,7 +452,8 @@ public class PayModel extends BaseModel implements IPayModel {
* @return * @return
*/ */
@GET("/chargeprod/listV2") @GET("/chargeprod/listV2")
Single<ServiceResult<ChargeListResult>> getChargeList(@Query("channelType") String channelType); Single<ServiceResult<ChargeListResult>> getChargeList(@Query("channelType") String channelType ,
@Query("pub_uid") long pub_uid);
/** /**

View File

@@ -21,5 +21,5 @@ with_jenkins=false
#\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528 #\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528
ndk_abi_filters=arm ndk_abi_filters=arm
version_name=1.4.1 version_name=1.5.0
version_code=141 version_code=150