测试修改

This commit is contained in:
18401019693 2022-10-11 13:37:44 +08:00
parent 11d0afde56
commit 127490ca91
4 changed files with 128 additions and 31 deletions

View File

@ -1,5 +1,7 @@
package com.yunbao.common.bean; package com.yunbao.common.bean;
import android.text.TextUtils;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
public class StarChallengeStatusModel extends BaseModel { public class StarChallengeStatusModel extends BaseModel {
@ -28,6 +30,33 @@ public class StarChallengeStatusModel extends BaseModel {
private String taskName1; private String taskName1;
@SerializedName("taskName2") @SerializedName("taskName2")
private String taskName2; private String taskName2;
//活动地址
@SerializedName("activityUrl")
private String activityUrl;
private String type = "2";
public String getType() {
return type;
}
public StarChallengeStatusModel setType(String type) {
this.type = type;
return this;
}
public StarChallengeStatusModel(String activityUrl) {
this.activityUrl = activityUrl;
}
public String getActivityUrl() {
return activityUrl;
}
public StarChallengeStatusModel setActivityUrl(String activityUrl) {
this.activityUrl = activityUrl;
return this;
}
public String getTaskName1() { public String getTaskName1() {
return taskName1; return taskName1;

View File

@ -62,6 +62,7 @@ import com.yunbao.common.Constants;
import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.BannerBean; import com.yunbao.common.bean.BannerBean;
import com.yunbao.common.bean.HourRank; import com.yunbao.common.bean.HourRank;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LevelBean; import com.yunbao.common.bean.LevelBean;
import com.yunbao.common.bean.LiveGiftBean; import com.yunbao.common.bean.LiveGiftBean;
import com.yunbao.common.bean.MsgModel; import com.yunbao.common.bean.MsgModel;
@ -1055,14 +1056,43 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void onBannerClick(List datas, int p) { public void onBannerClick(List datas, int p) {
if (mBannerList2 != null) { if (mBannerList2 != null) {
if (p >= 0 && p < mBannerList2.size()) { if (p >= 0 && p < mBannerList2.size()) {
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
BannerBean bean = mBannerList2.get(p); BannerBean bean = mBannerList2.get(p);
if (bean.getShow_type().equals("1")) { String type = "";
String url = bean.getLink() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid + "&t=" + System.currentTimeMillis(); StringBuffer htmlUrl = new StringBuffer();
ZhuangBanActivity.forward(mContext, url, false); //判断是否是星级活动
if (bean.isStart()) {
type = bean.getModel().getType();
htmlUrl.append(CommonAppConfig.HOST)
.append("/")
.append(bean.getModel().getActivityUrl())
.append("&nickname=")
.append(userInfo.getUserNicename())
.append("&token=")
.append(userInfo.getToken())
.append("&anchorUid=")
.append(mLiveUid)
.append("&uid=")
.append(userInfo.getId())
.append("&k=")
.append(System.currentTimeMillis());
} else {
type = bean.getShow_type();
htmlUrl.append(bean.getLink())
.append("?uid=")
.append(userInfo.getId())
.append("&token=")
.append(userInfo.getToken())
.append("&anchorUid=")
.append(mLiveUid)
.append("&t=")
.append(System.currentTimeMillis());
}
if (TextUtils.equals(type, "1")) {
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
} else { } else {
String url = bean.getLink() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid + "&t=" + System.currentTimeMillis();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("url", url); bundle.putString("url", htmlUrl.toString());
LiveHDDialogFragment fragment = new LiveHDDialogFragment(); LiveHDDialogFragment fragment = new LiveHDDialogFragment();
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
@ -1082,14 +1112,43 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void onBannerClick(List datas, int p) { public void onBannerClick(List datas, int p) {
if (mBannerList2 != null) { if (mBannerList2 != null) {
if (p >= 0 && p < mBannerList2.size()) { if (p >= 0 && p < mBannerList2.size()) {
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
BannerBean bean = mBannerList2.get(p); BannerBean bean = mBannerList2.get(p);
if (bean.getShow_type().equals("1")) { String type = "";
String url = bean.getLink() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; StringBuffer htmlUrl = new StringBuffer();
ZhuangBanActivity.forward(mContext, url, false); //判断是否是星级活动
if (bean.isStart()) {
type = bean.getModel().getType();
htmlUrl.append(CommonAppConfig.HOST)
.append("/")
.append(bean.getModel().getActivityUrl())
.append("&nickname=")
.append(userInfo.getUserNicename())
.append("&token=")
.append(userInfo.getToken())
.append("&anchorUid=")
.append(mLiveUid)
.append("&uid=")
.append(userInfo.getId())
.append("&k=")
.append(System.currentTimeMillis());
} else {
type = bean.getShow_type();
htmlUrl.append(bean.getLink())
.append("?uid=")
.append(userInfo.getId())
.append("&token=")
.append(userInfo.getToken())
.append("&anchorUid=")
.append(mLiveUid)
.append("&t=")
.append(System.currentTimeMillis());
}
if (TextUtils.equals(type, "1")) {
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false);
} else { } else {
String url = bean.getLink() + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString("url", url); bundle.putString("url", htmlUrl.toString());
LiveHDDialogFragment fragment = new LiveHDDialogFragment(); LiveHDDialogFragment fragment = new LiveHDDialogFragment();
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment"); fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="12dp"
android:topRightRadius="12dp" />
<solid android:color="@color/white" />
</shape>

View File

@ -89,27 +89,6 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/btn_event2"
android:layout_width="70dp"
android:layout_height="93dp"
android:layout_gravity="right"
android:layout_marginRight="15dp"
android:layout_marginBottom="5dp"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="gone">
<com.ms.banner.Banner
android:id="@+id/banner2"
android:layout_width="70dp"
android:layout_height="93dp"
android:layout_marginBottom="5dp"
app:delay_time="5000"
app:indicator_height="8dp"
app:indicator_width="8dp" />
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/btn_event" android:id="@+id/btn_event"
@ -2119,4 +2098,27 @@
android:layout_below="@id/live_wks_layout" android:layout_below="@id/live_wks_layout"
android:layout_marginTop="10dp" /> android:layout_marginTop="10dp" />
<LinearLayout
android:id="@+id/btn_event2"
android:layout_width="70dp"
android:layout_height="93dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_gravity="right"
android:layout_marginEnd="15dp"
android:layout_marginBottom="35dp"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="gone">
<com.ms.banner.Banner
android:id="@+id/banner2"
android:layout_width="70dp"
android:layout_height="93dp"
android:layout_marginBottom="5dp"
app:delay_time="5000"
app:indicator_height="8dp"
app:indicator_width="8dp" />
</LinearLayout>
</RelativeLayout> </RelativeLayout>