| | |
| | | import cn.sinata.xldutils.fragment.BaseFragment |
| | | import cn.sinata.xldutils.rxutils.ResultDataSubscriber |
| | | import cn.sinata.xldutils.utils.SPUtils |
| | | import com.sinata.xqmuse.JkApplication |
| | | import com.sinata.xqmuse.ui.login.LoginActivity |
| | | import com.sinata.xqmuse.utils.Const |
| | | import io.reactivex.Flowable |
| | |
| | | override fun isShowToast() = showToast |
| | | |
| | | override fun onError(code: Int, msg: String) { |
| | | if (code == 700||code == 401){//token无效 |
| | | if (code == 700||code == 401||code == 501){//token无效 |
| | | error(code,"登录已失效") |
| | | SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).apply() |
| | | // (activity.application as JkApplication).exit() |
| | |
| | | override fun isShowToast() = showToast |
| | | |
| | | override fun onError(code: Int, msg: String) { |
| | | if (code == 401){//token无效 |
| | | if (code == 401||code == 501){//token无效 |
| | | error(code,"登录已失效") |
| | | SPUtils.instance().remove(Const.User.TOKEN).remove(Const.User.USER_ID).apply() |
| | | // (fragment.activity!!.application as JkApplication).exit() |