From cceb697739d0eb71f7d2a175a76d1536f593b74d Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Sat, 12 Nov 2022 18:00:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/DrawerRecommendViewHolder.java | 26 +++++++++++++------ .../live/activity/LiveAudienceActivity.java | 21 +++++++++------ 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java index 5178f1348..b5aecd681 100644 --- a/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java @@ -6,7 +6,6 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.GridLayoutManager; -import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.yunbao.common.CommonAppConfig; @@ -50,13 +49,24 @@ public class DrawerRecommendViewHolder extends RecyclerView.ViewHolder { } else { IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo(); StringBuffer htmlUrl = new StringBuffer(); - htmlUrl.append(CommonAppConfig.HOST) - .append("/") - .append(model.getSrc()) - .append("&uid=") - .append(userInfo.getId()) - .append("&token=") - .append(userInfo.getToken()); + if (TextUtils.equals(model.getSrc(), "recharge")) { + htmlUrl.append("recharge"); + } else if (model.getSrc().contains("?")) { + htmlUrl.append(model.getSrc()) + .append("&uid=") + .append(userInfo.getId()) + .append("&token=") + .append(userInfo.getToken()); + } else { + htmlUrl.append(CommonAppConfig.HOST) + .append("/") + .append(model.getSrc()) + .append("&uid=") + .append(userInfo.getId()) + .append("&token=") + .append(userInfo.getToken()); + } + Bus.get().post(new CustomDrawerPopupEvent() .setDisMiss(true) .setHtmlUrl(htmlUrl.toString()) diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 696fd758b..55f0d715b 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -754,15 +754,20 @@ public class LiveAudienceActivity extends LiveActivity { @Override public void showerHtml(String htmlUrl, boolean screen) { - if (!screen) { - ZhuangBanActivity.forward(mContext, htmlUrl, false); - } else { - Bundle bundle = new Bundle(); - bundle.putString("url", htmlUrl); - LiveHDDialogFragment fragment = new LiveHDDialogFragment(); - fragment.setArguments(bundle); - fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + if (TextUtils.equals(htmlUrl, "recharge")) { + RouteUtil.forwardMyCoin(mContext); + }else { + if (!screen) { + ZhuangBanActivity.forward(mContext, htmlUrl, false); + } else { + Bundle bundle = new Bundle(); + bundle.putString("url", htmlUrl); + LiveHDDialogFragment fragment = new LiveHDDialogFragment(); + fragment.setArguments(bundle); + fragment.show(((LiveRyAnchorActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); + } } + } @Override