|
|
@@ -64,11 +64,18 @@ class PersonalCenterActivity :
|
|
|
}
|
|
|
|
|
|
override fun initData() {
|
|
|
- diagnosisList.clear()
|
|
|
+ getUserInfo()
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取个人信息
|
|
|
+ */
|
|
|
+ private fun getUserInfo() {
|
|
|
viewModel.getUserInfo(fail = {
|
|
|
it.toast()
|
|
|
}, success = {
|
|
|
runOnUiThread {
|
|
|
+ diagnosisList.clear()
|
|
|
if (it != null) {
|
|
|
binding.data = it
|
|
|
if (TextUtils.isEmpty(it.mobile).not()) {
|
|
|
@@ -105,6 +112,11 @@ class PersonalCenterActivity :
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ override fun onResume() {
|
|
|
+ super.onResume()
|
|
|
+ reportLog("进入个人中心页面")
|
|
|
+ }
|
|
|
+
|
|
|
@SuppressLint("ClickableViewAccessibility")
|
|
|
override fun onTouch(v: View, event: MotionEvent): Boolean {
|
|
|
when (event.action) {
|
|
|
@@ -120,7 +132,6 @@ class PersonalCenterActivity :
|
|
|
R.id.layoutHome -> {
|
|
|
//返回首页
|
|
|
JumpUtil.jumpActivity(RouterUrlCommon.home, mContext)
|
|
|
- finish()
|
|
|
}
|
|
|
|
|
|
R.id.tvServiceAgreement -> {
|
|
|
@@ -187,8 +198,24 @@ class PersonalCenterActivity :
|
|
|
})
|
|
|
LiveEventBusUtil.send(RxBusCodes.LOGINOUT, "")
|
|
|
JumpUtil.jumpActivity(RouterUrlCommon.login, mContext)
|
|
|
+ reportLog("退出登录")
|
|
|
finish()
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 阿里云日志上报
|
|
|
+ */
|
|
|
+ private fun reportLog(msg: String) {
|
|
|
+ runOnUiThread {
|
|
|
+ val log = com.aliyun.sls.android.producer.Log()
|
|
|
+ log.putContent(
|
|
|
+ "个人信息页面日志", msg
|
|
|
+ )
|
|
|
+ log.putContent("患者id", User.getUserId())
|
|
|
+ log.putContent("患者姓名", User.getName())
|
|
|
+ sendLog(log)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|