| | |
| | | if (code == 700||code == 600||code == 505||code == 401){//token无效 |
| | | SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).apply() |
| | | (activity.application as DollearnApplication).exit() |
| | | activity.startActivity<LoginActivity>() |
| | | activity.myToast("登录失效,请重新登录") |
| | | activity.startActivity<LoginActivity>("offline" to true) |
| | | }else{ |
| | | super.onError(code, msg) |
| | | error(code,msg) |
| | |
| | | |
| | | override fun onError(code: Int, msg: String) { |
| | | if (code == 700||code == 600||code == 505||code == 401){//token无效 |
| | | fragment.myToast("登录失效,请重新登录") |
| | | SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).apply() |
| | | (fragment.activity!!.application as DollearnApplication).exit() |
| | | fragment.startActivity<LoginActivity>() |
| | | fragment.startActivity<LoginActivity>("offline" to true) |
| | | }else{ |
| | | super.onError(code, msg) |
| | | error(code,msg) |