From 09a9e023d35ce08f5e92ece85a996f590ade8a7b Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 16 Nov 2022 13:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/views/FunGamesChildViewHolder.java | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/FunGamesChildViewHolder.java b/common/src/main/java/com/yunbao/common/views/FunGamesChildViewHolder.java index 369949448..2f53661f5 100644 --- a/common/src/main/java/com/yunbao/common/views/FunGamesChildViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/FunGamesChildViewHolder.java @@ -8,10 +8,13 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; +import com.yunbao.common.CommonAppConfig; import com.yunbao.common.R; import com.yunbao.common.bean.CustomSidebarChildModel; +import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.event.CustomDrawerPopupEvent; import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -43,9 +46,34 @@ public class FunGamesChildViewHolder extends RecyclerView.ViewHolder { Bus.get().post(new CustomDrawerPopupEvent() .setDisMiss(true).setRightsInterests(model.getTitle())); } else { - int activityID = TextUtils.isEmpty(model.getActivityId()) ? -1 : Integer.parseInt(model.getActivityId()); - Bus.get().post(new CustomDrawerPopupEvent() - .setDisMiss(true).setActivityId(activityID)); + int activityID = TextUtils.isEmpty(model.getActivityId()) ? 0 : Integer.parseInt(model.getActivityId()); + if (activityID == 0) { + Bus.get().post(new CustomDrawerPopupEvent() + .setDisMiss(true).setActivityId(activityID)); + } else { + IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo(); + StringBuffer htmlUrl = new StringBuffer(); + 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() + .setHtmlUrl(htmlUrl.toString()) + .setDisMiss(true) + .setScreen(TextUtils.equals(model.getShowType(), "2"))); + } + } } });