From 3a1268aac76ddea74bbc2fbe8b0a8c4436730d9c Mon Sep 17 00:00:00 2001 From: hch <16607480311@163.com> Date: Wed, 17 Jan 2024 11:26:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/activity/CompensateActivity.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java b/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java index a3f24c18f..b49b023bd 100644 --- a/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java @@ -128,18 +128,20 @@ public class CompensateActivity extends AbsActivity { if (!StringUtils.isEmpty(mBanner)) { ImgLoader.display(mContext, mBanner, imgContent); - - IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); - StringBuffer urlBuffer = new StringBuffer(); - urlBuffer.append(link).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0); - findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE); - findViewById(R.id.lt_advertisement).setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString())); - } - }); + + if (!StringUtils.isEmpty(link)) { + IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); + StringBuffer urlBuffer = new StringBuffer(); + urlBuffer.append(link).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0); + + findViewById(R.id.lt_advertisement).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString())); + } + }); + } } }