update 餘額不足時彈框
This commit is contained in:
parent
00db8a00c7
commit
18970c22cf
@ -4,6 +4,7 @@ import static com.yunbao.common.CommonAppConfig.isGetNewWrap;
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.View;
|
||||
@ -643,4 +644,19 @@ public class JavascriptInterfaceUtils {
|
||||
Bus.get().post(new JavascriptInterfaceEvent()
|
||||
.setMethod("androidCancelAnchorAttention"));
|
||||
}
|
||||
@JavascriptInterface
|
||||
public void androidLnsufficientBalanceClick(String msg){
|
||||
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
dialog.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.yunbao.live.activity;
|
||||
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
@ -15,6 +17,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
@ -36,6 +39,7 @@ import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.KeyBoardHeightChangeListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.KeyBoardHeightUtil2;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
@ -898,7 +902,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1";
|
||||
WebViewActivity.forward(mContext, url,true);
|
||||
WebViewActivity.forward(mContext, url, true);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
@ -924,7 +928,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (!mIsAnchor) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null && u.getLevel() < mDanMuLevel) {
|
||||
ToastUtil.show(String.format(mContext.getString(R.string.live_level_danmu_limit), mDanMuLevel+""));
|
||||
ToastUtil.show(String.format(mContext.getString(R.string.live_level_danmu_limit), mDanMuLevel + ""));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -945,7 +949,20 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
onCoinChanged(coin);
|
||||
}
|
||||
String[] data = new String[]{obj.getString("barragetoken")};
|
||||
SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents,obj.getIntValue("level_fans"));
|
||||
SocketRyChatUtil.sendDanmuMessage(mLiveUid, contents, obj.getIntValue("level_fans"));
|
||||
} else if (code==1001) {
|
||||
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
dialog.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
@ -961,7 +978,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
if (!mIsAnchor) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null && u.getLevel() < mChatLevel) {
|
||||
ToastUtil.show(String.format(mContext.getString(R.string.live_level_chat_limit), mChatLevel+""));
|
||||
ToastUtil.show(String.format(mContext.getString(R.string.live_level_chat_limit), mChatLevel + ""));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1275,9 +1292,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
} else {
|
||||
bundle.putString(Constants.URL, CommonAppConfig.HOST + "/h5/live/fansClub.html" + "?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + uid);
|
||||
}
|
||||
bundle.putString("liveUid",mLiveUid);
|
||||
bundle.putString("anchorName",mAncherName);
|
||||
bundle.putString("mStream",mStream);
|
||||
bundle.putString("liveUid", mLiveUid);
|
||||
bundle.putString("anchorName", mAncherName);
|
||||
bundle.putString("mStream", mStream);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveGuardDialogFragment");
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
@ -19,6 +21,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
@ -34,6 +37,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
@ -462,7 +466,7 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
|
||||
private void buy() {
|
||||
DialogUitl.showSimpleDialog(mContext,
|
||||
String.format(mContext.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin(), mCoinName, mTargetBuyBean.getShopName(getContext())),
|
||||
String.format(mContext.getString(R.string.guard_buy_tip_3), mTargetBuyBean.getCoin()+"", mCoinName, mTargetBuyBean.getShopName(getContext())),
|
||||
new DialogUitl.SimpleCallback() {
|
||||
|
||||
@Override
|
||||
@ -499,6 +503,20 @@ public class LiveNewGuardBuyDialogFragment extends AbsDialogFragment implements
|
||||
}
|
||||
((LiveActivity) mContext).sendBuyGuardMessage2(votes, guardNum, guardType, ancherName, liveuid);
|
||||
dismiss();
|
||||
}else if(code==1002){
|
||||
DialogUitl.showSimpleDialog(mContext, msg, new DialogUitl.SimpleCallback2() {
|
||||
@Override
|
||||
public void onCancelClick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
dialog.dismiss();
|
||||
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user