|
|
@@ -96,6 +96,7 @@ class GameIntroductionActivity :
|
|
|
initLiveData()
|
|
|
getGameDetailByCode()
|
|
|
binding.tvScientificPrincipleInfo.setMovementMethod(ScrollingMovementMethod.getInstance())
|
|
|
+ reportLog("首次进入游戏介绍页面,gameCode: $gameCode playClass:$playClass")
|
|
|
}
|
|
|
|
|
|
override fun onNewIntent(intent: Intent?) {
|
|
|
@@ -111,6 +112,7 @@ class GameIntroductionActivity :
|
|
|
mVodPlayer?.resume()
|
|
|
}
|
|
|
binding.btnStartGame.setBackgroundResource(R.mipmap.icon_game_continue)
|
|
|
+ reportLog("从游戏页面返回游戏介绍页面,gameCode: $gameCode playClass:$playClass")
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -155,6 +157,7 @@ class GameIntroductionActivity :
|
|
|
viewModel.getGameDetailByCode(id, playClass, fail = {
|
|
|
val str = "获取游戏信息失败$it"
|
|
|
str.toast()
|
|
|
+ reportLog(str)
|
|
|
}, success = {
|
|
|
if (it != null) {
|
|
|
gameBean = it
|
|
|
@@ -227,7 +230,9 @@ class GameIntroductionActivity :
|
|
|
}
|
|
|
}
|
|
|
exitGameDialog.show(supportFragmentManager, "exitGameDialog")
|
|
|
+ reportLog("进入过游戏页面点击返回按钮,gameCode: $gameCode playClass:$playClass")
|
|
|
} else {
|
|
|
+ reportLog("没有进入过游戏页面,点击返回按钮,gameCode: $gameCode playClass:$playClass")
|
|
|
finish()
|
|
|
}
|
|
|
}
|
|
|
@@ -255,6 +260,7 @@ class GameIntroductionActivity :
|
|
|
.withString("gameName", gameBean!!.gameName)
|
|
|
.withTransition(R.anim.leftin, R.anim.leftout)
|
|
|
.navigation(mContext)
|
|
|
+ reportLog("进入游戏页面,游戏名称:" + gameBean!!.gameName + "游戏code: " + gameCode + " playClass:" + playClass)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -384,4 +390,19 @@ class GameIntroductionActivity :
|
|
|
val cn = am.getRunningTasks(1)[0].topActivity
|
|
|
return cn!!.className == activity.javaClass.name
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 阿里云日志上报
|
|
|
+ */
|
|
|
+ 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)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|