Commit 4262a877 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 6e0b7e23
......@@ -22,6 +22,10 @@ object Constant {
const val MINTS_PKG_NAME = "com.xinfu.helivideo"
const val ACTION_EXIT_APP = "package.exit"
const val CARRIERTYPE_CSJ_VEDIO = "CSJ_VEDIO"
const val CARRIERTYPE_TX_VEDIO = "TX_VEDIO"
/**
* app应用首页 0-主页 1-中间 2-我
*/
......@@ -29,6 +33,7 @@ object Constant {
const val FRAGMENT_CLICK_TWO = 1
const val FRAGMENT_CLICK_THREE = 2
// 协议地址
var REGISTER_URL = "http://mints-web.mints-id.com/agreements/helivideo/yhxy.html"//注册协议
var PRIVACY_URL = "http://mints-web.mints-id.com/agreements/helivideo/syzc.html"//隐私协议
......
......@@ -370,8 +370,8 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
dpWidget?.let { widget ->
unlockBtn?.setOnClickListener {
AdManager.instance.showAd(this@DramaApiDetailActivity, "",
val carrierType = Constant.CARRIERTYPE_CSJ_VEDIO
AdManager.instance.showAd(this@DramaApiDetailActivity, carrierType,
object : AdStatusListener {
var canFail = false
override fun adSuccess() {
......@@ -383,7 +383,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
NoPreAdManager.loadVideoAd(
this@DramaApiDetailActivity,
"", object : AdStatusListener {
carrierType, object : AdStatusListener {
override fun adFail() {
showToast("广告太火爆了,请稍候再试")
}
......
......@@ -233,7 +233,8 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
R.id.unlock -> {
// 看广告解锁
AdManager.instance.showAd(this, "",
val carrierType = Constant.CARRIERTYPE_TX_VEDIO
AdManager.instance.showAd(this, carrierType,
object : AdStatusListener {
var canFail = false
override fun adSuccess() {
......@@ -245,7 +246,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
NoPreAdManager.loadVideoAd(
this@TxVideoActivity,
"", object : AdStatusListener {
carrierType, object : AdStatusListener {
override fun adFail() {
showToast("广告太火爆了,请稍候再试")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment