修复人气票没传liveuid和stream问题

This commit is contained in:
zlzw 2023-04-13 10:07:42 +08:00
parent bec764a329
commit 499b73295d
2 changed files with 13 additions and 11 deletions

View File

@ -2,6 +2,7 @@ package com.yunbao.live.dialog;
import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid; import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid;
import static com.yunbao.live.views.LiveRoomViewHolder.mStream;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.graphics.Color; import android.graphics.Color;
@ -189,7 +190,9 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
params.width = bundle.getInt("width", -1); params.width = bundle.getInt("width", -1);
mWebView.setLayoutParams(params); mWebView.setLayoutParams(params);
} }
mWebView.loadUrl(bundle.getString("url")); String url = bundle.getString("url");
url += "&anchorUid=" + mLiveUid+"&stream="+mStream;
mWebView.loadUrl(url);
mWebView.setWebViewClient(new WebViewClient() { mWebView.setWebViewClient(new WebViewClient() {
@Override @Override
public boolean shouldOverrideUrlLoading(WebView view, String url) { public boolean shouldOverrideUrlLoading(WebView view, String url) {
@ -236,7 +239,6 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
} }
private void gotoLive(final String live_id) { private void gotoLive(final String live_id) {
if (!TextUtils.equals(roomId, live_id)) { if (!TextUtils.equals(roomId, live_id)) {
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() { LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
@ -341,7 +343,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
dismiss(); dismiss();
((LiveAudienceActivity) mContext).openGiftWindow(); ((LiveAudienceActivity) mContext).openGiftWindow();
} else if (TextUtils.equals(event.getMethod(), "androidGoBack")) { } else if (TextUtils.equals(event.getMethod(), "androidGoBack")) {
dismiss(); // dismiss();
} else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) { } else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) {
if (mContext instanceof LiveRyAnchorActivity) { if (mContext instanceof LiveRyAnchorActivity) {
return; return;

View File

@ -212,7 +212,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private ImageView avatarOther; private ImageView avatarOther;
private View mBtnRedPack; private View mBtnRedPack;
public static String mLiveUid; public static String mLiveUid;
private static String mStream; public static String mStream;
private LiveLightAnimPresenter mLightAnimPresenter; private LiveLightAnimPresenter mLightAnimPresenter;
private LiveEnterRoomAnimPresenter mLiveEnterRoomAnimPresenter; private LiveEnterRoomAnimPresenter mLiveEnterRoomAnimPresenter;
private LiveDanmuPresenter mLiveDanmuPresenter; private LiveDanmuPresenter mLiveDanmuPresenter;