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
fa964b8c
Commit
fa964b8c
authored
Aug 09, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加匹配接口
parent
fd0785a0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
27 deletions
+67
-27
LocalVedioManager.kt
...ain/java/com/mints/helivideo/manager/LocalVedioManager.kt
+2
-2
RecoBean.java
...src/main/java/com/mints/helivideo/mvp/model/RecoBean.java
+16
-0
RecommendBean.java
...ain/java/com/mints/helivideo/mvp/model/RecommendBean.java
+29
-0
HomePresenter.kt
.../java/com/mints/helivideo/mvp/presenters/HomePresenter.kt
+2
-3
HomeView.kt
...p/src/main/java/com/mints/helivideo/mvp/views/HomeView.kt
+2
-5
LoanService.java
...pp/src/main/java/com/mints/helivideo/net/LoanService.java
+3
-2
RecommendActivity.kt
...ava/com/mints/helivideo/ui/activitys/RecommendActivity.kt
+4
-5
MainFragment.kt
...main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
+9
-8
MovieFragment.kt
...ain/java/com/mints/helivideo/ui/fragment/MovieFragment.kt
+0
-2
No files found.
video/app/src/main/java/com/mints/helivideo/manager/LocalVedioManager.kt
View file @
fa964b8c
...
...
@@ -105,8 +105,8 @@ object LocalVedioManager {
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
data
))
bundle
.
putBoolean
(
Constant
.
VEDIO_NEXT
,
isPlayNext
)
bundle
.
putBoolean
(
Constant
.
VEDIO_THIRD
,
isThirdId
)
//
readyGo(activity, TxVideoActivity::class.java, bundle)
readyGo
(
activity
,
RecommendActivity
::
class
.
java
,
bundle
)
readyGo
(
activity
,
TxVideoActivity
::
class
.
java
,
bundle
)
//
readyGo(activity, RecommendActivity::class.java, bundle)
}
else
{
requestDrama
(
activity
,
data
)
}
...
...
video/app/src/main/java/com/mints/helivideo/mvp/model/RecoBean.java
0 → 100644
View file @
fa964b8c
package
com
.
mints
.
helivideo
.
mvp
.
model
;
import
java.io.Serializable
;
public
class
RecoBean
implements
Serializable
{
private
RecommendBean
vedio3
;
public
RecommendBean
getVedio3
()
{
return
vedio3
;
}
public
void
setVedio3
(
RecommendBean
vedio3
)
{
this
.
vedio3
=
vedio3
;
}
}
video/app/src/main/java/com/mints/helivideo/mvp/model/RecommendBean.java
0 → 100644
View file @
fa964b8c
package
com
.
mints
.
helivideo
.
mvp
.
model
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
RecommendBean
implements
Serializable
{
private
VedioBean
vedioMsg
;
private
String
showVedioUrl
;
public
VedioBean
getVedioMsg
()
{
return
vedioMsg
;
}
public
void
setVedioMsg
(
VedioBean
vedioMsg
)
{
this
.
vedioMsg
=
vedioMsg
;
}
public
String
getShowVedioUrl
()
{
return
showVedioUrl
;
}
public
void
setShowVedioUrl
(
String
showVedioUrl
)
{
this
.
showVedioUrl
=
showVedioUrl
;
}
}
video/app/src/main/java/com/mints/helivideo/mvp/presenters/HomePresenter.kt
View file @
fa964b8c
...
...
@@ -255,7 +255,7 @@ class HomePresenter : BasePresenter<HomeView>() {
fun
getRecommendVedio
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getRecommendVedio
(),
object
:
BaseSubscriber
<
BaseResponse
<
IndexList
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
RecoBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
...
...
@@ -264,11 +264,10 @@ class HomePresenter : BasePresenter<HomeView>() {
if
(
isLinkView
)
return
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
IndexList
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
RecoBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
...
...
video/app/src/main/java/com/mints/helivideo/mvp/views/HomeView.kt
View file @
fa964b8c
package
com.mints.helivideo.mvp.views
import
com.mints.helivideo.mvp.model.BannerList
import
com.mints.helivideo.mvp.model.HotStyleTypesList
import
com.mints.helivideo.mvp.model.IndexList
import
com.mints.helivideo.mvp.model.NineShowBean
import
com.mints.helivideo.mvp.model.*
interface
HomeView
:
BaseView
{
...
...
@@ -11,7 +8,7 @@ interface HomeView : BaseView {
fun
topTabsSuc
(
data
:
BannerList
?)
fun
ordersSuc
(
data
:
BannerList
?)
fun
getSoltVedioSuc
(
data
:
IndexList
?)
fun
getRecommendVedioSuc
(
data
:
IndexList
?)
fun
getRecommendVedioSuc
(
data
:
RecoBean
?)
fun
showTurnSuc
(
data
:
NineShowBean
)
}
video/app/src/main/java/com/mints/helivideo/net/LoanService.java
View file @
fa964b8c
...
...
@@ -13,6 +13,7 @@ import com.mints.helivideo.mvp.model.IndexList;
import
com.mints.helivideo.mvp.model.NineListBean
;
import
com.mints.helivideo.mvp.model.NineShowBean
;
import
com.mints.helivideo.mvp.model.OrderRecordBean
;
import
com.mints.helivideo.mvp.model.RecoBean
;
import
com.mints.helivideo.mvp.model.UserBean
;
import
com.mints.helivideo.mvp.model.VedioBean
;
import
com.mints.helivideo.mvp.model.Version
;
...
...
@@ -280,8 +281,8 @@ public interface LoanService {
/**
* 匹配推荐
*/
@POST
(
"api/vedio/
firstVedio
"
)
Observable
<
BaseResponse
<
IndexList
>>
getRecommendVedio
();
@POST
(
"api/vedio/
vedio3Msg
"
)
Observable
<
BaseResponse
<
RecoBean
>>
getRecommendVedio
();
/**
* 9宫格信息
...
...
video/app/src/main/java/com/mints/helivideo/ui/activitys/RecommendActivity.kt
View file @
fa964b8c
...
...
@@ -6,9 +6,8 @@ import android.view.View
import
com.google.gson.Gson
import
com.mints.helivideo.R
import
com.mints.helivideo.common.Constant
import
com.mints.helivideo.mvp.model.
Vedio
Bean
import
com.mints.helivideo.mvp.model.
Recommend
Bean
import
com.mints.helivideo.ui.activitys.base.BaseActivity
import
com.mints.helivideo.utils.LogUtil
import
com.mints.helivideo.video.tx.TXVodPlayerWrapper
import
com.mints.helivideo.video.tx.VideoModel
import
com.mints.library.utils.nodoubleclick.AntiShake
...
...
@@ -20,7 +19,7 @@ import kotlinx.android.synthetic.main.activity_recommend.*
*/
class
RecommendActivity
:
BaseActivity
(),
View
.
OnClickListener
{
private
var
mVedioBean
:
Vedio
Bean
?
=
null
private
var
recommendBean
:
Recommend
Bean
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_recommend
...
...
@@ -34,7 +33,7 @@ class RecommendActivity : BaseActivity(), View.OnClickListener {
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
val
json
=
extras
.
getString
(
Constant
.
VEDIO_BEAN
)
mVedioBean
=
Gson
().
fromJson
(
json
,
Vedio
Bean
::
class
.
java
)
recommendBean
=
Gson
().
fromJson
(
json
,
Recommend
Bean
::
class
.
java
)
}
}
...
...
@@ -44,7 +43,7 @@ class RecommendActivity : BaseActivity(), View.OnClickListener {
}
private
fun
initView
()
{
val
videoModel
=
VideoModel
(
mVedioBean
!!
.
recommend
Url
)
val
videoModel
=
VideoModel
(
recommendBean
?.
showVedio
Url
)
val
txVodPlayerWrapper
=
TXVodPlayerWrapper
(
mContext
)
txVodPlayerWrapper
.
preStartPlay
(
videoModel
)
baseItemView
.
setTXVodPlayer
(
txVodPlayerWrapper
)
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MainFragment.kt
View file @
fa964b8c
...
...
@@ -60,7 +60,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
private
val
topList
=
mutableListOf
<
VedioBean
>()
private
var
vpAdapter
:
HomeVideoPageAdapter
?
=
null
private
var
topAdapter
:
TopAdapter
?
=
null
private
var
recommendVedioBean
:
Vedi
oBean
?
=
null
private
var
recommendVedioBean
:
Rec
oBean
?
=
null
private
val
homePresenter
by
lazy
{
HomePresenter
()
}
...
...
@@ -113,9 +113,10 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_ONE
)
{
if
(
AntiShake
.
check
(
banner
?.
id
))
return
if
(!
UserManager
.
getInstance
().
vipFlag
)
{
BannerManager
.
loadAd
(
requireActivity
(),
fl_main_banner
)
}
// if (!UserManager.getInstance().vipFlag) {
// BannerManager.loadAd(requireActivity(), fl_main_banner)
// }
BannerManager
.
loadAd
(
requireActivity
(),
fl_main_banner
)
if
(
AppConfig
.
exitLoginMainRefresh
)
{
AppConfig
.
exitLoginMainRefresh
=
false
...
...
@@ -332,8 +333,8 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
}
override
fun
getRecommendVedioSuc
(
data
:
IndexList
?)
{
this
.
recommendVedioBean
=
data
?.
vedioMsg
override
fun
getRecommendVedioSuc
(
data
:
RecoBean
?)
{
this
.
recommendVedioBean
=
data
}
...
...
@@ -376,7 +377,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
/**
* 展示推荐弹窗
*/
private
fun
showRecommendAct
(
data
:
Vedi
oBean
?)
{
private
fun
showRecommendAct
(
data
:
Rec
oBean
?)
{
if
(
data
==
null
)
return
if
(
AppConfig
.
enterVipAct
)
{
...
...
@@ -391,7 +392,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
val
bundle
=
Bundle
()
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
data
))
bundle
.
putString
(
Constant
.
VEDIO_BEAN
,
JsonUtil
.
toJson
(
data
.
vedio3
))
readyGo
(
RecommendActivity
::
class
.
java
,
bundle
)
},
300
)
return
...
...
video/app/src/main/java/com/mints/helivideo/ui/fragment/MovieFragment.kt
View file @
fa964b8c
...
...
@@ -149,8 +149,6 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
}
private
fun
loadAd
()
{
if
(
UserManager
.
getInstance
().
vipFlag
)
return
MainExpressManager
.
instance
.
loadAd
(
object
:
ExpressAdCallback
{
override
fun
loadSuccess
(
adView
:
FrameLayout
?)
{
...
...
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