From 5dff64ec997041f6a1e1db7866d81d34c21480ac Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 21 Mar 2024 18:13:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E5=AF=B9=E6=8E=A5H5=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/dialog/LiveBuyGuardDialog.java | 30 +++++++++++++++++++ .../main/res/layout/dialog_live_buy_guard.xml | 1 + .../main/activity/ZhuangBanActivity.java | 2 +- .../yunbao/main/views/MainMeViewHolder.java | 8 +++++ main/src/main/res/layout/view_main_me.xml | 1 + 5 files changed, 41 insertions(+), 1 deletion(-) 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 3dea413d3..337a44072 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveBuyGuardDialog.java @@ -8,6 +8,7 @@ import android.content.Context; import android.content.DialogInterface; import android.graphics.Color; import android.graphics.Paint; +import android.os.Bundle; import android.text.TextUtils; import android.util.Log; import android.view.View; @@ -30,12 +31,14 @@ import com.lxj.xpopup.enums.PopupPosition; import com.makeramen.roundedimageview.RoundedImageView; import com.stx.xhb.androidx.XBanner; import com.umeng.analytics.MobclickAgent; +import com.yunbao.common.CommonAppConfig; 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.GuardGetGuardUserInfoModel; import com.yunbao.common.bean.GuardPriceModel; +import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.dialog.AbsDialogPopupWindow; import com.yunbao.common.dialog.GuardBuyTipsDialog; import com.yunbao.common.dialog.GuardUpgradePopup; @@ -43,11 +46,14 @@ import com.yunbao.common.dialog.LiveBuyGuardSelectPopup; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; +import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.bean.BuyGuardBannerModel; import com.yunbao.live.fragments.LiveBuyGuardVPFragment; @@ -402,6 +408,30 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow { } }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.guard_rule), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + StringBuffer htmlUrl = new StringBuffer(); + IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); + htmlUrl.append(CommonAppConfig.HOST) + .append("/h5/Guard/rules.html") + .append("?token=") + .append(userInfo.getToken()) + .append("&uid=") + .append(userInfo.getId()) + .append("&anchorUid=") + .append(mLiveUid) + .append("&isZh=") + .append(((WordUtil.isNewZh()) ? "1" : "0")); + + Bundle bundle = new Bundle(); + bundle.putString("url", htmlUrl.toString()); + bundle.putInt("height", DeviceUtils.getScreenHeight(getActivity()) / 5 * 3); + LiveHDDialogFragment fragment = new LiveHDDialogFragment(); + fragment.setArguments(bundle); + fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + } + }); } diff --git a/live/src/main/res/layout/dialog_live_buy_guard.xml b/live/src/main/res/layout/dialog_live_buy_guard.xml index 142ae048d..282c37523 100644 --- a/live/src/main/res/layout/dialog_live_buy_guard.xml +++ b/live/src/main/res/layout/dialog_live_buy_guard.xml @@ -44,6 +44,7 @@ android:textStyle="bold" />