修改测试问题
This commit is contained in:
parent
faa401245f
commit
cad8236e5c
@ -2995,6 +2995,8 @@ public class LiveNetManager {
|
||||
if (callback != null) {
|
||||
if (stringResponseModel.getData().getCode() == 0) {
|
||||
callback.onSuccess(stringResponseModel.getData().getMsg());
|
||||
} else if (stringResponseModel.getData().getCode() == 1001) {
|
||||
callback.onSuccess("22");
|
||||
} else {
|
||||
callback.onError(stringResponseModel.getData().getMsg());
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -123,7 +124,13 @@ public class DragonExpirePopup extends CenterPopupView {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
new LiveBuyGuardDialog(activity, mLiveUid, mStream, getGuardUserInfoModel).showDialog();
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
new LiveBuyGuardDialog(activity, mLiveUid, mStream, getGuardUserInfoModel).showDialog();
|
||||
}
|
||||
},1000);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
@ -21,6 +23,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.flyjingfish.gradienttextviewlib.GradientTextView;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.enums.PopupPosition;
|
||||
@ -152,7 +155,7 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mGuardUserInfoModel != null) {
|
||||
if (mGuardUserInfoModel.getGuardType()!=0){
|
||||
if (mGuardUserInfoModel.getGuardType() != 0) {
|
||||
buyGuardBanner.setBannerCurrentItem(mGuardUserInfoModel.getGuardType() - 1);
|
||||
}
|
||||
|
||||
@ -348,13 +351,28 @@ public class LiveBuyGuardDialog extends AbsDialogPopupWindow {
|
||||
String.valueOf(guardPriceModel.getPriceKey()), mStream, new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
ToastUtil.show(data);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
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);
|
||||
dismiss();
|
||||
if (dataTipModel.getGuardType() == 3) {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new DragonSendsMoneyPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -17,9 +18,11 @@ import com.lxj.xpopup.XPopup;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
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.LiveHttpUtil;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.TimeUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveAudienceActivity;
|
||||
import com.yunbao.live.adapter.NewGuardAdapter;
|
||||
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() {
|
||||
|
@ -1649,12 +1649,18 @@ public class LiveGiftAnimPresenter {
|
||||
if (mGifGiftTipShowAnimatorBuyGuard != null) {
|
||||
mGifGiftTipShowAnimatorBuyGuard.cancel();
|
||||
}
|
||||
if (mGifGiftTipShowAnimatorBuyGuardNew != null) {
|
||||
mGifGiftTipShowAnimatorBuyGuardNew.cancel();
|
||||
}
|
||||
if (mGifGiftTipHideAnimatorAllServer != null) {
|
||||
mGifGiftTipHideAnimatorAllServer.cancel();
|
||||
}
|
||||
if (mGifGiftTipHideAnimatorBuyGuard != null) {
|
||||
mGifGiftTipHideAnimatorBuyGuard.cancel();
|
||||
}
|
||||
if (mGifGiftTipHideAnimatorBuyGuardNew != null) {
|
||||
mGifGiftTipHideAnimatorBuyGuardNew.cancel();
|
||||
}
|
||||
|
||||
if (mGifGiftTipShowAnimatorBuyZuoji != null) {
|
||||
mGifGiftTipShowAnimatorBuyZuoji.cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user