修改测试问题

This commit is contained in:
18401019693 2024-03-21 17:36:07 +08:00
parent faa401245f
commit cad8236e5c
5 changed files with 95 additions and 8 deletions

View File

@ -2995,6 +2995,8 @@ public class LiveNetManager {
if (callback != null) { if (callback != null) {
if (stringResponseModel.getData().getCode() == 0) { if (stringResponseModel.getData().getCode() == 0) {
callback.onSuccess(stringResponseModel.getData().getMsg()); callback.onSuccess(stringResponseModel.getData().getMsg());
} else if (stringResponseModel.getData().getCode() == 1001) {
callback.onSuccess("22");
} else { } else {
callback.onError(stringResponseModel.getData().getMsg()); callback.onError(stringResponseModel.getData().getMsg());
} }

View File

@ -1,6 +1,7 @@
package com.yunbao.live.dialog; package com.yunbao.live.dialog;
import android.content.Context; import android.content.Context;
import android.os.Handler;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -123,8 +124,14 @@ public class DragonExpirePopup extends CenterPopupView {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
dismiss(); dismiss();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
new LiveBuyGuardDialog(activity, mLiveUid, mStream, getGuardUserInfoModel).showDialog(); new LiveBuyGuardDialog(activity, mLiveUid, mStream, getGuardUserInfoModel).showDialog();
} }
},1000);
}
}); });
} }
} }

View File

@ -1,5 +1,7 @@
package com.yunbao.live.dialog; package com.yunbao.live.dialog;
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.app.Dialog; import android.app.Dialog;
import android.content.Context; import android.content.Context;
@ -21,6 +23,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager; import androidx.viewpager.widget.ViewPager;
import com.alibaba.android.arouter.launcher.ARouter;
import com.flyjingfish.gradienttextviewlib.GradientTextView; import com.flyjingfish.gradienttextviewlib.GradientTextView;
import com.lxj.xpopup.XPopup; import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.enums.PopupPosition; import com.lxj.xpopup.enums.PopupPosition;
@ -348,6 +351,19 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() { String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
@Override @Override
public void onSuccess(String data) { public void onSuccess(String data) {
if (TextUtils.equals(data, "22")) {
new DialogUitl.Builder(mContext)
.setView(R.layout.dialog_live_unfollow)
.setConfirmString(mContext.getString(R.string.charge))
.setContent(mContext.getString(R.string.insufficient_balance))
.setClickCallback(new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
LiveBuyGuardDialog.this.dismiss();
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
}
}).build().show();
} else {
ToastUtil.show(data); ToastUtil.show(data);
dismiss(); dismiss();
if (dataTipModel.getGuardType() == 3) { if (dataTipModel.getGuardType() == 3) {
@ -357,6 +373,8 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
} }
} }
}
@Override @Override
public void onError(String error) { public void onError(String error) {
ToastUtil.show(error); ToastUtil.show(error);

View File

@ -1,6 +1,7 @@
package com.yunbao.live.dialog; package com.yunbao.live.dialog;
import android.content.Context; import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -17,9 +18,11 @@ import com.lxj.xpopup.XPopup;
import com.makeramen.roundedimageview.RoundedImageView; import com.makeramen.roundedimageview.RoundedImageView;
import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAImageView;
import com.umeng.analytics.MobclickAgent; import com.umeng.analytics.MobclickAgent;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.adapter.RefreshAdapter; import com.yunbao.common.adapter.RefreshAdapter;
import com.yunbao.common.bean.CheckUpgradesModel; import com.yunbao.common.bean.CheckUpgradesModel;
import com.yunbao.common.bean.GuardGetGuardUserInfoModel; import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.custom.CommonRefreshView; import com.yunbao.common.custom.CommonRefreshView;
import com.yunbao.common.dialog.AbsDialogPopupWindow; import com.yunbao.common.dialog.AbsDialogPopupWindow;
import com.yunbao.common.dialog.GuardUpgradePopup; import com.yunbao.common.dialog.GuardUpgradePopup;
@ -27,13 +30,16 @@ import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpUtil; import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.CommonIconUtil; import com.yunbao.common.utils.CommonIconUtil;
import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.TimeUtils; import com.yunbao.common.utils.TimeUtils;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.adapter.NewGuardAdapter; import com.yunbao.live.adapter.NewGuardAdapter;
import com.yunbao.live.bean.GuardUserModel; import com.yunbao.live.bean.GuardUserModel;
@ -257,6 +263,54 @@ public class LiveGuardDialog extends AbsDialogPopupWindow {
} }
}); });
ViewClicksAntiShake.clicksAntiShake(guardianTask, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
StringBuffer htmlUrl = new StringBuffer();
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
htmlUrl.append(CommonAppConfig.HOST)
.append("/h5/Guard/mission.html?")
.append("&token=")
.append(userInfo.getToken())
.append("&uid=")
.append(userInfo.getId())
.append("&&anchorUid=")
.append(mLiveUid)
.append("&isZh=")
.append(((WordUtil.isNewZh()) ? "1" : "0"));
Bundle bundle = new Bundle();
bundle.putString("url", htmlUrl.toString());
bundle.putInt("height", DeviceUtils.getScreenHeight(getActivity()) / 5 * 3);
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
fragment.setArguments(bundle);
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
}
});
ViewClicksAntiShake.clicksAntiShake(myGraudGrade, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
public void onViewClicks() {
StringBuffer htmlUrl = new StringBuffer();
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
htmlUrl.append(CommonAppConfig.HOST)
.append("/h5/Guard/level.html?")
.append("&token=")
.append(userInfo.getToken())
.append("&uid=")
.append(userInfo.getId())
.append("&&anchorUid=")
.append(mLiveUid)
.append("&isZh=")
.append(((WordUtil.isNewZh()) ? "1" : "0"));
Bundle bundle = new Bundle();
bundle.putString("url", htmlUrl.toString());
bundle.putInt("height", DeviceUtils.getScreenHeight(getActivity()) / 5 * 3);
LiveHDDialogFragment fragment = new LiveHDDialogFragment();
fragment.setArguments(bundle);
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
}
});
} }
private void setAdapterData() { private void setAdapterData() {

View File

@ -1649,12 +1649,18 @@ public class LiveGiftAnimPresenter {
if (mGifGiftTipShowAnimatorBuyGuard != null) { if (mGifGiftTipShowAnimatorBuyGuard != null) {
mGifGiftTipShowAnimatorBuyGuard.cancel(); mGifGiftTipShowAnimatorBuyGuard.cancel();
} }
if (mGifGiftTipShowAnimatorBuyGuardNew != null) {
mGifGiftTipShowAnimatorBuyGuardNew.cancel();
}
if (mGifGiftTipHideAnimatorAllServer != null) { if (mGifGiftTipHideAnimatorAllServer != null) {
mGifGiftTipHideAnimatorAllServer.cancel(); mGifGiftTipHideAnimatorAllServer.cancel();
} }
if (mGifGiftTipHideAnimatorBuyGuard != null) { if (mGifGiftTipHideAnimatorBuyGuard != null) {
mGifGiftTipHideAnimatorBuyGuard.cancel(); mGifGiftTipHideAnimatorBuyGuard.cancel();
} }
if (mGifGiftTipHideAnimatorBuyGuardNew != null) {
mGifGiftTipHideAnimatorBuyGuardNew.cancel();
}
if (mGifGiftTipShowAnimatorBuyZuoji != null) { if (mGifGiftTipShowAnimatorBuyZuoji != null) {
mGifGiftTipShowAnimatorBuyZuoji.cancel(); mGifGiftTipShowAnimatorBuyZuoji.cancel();