Merge remote-tracking branch 'origin/master'

This commit is contained in:
zlzw 2022-11-16 13:38:43 +08:00
commit 02a5ceaacc

View File

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