心愿单

This commit is contained in:
18401019693 2024-03-29 18:05:01 +08:00
parent 4a4a52aa61
commit ce7b6decc1
2 changed files with 25 additions and 14 deletions

View File

@ -1275,7 +1275,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
Log.e("getGuardList", list.toString());
if (list.isEmpty()) {
// openNewBuyGuardWindow(true);
new LiveGuardDialog(mContext, true,mLiveUid,mStream).showDialog();
new LiveGuardDialog(mContext, true, mLiveUid, mStream).showDialog();
} else {
// LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
// fragment.setList(list);
@ -1286,7 +1286,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
// bundle.putBoolean("showBuyView", !showBuyView);
// fragment.setArguments(bundle);
// fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
new LiveGuardDialog(mContext, false,mLiveUid,mStream).showDialog();
new LiveGuardDialog(mContext, false, mLiveUid, mStream).showDialog();
}
}
});
@ -1411,18 +1411,28 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGuardInfo == null) {
return;
}
LiveNewGuardBuyDialogFragment fragment = new LiveNewGuardBuyDialogFragment();
fragment.setLiveGuardInfo(mLiveGuardInfo);
Bundle bundle = new Bundle();
bundle.putString(Constants.COIN_NAME, mCoinName);
bundle.putString(Constants.LIVE_UID, mLiveUid);
bundle.putString(Constants.LIVE_ANCHER_NAME, mAncherName);
bundle.putString(Constants.STREAM, mStream);
bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon);
bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar());
bundle.putString("by", by);
fragment.setArguments(bundle);
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment");
LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
List<GuardUserModel> list = JSON.parseArray(Arrays.toString(info), GuardUserModel.class);
Log.e("getGuardList", list.toString());
if (list.isEmpty()) {
// openNewBuyGuardWindow(true);
new LiveGuardDialog(mContext, true, mLiveUid, mStream).showDialog();
} else {
// LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
// fragment.setList(list);
// fragment.setLiveGuardInfo(mLiveGuardInfo);
// Bundle bundle = new Bundle();
// bundle.putString(Constants.LIVE_UID, mLiveUid);
// bundle.putBoolean(Constants.ANCHOR, mIsAnchor);
// bundle.putBoolean("showBuyView", !showBuyView);
// fragment.setArguments(bundle);
// fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
new LiveGuardDialog(mContext, false, mLiveUid, mStream).showDialog();
}
}
});
}
/**

View File

@ -368,6 +368,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment {
//守護
} else if (TextUtils.equals(event.getMethod(), "BuyProtection")) {
((LiveActivity) mContext).openNewBuyGuardWindow(event.getData());
dismiss();
} else if (TextUtils.equals(event.getMethod(), "BuyVIP")) {
UserBean u = CommonAppConfig.getInstance().getUserBean();
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname="