From 98faa1d5d540a7e4de4086ea11df3fd61b5c7ab9 Mon Sep 17 00:00:00 2001 From: lmw <125975490@qq.com> Date: 星期三, 17 七月 2024 11:47:03 +0800 Subject: [PATCH] 将要取消游戏页面item的结果动画 --- app/src/main/java/com/dollearn/student/network/Functions.kt | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/dollearn/student/network/Functions.kt b/app/src/main/java/com/dollearn/student/network/Functions.kt index 2b0699c..4a2c68b 100644 --- a/app/src/main/java/com/dollearn/student/network/Functions.kt +++ b/app/src/main/java/com/dollearn/student/network/Functions.kt @@ -6,7 +6,7 @@ import cn.sinata.xldutils.fragment.BaseFragment import cn.sinata.xldutils.rxutils.ResultDataSubscriber import cn.sinata.xldutils.utils.SPUtils -import com.dollearn.student.WeparkApplication +import com.dollearn.student.DollearnApplication import com.dollearn.student.ui.login.LoginActivity import com.dollearn.student.utils.Const import io.reactivex.Flowable @@ -26,10 +26,10 @@ override fun isShowToast() = showToast override fun onError(code: Int, msg: String) { - if (code == 700||code == 600){//token无效 - error(code,"登录已失效") + if (code == 700||code == 600||code == 505||code == 401){//token无效 + error(code,"登录已失效,请重新登录") SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).apply() - (activity.application as WeparkApplication).exit() + (activity.application as DollearnApplication).exit() activity.startActivity<LoginActivity>() }else{ super.onError(code, msg) @@ -52,10 +52,10 @@ override fun isShowToast() = showToast override fun onError(code: Int, msg: String) { - if (code == 700||code == 600){//token无效 - error(code,"登录已失效") + if (code == 700||code == 600||code == 505||code == 401){//token无效 + error(code,"登录已失效,请重新登录") SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).apply() - (fragment.activity!!.application as WeparkApplication).exit() + (fragment.activity!!.application as DollearnApplication).exit() fragment.startActivity<LoginActivity>() }else{ super.onError(code, msg) -- Gitblit v1.7.1