| | |
| | | callVersion() |
| | | } |
| | | }else{ |
| | | toast("无网络") |
| | | showNoneNetDialog() |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | override fun onResume() { |
| | | super.onResume() |
| | | showNoneNetDialog() |
| | | try { |
| | | mainFragment?.refresh() |
| | | }catch (e:Exception){ |
| | | |
| | | } |
| | | } |
| | | |
| | | fun showNoneNetDialog(){ |
| | | if (!NetUtils.isNetworkConnected(this)){ |
| | | popup = getSlabDelAndSurePopWindow(this,"刷新","取消","网络不通畅,是否刷新页面?",{}){ |
| | | if (!NetUtils.isNetworkConnected(this)){ |
| | |
| | | popup?.showCenter(window.decorView) |
| | | } |
| | | } |
| | | try { |
| | | mainFragment?.refresh() |
| | | }catch (e:Exception){ |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | fun getSlabDelAndSurePopWindow(context: Context,sureStr:String,cancelStr:String,content:String,clickClose :() -> Unit,clickSure:() -> Unit): EasyPopup { |