心愿单

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()); Log.e("getGuardList", list.toString());
if (list.isEmpty()) { if (list.isEmpty()) {
// openNewBuyGuardWindow(true); // openNewBuyGuardWindow(true);
new LiveGuardDialog(mContext, true,mLiveUid,mStream).showDialog(); new LiveGuardDialog(mContext, true, mLiveUid, mStream).showDialog();
} else { } else {
// LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment(); // LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
// fragment.setList(list); // fragment.setList(list);
@ -1286,7 +1286,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
// bundle.putBoolean("showBuyView", !showBuyView); // bundle.putBoolean("showBuyView", !showBuyView);
// fragment.setArguments(bundle); // fragment.setArguments(bundle);
// fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment"); // 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) { if (TextUtils.isEmpty(mLiveUid) || TextUtils.isEmpty(mStream) || mLiveGuardInfo == null) {
return; return;
} }
LiveNewGuardBuyDialogFragment fragment = new LiveNewGuardBuyDialogFragment(); LiveHttpUtil.getGuardList(mLiveUid, 1, new HttpCallback() {
fragment.setLiveGuardInfo(mLiveGuardInfo); @Override
Bundle bundle = new Bundle(); public void onSuccess(int code, String msg, String[] info) {
bundle.putString(Constants.COIN_NAME, mCoinName); List<GuardUserModel> list = JSON.parseArray(Arrays.toString(info), GuardUserModel.class);
bundle.putString(Constants.LIVE_UID, mLiveUid); Log.e("getGuardList", list.toString());
bundle.putString(Constants.LIVE_ANCHER_NAME, mAncherName); if (list.isEmpty()) {
bundle.putString(Constants.STREAM, mStream); // openNewBuyGuardWindow(true);
bundle.putString(Constants.LIVE_ANCHER_ICON, mAncherIcon); new LiveGuardDialog(mContext, true, mLiveUid, mStream).showDialog();
bundle.putString(Constants.USER_ICON, CommonAppConfig.getInstance().getUserBean().getAvatar()); } else {
bundle.putString("by", by); // LiveNewGuardDialogFragment fragment = new LiveNewGuardDialogFragment();
fragment.setArguments(bundle); // fragment.setList(list);
fragment.show(getSupportFragmentManager(), "LiveGuardBuyDialogFragment"); // 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")) { } else if (TextUtils.equals(event.getMethod(), "BuyProtection")) {
((LiveActivity) mContext).openNewBuyGuardWindow(event.getData()); ((LiveActivity) mContext).openNewBuyGuardWindow(event.getData());
dismiss();
} else if (TextUtils.equals(event.getMethod(), "BuyVIP")) { } else if (TextUtils.equals(event.getMethod(), "BuyVIP")) {
UserBean u = CommonAppConfig.getInstance().getUserBean(); UserBean u = CommonAppConfig.getInstance().getUserBean();
String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname=" String url = CommonAppConfig.HOST + "/h5/Noble/index.html?nickname="