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