|
@@ -18,6 +18,7 @@ import com.yingyangfly.baselib.ext.toast
|
|
|
import com.yingyangfly.baselib.mvvm.BaseMVVMActivity
|
|
|
import com.yingyangfly.baselib.router.RouterUrlCommon
|
|
|
import com.yingyangfly.baselib.utils.JumpUtil
|
|
|
+import com.yingyangfly.baselib.utils.User
|
|
|
|
|
|
/**
|
|
|
* 消息列表
|
|
@@ -43,9 +44,7 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
pushTypeList.clear()
|
|
|
pushTypeList.add(
|
|
|
PushMessageTypeBean(
|
|
|
- dictLabel = "全部消息",
|
|
|
- dictValue = "",
|
|
|
- dictType = "warn_type"
|
|
|
+ dictLabel = "全部消息", dictValue = "", dictType = "warn_type"
|
|
|
)
|
|
|
)
|
|
|
binding {
|
|
@@ -64,32 +63,36 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
"D", "理疗通知" -> {
|
|
|
if (TextUtils.isEmpty(bean.ext)) {
|
|
|
val messageDialog = MessageDialog()
|
|
|
- messageDialog.setContent(bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo())
|
|
|
+ messageDialog.setContent(
|
|
|
+ bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo()
|
|
|
+ )
|
|
|
messageDialog.show(supportFragmentManager, "messageDialog")
|
|
|
} else {
|
|
|
JumpUtil.jumpActivityWithUrl(
|
|
|
- RouterUrlCommon.trainContentDetails,
|
|
|
- bean.ext,
|
|
|
- mContext
|
|
|
+ RouterUrlCommon.trainContentDetails, bean.ext, mContext
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
"C", "报告提醒" -> {
|
|
|
if (TextUtils.isEmpty(bean.ext)) {
|
|
|
val messageDialog = MessageDialog()
|
|
|
- messageDialog.setContent(bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo())
|
|
|
+ messageDialog.setContent(
|
|
|
+ bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo()
|
|
|
+ )
|
|
|
messageDialog.show(supportFragmentManager, "messageDialog")
|
|
|
} else {
|
|
|
JumpUtil.jumpActivityWithUrl(
|
|
|
- RouterUrlCommon.WEB_VIEW_INTERACTION_JS,
|
|
|
- bean.ext,
|
|
|
- mContext
|
|
|
+ RouterUrlCommon.WEB_VIEW_INTERACTION_JS, bean.ext, mContext
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
else -> {
|
|
|
val messageDialog = MessageDialog()
|
|
|
- messageDialog.setContent(bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo())
|
|
|
+ messageDialog.setContent(
|
|
|
+ bean.getMsgIdInfo(), bean.getMsgDesnInfo(), bean.getMsgTitleInfo()
|
|
|
+ )
|
|
|
messageDialog.show(supportFragmentManager, "messageDialog")
|
|
|
}
|
|
|
}
|
|
@@ -120,9 +123,7 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
pushTypeList.clear()
|
|
|
pushTypeList.add(
|
|
|
PushMessageTypeBean(
|
|
|
- dictLabel = "全部消息",
|
|
|
- dictValue = "",
|
|
|
- dictType = "game_type"
|
|
|
+ dictLabel = "全部消息", dictValue = "", dictType = "game_type"
|
|
|
)
|
|
|
)
|
|
|
if (it.isNullOrEmpty().not()) {
|
|
@@ -171,12 +172,14 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
v.startAnimation(getScaleAnimation())
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
MotionEvent.ACTION_UP -> {
|
|
|
v.startAnimation(getEndAnimation())
|
|
|
if (v.id == R.id.layoutHead) {
|
|
|
JumpUtil.jumpActivity(RouterUrlCommon.home, mContext)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
MotionEvent.ACTION_CANCEL -> {
|
|
|
if (v.id == R.id.layoutHead) {
|
|
|
v.startAnimation(getEndAnimation())
|
|
@@ -186,4 +189,24 @@ class MessgeListActivity : BaseMVVMActivity<ActivityMessgeListBinding, PushViewM
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
+ override fun onResume() {
|
|
|
+ super.onResume()
|
|
|
+ reportLog("跳转消息列表页面")
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 阿里云日志上报
|
|
|
+ */
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|