退出登录

This commit is contained in:
2026-06-15 16:02:24 +08:00
parent 6bd31327db
commit b2c3ed9015
2 changed files with 29 additions and 19 deletions

View File

@@ -21,6 +21,7 @@ import com.ckkj.defense_device.utils.LanguageUtil
import com.ckkj.defense_device.utils.RetrofitNetwork
import com.ckkj.defense_device.utils.UserinfoUtil
import com.ckkj.defense_device.utils.ActivityManager
import com.ckkj.defense_device.view.CustomDialogFragmentText
import com.ckkj.defense_device.view.FamilySwitchDialog
import com.ckkj.defense_device.view.LanguageDialog
import com.gyf.immersionbar.ImmersionBar
@@ -100,6 +101,13 @@ class PersonalFragment : Fragment() {
}
// 退出登录点击事件
binding.btnLogout.setOnClickListener {
val dialog = CustomDialogFragmentText()
.setTitle(getString(R.string.tip))
.setMessage(getString(R.string.logout_confirm))
.setShowInput(false)
.setNegativeText(getString(R.string.cancel))
.setPositiveText(getString(R.string.confirm))
.setOnConfirmListener {
CoroutineScope(Dispatchers.IO).launch {
try {
val response = RetrofitNetwork.getNetworkService().logout()
@@ -122,6 +130,8 @@ class PersonalFragment : Fragment() {
}
}
}
dialog.show(childFragmentManager, "logout_dialog")
}
fetchCurrentFamily()
return binding.root
}

View File

@@ -80,7 +80,7 @@ class LiveVideoActivity : BaseActivity() {
}
private fun initVideoPlayer() {
val videoUrl = "https://www.w3schools.com/html/movie.mp4"//"https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8"
val videoUrl ="http://220.203.23.195:9090/live/test001.live.flv"
orientationUtils = OrientationUtils(this, binding.exoPlayContextId)
orientationUtils?.isEnable = true