新增 充值页跳转私聊客服充值

This commit is contained in:
wzq
2023-09-25 16:00:50 +08:00
parent 9e3ebfa541
commit 6e11cfb30d
11 changed files with 203 additions and 7 deletions

View File

@@ -646,6 +646,11 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachment.CUSTOM_MSG_NOTIFY_H5:
attachment = new NotifyH5Attachment(second);
break;
case CustomAttachment.CUSTOM_MSG_P2P:
if (second == CustomAttachment.CUSTOM_MSG_P2P_CONTACT_RECHAGE) {
attachment = new P2PContactRechargeAttachment();
}
break;
default:
LogUtils.e(ResUtil.getString(R.string.custom_bean_customattachparser_01) + first + " second=" + second);
break;

View File

@@ -453,6 +453,13 @@ public class CustomAttachment implements MsgAttachment {
public static final int CUSTOM_MSG_SUB_CONVERT_L2 = 9732; // 召唤L2
public static final int CUSTOM_MSG_SUB_CONVERT_L3 = 9733; // 召唤L3
public static final int CUSTOM_MSG_P2P = 99;
/**
* 联系客服充值
*/
public static final int CUSTOM_MSG_P2P_CONTACT_RECHAGE = 99;
/**
* H5活动通用飘屏
*/

View File

@@ -0,0 +1,26 @@
package com.yizhuan.xchat_android_core.im.custom.bean;
import com.alibaba.fastjson.JSONObject;
public class P2PContactRechargeAttachment extends CustomAttachment {
private String idWeChat;
private String idLine;
public P2PContactRechargeAttachment() {
super(CUSTOM_MSG_P2P, CUSTOM_MSG_P2P_CONTACT_RECHAGE);
}
@Override
protected void parseData(JSONObject data) {
idWeChat = data.getString("official0");
idLine = data.getString("official1");
}
public String getIdWeChat() {
return idWeChat;
}
public String getIdLine() {
return idLine;
}
}

View File

@@ -116,4 +116,6 @@ public interface IPayModel extends IModel {
Single<List<Banner>> loadChargeBanner();
Single<String> getChargeContact();
}

View File

@@ -65,6 +65,11 @@ public class PayModel extends BaseModel implements IPayModel {
*/
public static final int NOT_REAL_NAME_BEFORE_CHARGING = 10108;
/**
* 封控, 限制充值
*/
public static final int RECHARGE_LIMIT = 50000;
protected WalletInfo walletInfo;
private boolean firstChargeSuccess = false;
@@ -468,7 +473,7 @@ public class PayModel extends BaseModel implements IPayModel {
@Override
public Single<PayRecordId> placeOrder(String googlePlayProdId) {
return api.placeOrder(googlePlayProdId)
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleCommon())
.compose(RxHelper.handleSchedulers());
}
@@ -480,6 +485,13 @@ public class PayModel extends BaseModel implements IPayModel {
.map(ChargeBannerInfo::getBanners);
}
@Override
public Single<String> getChargeContact() {
return api.getChargeContact()
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers());
}
public interface Api {
@@ -647,6 +659,9 @@ public class PayModel extends BaseModel implements IPayModel {
@GET("/charge/guide/banner")
Single<ServiceResult<ChargeBannerInfo>> getChargeBanner();
@GET("/charge/guide/contact")
Single<ServiceResult<String>> getChargeContact();
/**
* 验证googlePlay订单
*