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"))); + } + } } });