From 53f389ddc8cb1c41322358cda697dfa60e5a8841 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 18 Mar 2024 14:52:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=88=E8=AD=B7=E7=AD=89=E7=B4=9A=E7=9A=84?= =?UTF-8?q?=E6=AA=A2=E6=9F=A5=E6=8E=A5=E5=8F=A3=EF=BC=8C=E9=A0=98=E5=8F=96?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E3=80=82=E7=9B=B8=E9=97=9C=E9=A0=81=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E8=AB=8B=E6=B1=82=E6=B7=BB=E5=8A=A0=E3=80=82h5?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E6=96=B0=E9=84=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/bean/CheckUpgradesModel.java | 48 +++++++ .../com/yunbao/common/bean/RewardsModel.java | 39 +++++ .../common/dialog/GuardUpgradePopup.java | 136 ++++++++++++++++++ .../com/yunbao/common/http/PDLiveApi.java | 5 + .../common/http/live/LiveNetManager.java | 56 +++++++- .../utils/JavascriptInterfaceUtils.java | 18 +++ .../main/res/layout/guard_upgrade_popup.xml | 12 +- .../yunbao/live/dialog/GuardUpgradePopup.java | 38 ----- .../live/dialog/LiveBuyGuardDialog.java | 23 ++- .../yunbao/live/dialog/LiveGuardDialog.java | 18 +++ 10 files changed, 347 insertions(+), 46 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/bean/CheckUpgradesModel.java create mode 100644 common/src/main/java/com/yunbao/common/bean/RewardsModel.java create mode 100644 common/src/main/java/com/yunbao/common/dialog/GuardUpgradePopup.java rename {live => common}/src/main/res/layout/guard_upgrade_popup.xml (90%) delete mode 100644 live/src/main/java/com/yunbao/live/dialog/GuardUpgradePopup.java diff --git a/common/src/main/java/com/yunbao/common/bean/CheckUpgradesModel.java b/common/src/main/java/com/yunbao/common/bean/CheckUpgradesModel.java new file mode 100644 index 000000000..f6b5510f8 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/CheckUpgradesModel.java @@ -0,0 +1,48 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class CheckUpgradesModel extends BaseModel { + /** + * { + * "level": 33, // 等级 + * "rewards": [ // 奖励信息 + * { + * "id": 1, + * "reward_name": "星之守護等級牌", // 奖励名称 + * "image_path": "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png" // 图片链接 + * }, + * { + * "id": 2, + * "reward_name": "人氣票", + * "image_path": "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png" + * } + * ] + * } + * } + */ + @SerializedName("level") + private String level; + @SerializedName("rewards") + private List rewards; + + public String getLevel() { + return level; + } + + public CheckUpgradesModel setLevel(String level) { + this.level = level; + return this; + } + + public List getRewards() { + return rewards; + } + + public CheckUpgradesModel setRewards(List rewards) { + this.rewards = rewards; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/RewardsModel.java b/common/src/main/java/com/yunbao/common/bean/RewardsModel.java new file mode 100644 index 000000000..c8dffcde9 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/RewardsModel.java @@ -0,0 +1,39 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +public class RewardsModel extends BaseModel { + @SerializedName("id") + private int id; + @SerializedName("reward_name") + private String rewardName; + @SerializedName("image_path") + private String imagePath; + + public int getId() { + return id; + } + + public RewardsModel setId(int id) { + this.id = id; + return this; + } + + public String getRewardName() { + return rewardName; + } + + public RewardsModel setRewardName(String rewardName) { + this.rewardName = rewardName; + return this; + } + + public String getImagePath() { + return imagePath; + } + + public RewardsModel setImagePath(String imagePath) { + this.imagePath = imagePath; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/dialog/GuardUpgradePopup.java b/common/src/main/java/com/yunbao/common/dialog/GuardUpgradePopup.java new file mode 100644 index 000000000..3e850f441 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/dialog/GuardUpgradePopup.java @@ -0,0 +1,136 @@ +package com.yunbao.common.dialog; + +import android.content.Context; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.fragment.app.FragmentActivity; + +import com.lxj.xpopup.core.CenterPopupView; +import com.yunbao.common.R; +import com.yunbao.common.bean.CheckUpgradesModel; +import com.yunbao.common.bean.RewardsModel; +import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.http.base.HttpCallback; +import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; +import com.yunbao.common.views.weight.ViewClicksAntiShake; + + +public class GuardUpgradePopup extends CenterPopupView { + FragmentActivity activity; + String mLiveUid; + CheckUpgradesModel mUpgradesModel; + TextView leave_hint; + LinearLayout rewards_line1, rewards_line2, rewards_line3; + ImageView rewards_img1, rewards_img2, rewards_img3; + TextView rewards_text1, rewards_text2, rewards_text3; + + public GuardUpgradePopup(@NonNull Context context, String liveUid, CheckUpgradesModel upgradesModel) { + super(context); + activity = (FragmentActivity) context; + mLiveUid = liveUid; + mUpgradesModel = upgradesModel; + } + + @Override + protected int getImplLayoutId() { + return R.layout.guard_upgrade_popup; + } + + // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑 + @Override + protected void onCreate() { + super.onCreate(); + leave_hint = findViewById(R.id.leave_hint); + rewards_line1 = findViewById(R.id.rewards_line1); + rewards_line2 = findViewById(R.id.rewards_line2); + rewards_line3 = findViewById(R.id.rewards_line3); + rewards_img1 = findViewById(R.id.rewards_img1); + rewards_img2 = findViewById(R.id.rewards_img2); + rewards_img3 = findViewById(R.id.rewards_img3); + rewards_text1 = findViewById(R.id.rewards_text1); + rewards_text2 = findViewById(R.id.rewards_text2); + rewards_text3 = findViewById(R.id.rewards_text3); + StringBuffer hintStringBuffer = new StringBuffer(); + if (WordUtil.isNewZh()) { + hintStringBuffer.append("您的守護等級已達到") + .append(mUpgradesModel.getLevel()) + .append("級 可以領取以下獎勵"); + } else { + hintStringBuffer.append("Your guardian level has reached level ") + .append(mUpgradesModel.getLevel()) + ; + } + leave_hint.setText(hintStringBuffer.toString()); + if (mUpgradesModel.getRewards().size() > 0) { + if (mUpgradesModel.getRewards().size() == 1) { + rewards_line1.setVisibility(GONE); + rewards_line2.setVisibility(VISIBLE); + rewards_line3.setVisibility(GONE); + RewardsModel rewardsModel = mUpgradesModel.getRewards().get(0); + ImgLoader.display(getContext(), rewardsModel.getImagePath(), rewards_img2); + rewards_text2.setText(rewardsModel.getRewardName()); + } else if (mUpgradesModel.getRewards().size() == 2) { + rewards_line1.setVisibility(VISIBLE); + rewards_line2.setVisibility(GONE); + rewards_line3.setVisibility(VISIBLE); + RewardsModel rewardsModel1 = mUpgradesModel.getRewards().get(0); + RewardsModel rewardsModel3 = mUpgradesModel.getRewards().get(1); + + ImgLoader.display(getContext(), rewardsModel1.getImagePath(), rewards_img1); + rewards_text1.setText(rewardsModel1.getRewardName()); + + ImgLoader.display(getContext(), rewardsModel3.getImagePath(), rewards_img3); + rewards_text3.setText(rewardsModel3.getRewardName()); + + } else if (mUpgradesModel.getRewards().size() == 3) { + rewards_line1.setVisibility(VISIBLE); + rewards_line2.setVisibility(VISIBLE); + rewards_line3.setVisibility(VISIBLE); + RewardsModel rewardsModel1 = mUpgradesModel.getRewards().get(0); + RewardsModel rewardsModel2 = mUpgradesModel.getRewards().get(1); + RewardsModel rewardsModel3 = mUpgradesModel.getRewards().get(3); + + ImgLoader.display(getContext(), rewardsModel1.getImagePath(), rewards_img1); + rewards_text1.setText(rewardsModel1.getRewardName()); + + ImgLoader.display(getContext(), rewardsModel2.getImagePath(), rewards_img2); + rewards_text2.setText(rewardsModel2.getRewardName()); + + ImgLoader.display(getContext(), rewardsModel3.getImagePath(), rewards_img3); + rewards_text3.setText(rewardsModel3.getRewardName()); + } else { + rewards_line1.setVisibility(GONE); + rewards_line2.setVisibility(GONE); + rewards_line3.setVisibility(GONE); + } + } else { + rewards_line1.setVisibility(GONE); + rewards_line2.setVisibility(GONE); + rewards_line3.setVisibility(GONE); + } + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.confirm), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + LiveNetManager.get(getContext()) + .getRewards(new HttpCallback() { + @Override + public void onSuccess(CheckUpgradesModel data) { + dismiss(); + } + + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); + + } + }); + + } +} diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index 518d83967..815a791fc 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -11,6 +11,7 @@ import com.yunbao.common.bean.BattlePassUserInfoBean; import com.yunbao.common.bean.BlindBoxInfoModel; import com.yunbao.common.bean.CheckLiveModel; import com.yunbao.common.bean.CheckRemainingBalance; +import com.yunbao.common.bean.CheckUpgradesModel; import com.yunbao.common.bean.ContributeModel; import com.yunbao.common.bean.CoolConfig; import com.yunbao.common.bean.CreateSudRoomModel; @@ -1186,4 +1187,8 @@ public interface PDLiveApi { Observable> participateMoneyLong(@Query("liveuid") String liveUid, @Query("send_money_long_key") String sendMoneyLongKey); @GET("/api/public/?service=Guard.endSendMoneyLong") Observable> endSendMoneyLong(@Query("liveuid") String liveUid, @Query("send_money_long_key") String sendMoneyLongKey); + @GET("/api/public/?service=Guard.checkUpgrades") + Observable> checkUpgrades(@Query("liveuid") String liveUid); + @GET("/api/public/?service=Guard.getRewards") + Observable> getRewards(@Query("type") String type); } diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index 3c03572d2..8dbd0d705 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -14,6 +14,7 @@ import com.yunbao.common.bean.BattlePassUserInfoBean; import com.yunbao.common.bean.BlindBoxInfoModel; import com.yunbao.common.bean.CheckLiveModel; import com.yunbao.common.bean.CheckRemainingBalance; +import com.yunbao.common.bean.CheckUpgradesModel; import com.yunbao.common.bean.CoolConfig; import com.yunbao.common.bean.CreateSudRoomModel; import com.yunbao.common.bean.CustomSidebarInfoModel; @@ -3006,7 +3007,29 @@ public class LiveNetManager { }).isDisposed(); } + public void sendMoneyLongList(String liveUid,HttpCallback> callback) { + API.get().pdLiveApi(mContext) + .sendMoneyLongList(liveUid) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>>() { + @Override + public void accept(ResponseModel> stringResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(stringResponseModel.getData().getInfo()); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } public void sendMoneyLong(String liveUid, String goldNum, HttpCallback callback) { API.get().pdLiveApi(mContext) .sendMoneyLong(liveUid, goldNum) @@ -3055,6 +3078,7 @@ public class LiveNetManager { } + public void endSendMoneyLong(String liveUid, String sendMoneyLongKey, HttpCallback callback) { API.get().pdLiveApi(mContext) .endSendMoneyLong(liveUid, sendMoneyLongKey) @@ -3079,14 +3103,38 @@ public class LiveNetManager { } - public void sendMoneyLongList(String liveUid, HttpCallback> callback) { + public void checkUpgrades( String liveUid,HttpCallback callback) { API.get().pdLiveApi(mContext) - .sendMoneyLongList(liveUid) + .checkUpgrades(liveUid) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new Consumer>>() { + .subscribe(new Consumer>() { @Override - public void accept(ResponseModel> listResponseModel) throws Exception { + public void accept(ResponseModel listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(listResponseModel.getData().getInfo()); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + throwable.printStackTrace(); + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + + } + + public void getRewards(HttpCallback callback) { + API.get().pdLiveApi(mContext) + .getRewards("2") + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>() { + @Override + public void accept(ResponseModel listResponseModel) throws Exception { if (callback != null) { callback.onSuccess(listResponseModel.getData().getInfo()); } diff --git a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java index 781507ddd..b28aa2dd1 100644 --- a/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java +++ b/common/src/main/java/com/yunbao/common/utils/JavascriptInterfaceUtils.java @@ -8,6 +8,7 @@ import android.app.Activity; import android.app.Dialog; import android.os.Handler; import android.os.Looper; +import android.text.TextUtils; import android.util.Log; import android.view.View; import android.view.ViewGroup; @@ -17,14 +18,19 @@ import android.webkit.WebView; import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.google.gson.Gson; +import com.google.gson.JsonSyntaxException; +import com.lxj.xpopup.XPopup; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; +import com.yunbao.common.bean.CheckUpgradesModel; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.ReportCommunityBean; import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.VideoBean; import com.yunbao.common.bean.VideoListBean; +import com.yunbao.common.dialog.GuardUpgradePopup; import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.event.LiveRoomChangeEvent; import com.yunbao.common.event.QuickGiftingEvent; @@ -688,4 +694,16 @@ public class JavascriptInterfaceUtils { public void androidtoCommunityVideo() { RouteUtil.forwardCommunityActivity(); } + @JavascriptInterface + public void getRewards(String checkUpgradesJson){ + try { + CheckUpgradesModel upgradesModel = new Gson().fromJson(checkUpgradesJson,CheckUpgradesModel.class); + if (!TextUtils.isEmpty(upgradesModel.getLevel())) + new XPopup.Builder(mWebView.getContext()) + .asCustom(new GuardUpgradePopup(mWebView.getContext(), "", upgradesModel)) + .show(); + } catch (JsonSyntaxException e) { + throw new RuntimeException(e); + } + } } diff --git a/live/src/main/res/layout/guard_upgrade_popup.xml b/common/src/main/res/layout/guard_upgrade_popup.xml similarity index 90% rename from live/src/main/res/layout/guard_upgrade_popup.xml rename to common/src/main/res/layout/guard_upgrade_popup.xml index 556fa170e..f38f18e31 100644 --- a/live/src/main/res/layout/guard_upgrade_popup.xml +++ b/common/src/main/res/layout/guard_upgrade_popup.xml @@ -23,6 +23,7 @@ app:gradient_stroke_strokeWidth="5dp" /> diff --git a/live/src/main/java/com/yunbao/live/dialog/GuardUpgradePopup.java b/live/src/main/java/com/yunbao/live/dialog/GuardUpgradePopup.java deleted file mode 100644 index 443f05eaf..000000000 --- a/live/src/main/java/com/yunbao/live/dialog/GuardUpgradePopup.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.yunbao.live.dialog; - -import android.content.Context; - -import androidx.annotation.NonNull; -import androidx.fragment.app.FragmentActivity; - -import com.lxj.xpopup.core.CenterPopupView; -import com.yunbao.common.views.weight.ViewClicksAntiShake; -import com.yunbao.live.R; - -public class GuardUpgradePopup extends CenterPopupView { - FragmentActivity activity; - String mLiveUid; - - public GuardUpgradePopup(@NonNull Context context, String liveUid) { - super(context); - activity = (FragmentActivity) context; - mLiveUid = liveUid; - } - - @Override - protected int getImplLayoutId() { - return R.layout.guard_upgrade_popup; - } - - // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑 - @Override - protected void onCreate() { - super.onCreate(); - ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.confirm), new ViewClicksAntiShake.ViewClicksCallBack() { - @Override - public void onViewClicks() { - dismiss(); - } - }); - } -} diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java index 22f21ee12..fa9258781 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java @@ -28,11 +28,13 @@ import com.makeramen.roundedimageview.RoundedImageView; import com.stx.xhb.androidx.XBanner; import com.umeng.analytics.MobclickAgent; import com.yunbao.common.adapter.LiveBuyGuardPrivilegeAdapter; +import com.yunbao.common.bean.CheckUpgradesModel; import com.yunbao.common.bean.GuardDataTipModel; import com.yunbao.common.bean.GuardGetGuardOpenInfoModel; import com.yunbao.common.bean.GuardPriceModel; import com.yunbao.common.dialog.AbsDialogPopupWindow; import com.yunbao.common.dialog.GuardBuyTipsDialog; +import com.yunbao.common.dialog.GuardUpgradePopup; import com.yunbao.common.dialog.LiveBuyGuardSelectPopup; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; @@ -126,15 +128,15 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow { if (guardDataTipModel.getGuardType() == 1) { guardBannerModel.setGradientColors(gradientColorsStart) .setGuardOpen(R.mipmap.icon_bg_star_guard_open) - .setGuardImage(WordUtil.isNewZh()?R.mipmap.bg_star_guard:R.mipmap.bg_star_guard_en); + .setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_star_guard : R.mipmap.bg_star_guard_en); } else if (guardDataTipModel.getGuardType() == 2) { guardBannerModel.setGuardOpen(R.mipmap.icon_bg_king_guard_open) .setGradientColors(gradientColorsKing) - .setGuardImage(WordUtil.isNewZh()?R.mipmap.bg_king_guard:R.mipmap.bg_king_guard_en); + .setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_king_guard : R.mipmap.bg_king_guard_en); } else { guardBannerModel.setGuardOpen(R.mipmap.icon_god_guard_open) .setGradientColors(gradientColorsGod) - .setGuardImage(WordUtil.isNewZh()?R.mipmap.bg_god_guard:R.mipmap.bg_god_guard_en); + .setGuardImage(WordUtil.isNewZh() ? R.mipmap.bg_god_guard : R.mipmap.bg_god_guard_en); } buyGuardBannerModels.add(guardBannerModel); } @@ -342,6 +344,21 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow { // .show(); } }); + LiveNetManager.get(getContext()) + .checkUpgrades(mLiveUid, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(CheckUpgradesModel data) { + if (!TextUtils.isEmpty(data.getLevel())) + new XPopup.Builder(mContext) + .asCustom(new GuardUpgradePopup(mContext, mLiveUid, data)) + .show(); + } + + @Override + public void onError(String error) { + + } + }); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java index f25846336..e016b0776 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGuardDialog.java @@ -1,6 +1,7 @@ package com.yunbao.live.dialog; import android.content.Context; +import android.text.TextUtils; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; @@ -16,9 +17,11 @@ import com.makeramen.roundedimageview.RoundedImageView; import com.opensource.svgaplayer.SVGAImageView; import com.umeng.analytics.MobclickAgent; import com.yunbao.common.adapter.RefreshAdapter; +import com.yunbao.common.bean.CheckUpgradesModel; import com.yunbao.common.bean.GuardGetGuardUserInfoModel; import com.yunbao.common.custom.CommonRefreshView; import com.yunbao.common.dialog.AbsDialogPopupWindow; +import com.yunbao.common.dialog.GuardUpgradePopup; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.LiveHttpUtil; @@ -186,6 +189,21 @@ public class LiveGuardDialog extends AbsDialogPopupWindow { btnGuardOpen.setText(WordUtil.isNewZh() ? "開通守護" : "Open Guard"); } }); + LiveNetManager.get(getContext()) + .checkUpgrades(mLiveUid, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(CheckUpgradesModel data) { + if (!TextUtils.isEmpty(data.getLevel())) + new XPopup.Builder(mContext) + .asCustom(new GuardUpgradePopup(mContext, mLiveUid, data)) + .show(); + } + + @Override + public void onError(String error) { + + } + }); } private void setAdapterData() {