update:修改新人特惠的URL逻辑

This commit is contained in:
zlzw 2022-08-26 16:46:23 +08:00
parent 9efc1f4942
commit 8a2e7afc6c

View File

@ -61,7 +61,6 @@ import org.greenrobot.eventbus.ThreadMode;
import java.util.Locale; import java.util.Locale;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
/** /**
@ -377,7 +376,14 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
NewPeopleInfo peopleInfo = stringResponseModel.getData().getInfo(); NewPeopleInfo peopleInfo = stringResponseModel.getData().getInfo();
if (peopleInfo.getIsShow()) { if (peopleInfo.getIsShow()) {
liveNewPeople.setVisibility(View.VISIBLE); liveNewPeople.setVisibility(View.VISIBLE);
if(peopleInfo.getLink().startsWith("http")){
newPeopleUrl = peopleInfo.getLink(); newPeopleUrl = peopleInfo.getLink();
if(!newPeopleUrl.contains("?")){
newPeopleUrl+="?";
}
}else {
newPeopleUrl = CommonAppConfig.HOST + peopleInfo.getLink();
}
} }
}, Throwable::printStackTrace).isDisposed(); }, Throwable::printStackTrace).isDisposed();
} }
@ -410,7 +416,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
showTrickeryDialog(); showTrickeryDialog();
}else if (i==R.id.live_new_people){ }else if (i==R.id.live_new_people){
Bundle bundle=new Bundle(); Bundle bundle=new Bundle();
String url= newPeopleUrl+"?g=Appapi&m=Turntable&a=tricky"; String url= newPeopleUrl+"&g=Appapi&m=Turntable&a=tricky";
url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid; + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
bundle.putString("url", url); bundle.putString("url", url);