| | |
| | | tv_ok.setOnClickListener { |
| | | HttpManager.deleteUser().request(this){_,_-> |
| | | val tipDialog = TipDialog() |
| | | tipDialog.arguments = bundleOf("msg" to "已提交注销申请,请耐心等待平台审核","isAlert" to true) |
| | | tipDialog.arguments = bundleOf("msg" to "注销成功","isAlert" to true) |
| | | tipDialog.showAllowingStateLoss(supportFragmentManager,"unregister") |
| | | tipDialog.setDismissCallback(object :TipDialog.OnDismiss{ |
| | | override fun onDismiss() { |
| | | SPUtils.instance().put(Const.User.TOKEN,"").apply() |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.SWITCH_HOME)) |
| | | EventBus.getDefault().post(EmptyEvent(Const.EventCode.CHANGE_USER)) |
| | | startActivity<MainActivity>() |
| | | startActivity<LoginActivity>() |
| | | } |