From 326ced4646178c9fe4f402f70a5744c64fafffdd Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 22 Sep 2023 14:25:54 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=A4=98=E9=A1=8D=E4=B8=8D=E8=B6=B3?= =?UTF-8?q?=E6=99=82=E5=BD=88=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/main/dialog/EncourageDialog.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/com/yunbao/main/dialog/EncourageDialog.java b/main/src/main/java/com/yunbao/main/dialog/EncourageDialog.java index f4d5a6cd7..3ba19ec60 100644 --- a/main/src/main/java/com/yunbao/main/dialog/EncourageDialog.java +++ b/main/src/main/java/com/yunbao/main/dialog/EncourageDialog.java @@ -1,11 +1,16 @@ package com.yunbao.main.dialog; +import static com.yunbao.common.utils.RouteUtil.PATH_COIN; + import android.annotation.SuppressLint; +import android.app.Dialog; import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; + import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; + import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -16,12 +21,14 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; +import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.fastjson.JSON; import com.makeramen.roundedimageview.RoundedImageView; import com.yunbao.common.Constants; import com.yunbao.common.dialog.AbsDialogFragment; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.main.R; @@ -265,8 +272,23 @@ public class EncourageDialog extends AbsDialogFragment implements View.OnClickLi public void onSuccess(int code, String msg, String[] info) { if (code == 0) { dismiss(); + } 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); } - ToastUtil.show(msg); + } });