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
06d60b96
Commit
06d60b96
authored
Jan 05, 2024
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
a001ccd4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
49 deletions
+38
-49
VideoPresenter.kt
...va/com/duben/xixiplaylet/mvp/presenters/VideoPresenter.kt
+1
-0
DramaApiDetailActivity.kt
...com/duben/xixiplaylet/video/csj/DramaApiDetailActivity.kt
+8
-7
DramaTabFragment.kt
.../java/com/duben/xixiplaylet/video/csj/DramaTabFragment.kt
+5
-0
TxVideoActivity.kt
...in/java/com/duben/xixiplaylet/video/tx/TxVideoActivity.kt
+3
-1
TxVideoAdapter.kt
.../com/duben/xixiplaylet/video/tx/adapter/TxVideoAdapter.kt
+7
-9
NewTxVideoActivity.kt
...n/xixiplaylet/video/tx/newrecommend/NewTxVideoActivity.kt
+8
-0
NewTxVideoAdapter.kt
...en/xixiplaylet/video/tx/newrecommend/NewTxVideoAdapter.kt
+6
-24
drama_activity_api_detail.xml
video/app/src/main/res/layout/drama_activity_api_detail.xml
+0
-8
No files found.
video/app/src/main/java/com/duben/xixiplaylet/mvp/presenters/VideoPresenter.kt
View file @
06d60b96
...
...
@@ -15,6 +15,7 @@ class VideoPresenter : BasePresenter<VideoView>() {
fun
getVipProducts
()
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"isInstallAlipay"
]
=
true
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getVipProducts
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
VipBean
>>()
{
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/csj/DramaApiDetailActivity.kt
View file @
06d60b96
...
...
@@ -174,16 +174,17 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
episode_tv
.
text
=
String
.
format
(
"共%d集 更新中"
,
it
.
total
)
}
info_tv
.
text
=
String
.
format
(
"第%d集"
,
mVedioBean
!!
.
seeIndex
)
if
(!
UserManager
.
getInstance
().
newFlag
){
unlock
.
text
=
String
.
format
(
"观看激励视频"
)
unlock
.
visibility
=
View
.
VISIBLE
tv_title
.
text
=
String
.
format
(
"解锁%s·第%d-%d集"
,
it
.
title
,
mInitUnlockIndex
+
1
,
mInitUnlockIndex
+
lockSet
)
}
else
{
unlock
.
visibility
=
View
.
GONE
}
tv_title
.
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
tv_info
.
text
=
String
.
format
(
"看激励视频解锁%d集剧情\n请按照顺序解锁"
,
lockSet
)
if
(
mVedioBean
!!
.
collect
==
0
)
{
setCollectImage
(
zan_iv
)
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/csj/DramaTabFragment.kt
View file @
06d60b96
...
...
@@ -15,6 +15,7 @@ import com.duben.xixiplaylet.common.Constant
import
com.duben.xixiplaylet.manager.LocalVedioManager
import
com.duben.xixiplaylet.mvp.model.IndexList
import
com.duben.xixiplaylet.mvp.model.NineShowBean
import
com.duben.xixiplaylet.mvp.model.VipBean
import
com.duben.xixiplaylet.mvp.presenters.VideoPresenter
import
com.duben.xixiplaylet.mvp.views.VideoView
import
com.duben.xixiplaylet.ui.fragment.base.BaseFragment
...
...
@@ -393,5 +394,9 @@ class DramaTabFragment : BaseFragment(), VideoView {
}
override
fun
getVipProductSuc
(
data
:
VipBean
)
{
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/xixiplaylet/video/tx/TxVideoActivity.kt
View file @
06d60b96
...
...
@@ -58,8 +58,10 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override
fun
initViewsAndEvents
()
{
videoPresenter
.
attachView
(
this
)
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
videoPresenter
.
getVipProducts
()
initView
()
videoPresenter
.
getVipProducts
()
}
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/tx/adapter/TxVideoAdapter.kt
View file @
06d60b96
...
...
@@ -91,22 +91,20 @@ class TxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity, BaseViewH
vipBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集
1
"
}
else
{
// 开通会员解锁
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集
2
"
}
}
else
{
adBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d-%d集"
,
it
.
title
,
it
.
unlockIndex
+
1
,
it
.
unlockIndex
+
it
.
adGiveVedioNum
)
// 自有剧详情页 会员
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集3"
}
holder
.
getView
<
TextView
>(
R
.
id
.
unlock
).
text
=
String
.
format
(
"查看激励视频"
)
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/tx/newrecommend/NewTxVideoActivity.kt
View file @
06d60b96
...
...
@@ -26,6 +26,7 @@ import com.duben.xixiplaylet.utils.SpanUtils
import
com.duben.xixiplaylet.video.tx.VideoModel
import
com.duben.library.utils.GlideUtils
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.duben.xixiplaylet.common.AppConfig
import
com.duben.xixiplaylet.ui.widgets.DialogListener
import
com.duben.xixiplaylet.ui.widgets.VideoEpisodeDialog
import
kotlinx.android.synthetic.main.activity_new_tx_video.*
...
...
@@ -54,6 +55,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override
fun
initViewsAndEvents
()
{
videoPresenter
.
attachView
(
this
)
videoPresenter
.
getVipProducts
()
mVedioBean
?.
let
{
videoPresenter
.
getIndexList
(
""
+
it
.
vedioId
)
}
initView
()
}
...
...
@@ -230,6 +232,12 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
}
override
fun
getVipProductSuc
(
data
:
VipBean
)
{
if
(
data
.
list
!=
null
&&
data
.
list
.
size
>
0
)
{
AppConfig
.
firstVipPrice
=
data
.
list
.
get
(
0
).
price
}
}
override
fun
onEpisodeClick
(
position
:
Int
)
{
dialog
?.
dismiss
()
val
data
=
new_super_short_video_view
.
data
...
...
video/app/src/main/java/com/duben/xixiplaylet/video/tx/newrecommend/NewTxVideoAdapter.kt
View file @
06d60b96
...
...
@@ -15,6 +15,7 @@ import com.chad.library.adapter.base.viewholder.BaseViewHolder
import
com.duben.xixiplaylet.R
import
com.duben.xixiplaylet.ad.express.ExpressAdCallback
import
com.duben.xixiplaylet.ad.express.ExpressManager
import
com.duben.xixiplaylet.common.AppConfig
import
com.duben.xixiplaylet.manager.UserManager
import
com.duben.xixiplaylet.mvp.model.*
import
com.duben.xixiplaylet.utils.UIUtils
...
...
@@ -61,37 +62,18 @@ class NewTxVideoAdapter : BaseMultiItemQuickAdapter<VideoMultiItemEntity4, BaseV
VEDIO3DOS_AD
->
{
// 观看激励视频解锁
vipBtn
.
visibility
=
View
.
GONE
adBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d集"
,
it
.
title
,
holder
.
adapterPosition
+
1
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"看激励视频解锁1集剧情\n请按照顺序解锁"
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
}
VEDIO3DOS_PAY
->
{
// 开通会员解锁
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
visibility
=
View
.
GONE
vipBtn
.
setBackgroundResource
(
R
.
mipmap
.
bg_detail_bottom_vip
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·全集"
,
it
.
title
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
}
else
->
{
adBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
String
.
format
(
"解锁%s·第%d-%d集"
,
it
.
title
,
it
.
unlockIndex
+
1
,
it
.
unlockIndex
+
it
.
adGiveVedioNum
)
holder
.
getView
<
TextView
>(
R
.
id
.
tv_info
).
text
=
String
.
format
(
"看激励视频解锁%d集剧情\n请按照顺序解锁"
,
it
.
adGiveVedioNum
)
adBtn
.
visibility
=
View
.
GONE
vipBtn
.
visibility
=
View
.
VISIBLE
holder
.
getView
<
TextView
>(
R
.
id
.
tv_title
).
text
=
if
(
AppConfig
.
firstVipPrice
==
0.0
)
"解锁后续剧集"
else
"${AppConfig.firstVipPrice}元解锁后续剧集"
}
}
...
...
video/app/src/main/res/layout/drama_activity_api_detail.xml
View file @
06d60b96
...
...
@@ -201,14 +201,6 @@
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_info"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"20dp"
android:gravity=
"center"
android:text=
"试看已结束"
/>
<Button
android:id=
"@+id/unlock"
android:layout_width=
"230dp"
...
...
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