Browse Source

1.修改bug
2.修改阿里云日志上报账号

王鹏鹏 1 year ago
parent
commit
5b21a3cf87

+ 2 - 2
baselib/src/main/java/com/yingyangfly/baselib/base/BaseActivity.kt

@@ -148,8 +148,8 @@ abstract class BaseActivity<DB : ViewDataBinding> : AppCompatActivity(), OnRefre
                 "https://cn-beijing.log.aliyuncs.com",
                 "hcp-pad",
                 "hcp-pad",
-                "LTAI5tRoqTKsfW84PZfN1PtD",
-                "CvzYhzJUnN9YsAd7zuv031bx2l8pj5",
+                "LTAI5tBxgTDAzgGHU7tKHNkM",
+                "PAq3ay6rPVhk4Va56XHStc352pQiGg",
                 ""
             )
             // 设置主题

+ 3 - 0
game/src/main/java/com/yingyangfly/game/dialog/GameResultDialog.kt

@@ -130,6 +130,7 @@ class GameResultDialog : DialogFragment() {
                 btnContinueThisLevel!!.setBackgroundResource(R.mipmap.icon_game_result_next)
                 imageGameResult!!.post {
                     if (voicePlayer != null) {
+                        voicePlayer?.stop()
                         voicePlayer?.play(gameSuccess) {
                         }
                     }
@@ -141,6 +142,7 @@ class GameResultDialog : DialogFragment() {
                 btnContinueThisLevel!!.setBackgroundResource(R.mipmap.icon_game_result_continue)
                 imageGameResult!!.post {
                     if (voicePlayer != null) {
+                        voicePlayer?.stop()
                         voicePlayer?.play(gameFailed) {
                         }
                     }
@@ -156,6 +158,7 @@ class GameResultDialog : DialogFragment() {
                 btnContinueThisLevel!!.setBackgroundResource(R.mipmap.icon_game_result_continue)
                 imageGameResult!!.post {
                     if (voicePlayer != null) {
+                        voicePlayer?.stop()
                         voicePlayer?.play(gameTimeOut) {
                         }
                     }

+ 22 - 0
game/src/main/java/com/yingyangfly/game/introduction/GameIntroductionActivity.kt

@@ -21,6 +21,7 @@ import com.yingyangfly.baselib.ext.*
 import com.yingyangfly.baselib.mvvm.BaseMVVMActivity
 import com.yingyangfly.baselib.player.VoicePlayer
 import com.yingyangfly.baselib.router.RouterUrlCommon
+import com.yingyangfly.baselib.utils.JumpUtil
 import com.yingyangfly.baselib.utils.LiveEventBusUtil
 import com.yingyangfly.baselib.utils.RxBusCodes
 import com.yingyangfly.baselib.utils.User
@@ -223,6 +224,27 @@ class GameIntroductionActivity :
                                 val exitGameDialog = ExitGameDialog()
                                 exitGameDialog.onDialogClickListener = {
                                     runOnUiThread {
+                                        if (gameBean != null) {
+                                            val url =
+                                                gameBean!!.gameUrl + "?startLv=" + gameBean!!.gameLevel + "&maxLv=" + gameBean!!.totalNum + "&gameSetTime=" + gameBean!!.gameDuration + "&difficultyRate=" + gameBean!!.gameDifficultyRate + "&totalTime=" + gameBean!!.gameTotalTime + "&totalScore=" + gameBean!!.gameTotalScore + "&playClass=" + playClass
+                                            ARouter.getInstance().build(RouterUrlCommon.playGame)
+                                                .withString("gameCode", gameCode).withString("id", id)
+                                                .withString("playClass", playClass).withString("url", url)
+                                                .withString("gameType", gameBean!!.gameType)
+                                                .withString("gameTotalScore", gameBean!!.gameTotalScore)
+                                                .withString("gameTotalLevel", gameBean!!.totalNum)
+                                                .withBoolean("isPlayGameJump", isPlayGameJump)
+                                                .withString("gameInbetweenImage", gameBean!!.gameInbetweenImage)
+                                                .withString(
+                                                    "gameBackgroundImage", gameBean!!.gameBackgroundImage
+                                                ).withString("gameShortDesn", gameBean!!.gameShortDesn)
+                                                .withString("fullFlag", gameBean!!.fullFlag)
+                                                .withString("frameImg", gameBean!!.frameImg)
+                                                .withString("gameName", gameBean!!.gameName)
+                                                .withTransition(R.anim.leftin, R.anim.leftout)
+                                                .navigation(mContext)
+                                            isPlayGameJump = true
+                                        }
                                         if (loadingOver) {
                                             LiveEventBusUtil.send(RxBusCodes.CALLQUITGAME, "")
                                             finish()

+ 7 - 0
game/src/main/java/com/yingyangfly/game/play/PlayGameActivity.kt

@@ -663,6 +663,13 @@ class PlayGameActivity : BaseMVVMActivity<ActivityPlayGameBinding, PlayGameViewM
                     )
                     gameResultDialog?.onBackHomeDialogClickListener = {
                         runOnUiThread {
+                            ARouter.getInstance()
+                                .build(RouterUrlCommon.gameIntroduction)
+                                .withString("gameCode", gameCode).withString("id", id)
+                                .withString("playClass", playClass)
+                                .withBoolean("isPlayGameJump", true)
+                                .withTransition(R.anim.leftin, R.anim.leftout)
+                                .navigation(mContext)
                             LiveEventBusUtil.send(RxBusCodes.FINISHGAMEINTRODUCTION, "")
                             finish()
                         }

+ 5 - 1
game/src/main/java/com/yingyangfly/game/settlement/GameSettlementActivity.kt

@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
 import android.os.Bundle
 import android.text.Html
 import android.text.TextUtils
+import android.util.Log
 import android.view.MotionEvent
 import android.view.View
 import com.alibaba.android.arouter.facade.annotation.Route
@@ -13,6 +14,8 @@ import com.yingyangfly.baselib.ext.getScaleAnimation
 import com.yingyangfly.baselib.ext.toast
 import com.yingyangfly.baselib.mvvm.BaseMVVMActivity
 import com.yingyangfly.baselib.router.RouterUrlCommon
+import com.yingyangfly.baselib.utils.LiveEventBusUtil
+import com.yingyangfly.baselib.utils.RxBusCodes
 import com.yingyangfly.baselib.utils.User
 import com.yingyangfly.game.R
 import com.yingyangfly.game.adapter.GameResultAdapter
@@ -65,7 +68,6 @@ class GameSettlementActivity :
 
     override fun initData() {
         Glide.with(mContext).asGif().load(R.drawable.fish).into(binding.loadingImage)
-
         Glide.with(mContext).asGif().load(R.drawable.diban).into(binding.imageGameSettlement)
     }
 
@@ -98,6 +100,7 @@ class GameSettlementActivity :
 
     override fun onResume() {
         super.onResume()
+        LiveEventBusUtil.send(RxBusCodes.FINISHGAME, "")
         loadData()
         reportLog("进入游戏结算页面, gameCode: $gameCode ,gameTotalLevel:$gameTotalLevel")
     }
@@ -119,6 +122,7 @@ class GameSettlementActivity :
                     if (TextUtils.isEmpty(gameTotalLevel)
                             .not() && it.details.size < gameTotalLevel.toInt()
                     ) {
+                        reportLog("进入游戏结算页面,游戏结算关卡总数不匹配, gameCode: $gameCode ,gameTotalLevel:$gameTotalLevel")
                         loadData()
                     } else {
                         val details = it.details.last()