|
|
@@ -6,6 +6,7 @@ import android.view.MotionEvent
|
|
|
import android.view.View
|
|
|
import androidx.recyclerview.widget.GridLayoutManager
|
|
|
import com.alibaba.android.arouter.facade.annotation.Route
|
|
|
+import com.alibaba.android.arouter.launcher.ARouter
|
|
|
import com.bumptech.glide.Glide
|
|
|
import com.tencent.imsdk.v2.V2TIMCallback
|
|
|
import com.tencent.imsdk.v2.V2TIMManager
|
|
|
@@ -399,10 +400,15 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
* 跳转游戏列表
|
|
|
*/
|
|
|
private fun jumpWebView(bean: Record, isFull: Boolean) {
|
|
|
- val str =
|
|
|
- bean.gameUrl + "?gameCode=" + bean.gameCode + "&isFull=" + isFull + "&isSound=true&playClass=" + bean.playClass +
|
|
|
- "&userToken=" + User.getToken()
|
|
|
- JumpUtil.jumpActivityWithUrl(RouterUrlCommon.WEB_VIEW_INTERACTION_JS, str, this)
|
|
|
+ ARouter.getInstance().build(RouterUrlCommon.gameLoading)
|
|
|
+ .withString("gameCode", bean.gameCode)
|
|
|
+ .withString("playClass", bean.playClass)
|
|
|
+ .withString("videoUrl", bean.gameVideoUrl)
|
|
|
+ .withString("gameInbetweenImage", bean.gameInbetweenImage)
|
|
|
+ .withString("gameBackgroundImage", bean.gameBackgroundImage)
|
|
|
+ .withString("desn", bean.desn)
|
|
|
+ .withTransition(R.anim.leftin, R.anim.leftout)
|
|
|
+ .navigation(mContext)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -567,15 +573,7 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
R.id.btnTask -> {
|
|
|
//开始专属训练
|
|
|
if (currentTaskRecord != null) {
|
|
|
- currentTaskRecord.let {
|
|
|
- val str =
|
|
|
- it?.gameUrl + "?gameCode=" + it?.gameCode + "&isFull=true&isSound=true&playClass=A" + "&userToken=" + User.getToken()
|
|
|
- JumpUtil.jumpActivityWithUrl(
|
|
|
- RouterUrlCommon.WEB_VIEW_INTERACTION_JS,
|
|
|
- str,
|
|
|
- mContext
|
|
|
- )
|
|
|
- }
|
|
|
+ gameLoading(currentTaskRecord!!)
|
|
|
}
|
|
|
}
|
|
|
//开始训练蒙版
|
|
|
@@ -607,4 +605,19 @@ class HomeActivity : BaseMVVMActivity<ActivityHomeBinding, HomeViewModel>(),
|
|
|
}
|
|
|
return true
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 跳转游戏页面
|
|
|
+ */
|
|
|
+ private fun gameLoading(bean: Record) {
|
|
|
+ ARouter.getInstance().build(RouterUrlCommon.gameLoading)
|
|
|
+ .withString("gameCode", bean.gameCode)
|
|
|
+ .withString("playClass", bean.playClass)
|
|
|
+ .withString("videoUrl", bean.gameVideoUrl)
|
|
|
+ .withString("gameInbetweenImage", bean.gameInbetweenImage)
|
|
|
+ .withString("gameBackgroundImage", bean.gameBackgroundImage)
|
|
|
+ .withString("desn", bean.desn)
|
|
|
+ .withTransition(R.anim.leftin, R.anim.leftout)
|
|
|
+ .navigation(mContext)
|
|
|
+ }
|
|
|
}
|