Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
51690ed9
Commit
51690ed9
authored
Oct 10, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加视频详情页广告开关
parent
95812cdb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
18 deletions
+29
-18
AppConfig.java
...main/java/com/changzhi/yipinplaylet/common/AppConfig.java
+1
-0
VideoPresenter.kt
...om/changzhi/yipinplaylet/mvp/presenters/VideoPresenter.kt
+14
-12
LoanService.java
.../main/java/com/changzhi/yipinplaylet/net/LoanService.java
+6
-0
TxVideoActivity.kt
...ava/com/changzhi/yipinplaylet/video/tx/TxVideoActivity.kt
+8
-6
No files found.
video/app/src/main/java/com/changzhi/yipinplaylet/common/AppConfig.java
View file @
51690ed9
...
...
@@ -26,6 +26,7 @@ public class AppConfig {
public
static
boolean
enterAlipay
=
false
;
public
static
boolean
showVipVedio
=
false
;
public
static
boolean
showVipAdDialog
=
false
;
public
static
boolean
showVedioPageAdFlag
=
false
;
public
static
String
detailDialogUnlockText
=
""
;
public
static
long
splashTime
=
0L
;
...
...
video/app/src/main/java/com/changzhi/yipinplaylet/mvp/presenters/VideoPresenter.kt
View file @
51690ed9
...
...
@@ -3,6 +3,7 @@ package com.changzhi.yipinplaylet.mvp.presenters
import
com.google.gson.JsonObject
import
com.changzhi.library.net.neterror.BaseSubscriber
import
com.changzhi.library.net.neterror.Throwable
import
com.changzhi.yipinplaylet.common.AppConfig
import
com.changzhi.yipinplaylet.manager.AppHttpManager
import
com.changzhi.yipinplaylet.mvp.model.BaseResponse
import
com.changzhi.yipinplaylet.mvp.model.IndexList
...
...
@@ -203,24 +204,28 @@ class VideoPresenter : BasePresenter<VideoView>() {
}
fun
show
Turn
()
{
fun
show
VedioConfs
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
show
Turn
(),
object
:
BaseSubscriber
<
BaseResponse
<
NineShowBean
>>()
{
.
call
(
loanService
.
show
VedioConfs
(),
object
:
BaseSubscriber
<
BaseResponse
<
JsonObject
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
NineShowBean
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
JsonObject
>)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
view
.
showTurnSuc
(
baseResponse
.
data
)
200
->
{
try
{
AppConfig
.
showVedioPageAdFlag
=
baseResponse
.
data
.
get
(
"open_unlockByad"
).
asBoolean
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
else
->
{
view
.
showToast
(
message
)
}
...
...
@@ -229,11 +234,8 @@ class VideoPresenter : BasePresenter<VideoView>() {
override
fun
onError
(
e
:
Throwable
?)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
view
.
showToast
(
e
?.
message
)
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/changzhi/yipinplaylet/net/LoanService.java
View file @
51690ed9
...
...
@@ -337,6 +337,12 @@ public interface LoanService {
@POST
(
"api/vedioV1/reportOpenAdEcpm"
)
Observable
<
BaseResponse
<
Object
>>
cmtEcpm
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 视频页广告开关
*/
@POST
(
"api/vedioV1/confs"
)
Observable
<
BaseResponse
<
JsonObject
>>
showVedioConfs
();
/**
* 默认http工厂
...
...
video/app/src/main/java/com/changzhi/yipinplaylet/video/tx/TxVideoActivity.kt
View file @
51690ed9
...
...
@@ -62,7 +62,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
initView
()
videoPresenter
.
getVipProducts
()
videoPresenter
.
showVedioConfs
()
}
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
...
...
@@ -93,6 +93,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
// vip界面返回弹出广告弹窗
if
(
AppConfig
.
showVedioPageAdFlag
)
{
if
(
AppConfig
.
showVipAdDialog
&&
!
UserManager
.
getInstance
().
vipFlag
)
{
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
adDialog
()
...
...
@@ -100,6 +101,7 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
},
300
)
}
}
}
override
fun
onPause
()
{
super
.
onPause
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment