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
34c7325f
Commit
34c7325f
authored
Sep 18, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
41edb128
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
295 additions
and
299 deletions
+295
-299
.gitignore
video/.gitignore
+5
-1
MusicBean.kt
...src/main/java/com/duben/dayplaylet/mvp/model/MusicBean.kt
+8
-0
MusicPresenter.kt
...ava/com/duben/dayplaylet/mvp/presenters/MusicPresenter.kt
+43
-0
MusicView.kt
...src/main/java/com/duben/dayplaylet/mvp/views/MusicView.kt
+7
-0
LoanService.java
...p/src/main/java/com/duben/dayplaylet/net/LoanService.java
+9
-0
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+223
-298
No files found.
video/.gitignore
View file @
34c7325f
...
...
@@ -11,3 +11,7 @@ app/build
picture_library/build
ucrop/build
videocache/build
wxpay/build
rxpay/build
alipay/build
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/mvp/model/MusicBean.kt
0 → 100644
View file @
34c7325f
package
com.duben.dayplaylet.mvp.model
data class
MusicBean
(
val
completeCount
:
Int
,
//完成的次数(这里的次数不包括翻倍)
val
nextIsAd
:
Boolean
,
//接下来是不是要看广告了
val
openCash
:
Boolean
,
//还能不能提现,不能提现就不展示提现入口了
val
turnNeedCount
:
Int
//提现需要的次数
)
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/mvp/presenters/MusicPresenter.kt
0 → 100644
View file @
34c7325f
package
com.duben.dayplaylet.mvp.presenters
import
com.duben.dayplaylet.manager.AppHttpManager
import
com.duben.dayplaylet.mvp.model.BaseResponse
import
com.duben.dayplaylet.mvp.model.MusicBean
import
com.duben.dayplaylet.mvp.views.MusicView
import
com.duben.library.net.neterror.BaseSubscriber
import
com.duben.library.net.neterror.Throwable
class
MusicPresenter
:
BasePresenter
<
MusicView
>()
{
// 猜歌页信息
fun
rdSongMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
rdSongMsg
(),
object
:
BaseSubscriber
<
BaseResponse
<
MusicBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
showToast
(
e
.
message
)
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
MusicBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
status
val
message
=
baseResponse
.
message
when
(
code
)
{
200
->
{
view
.
rdSongMsgSuc
(
baseResponse
.
data
)
}
else
->
{
view
.
showToast
(
message
)
}
}
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/mvp/views/MusicView.kt
0 → 100644
View file @
34c7325f
package
com.duben.dayplaylet.mvp.views
import
com.duben.dayplaylet.mvp.model.MusicBean
interface
MusicView
:
BaseView
{
fun
rdSongMsgSuc
(
data
:
MusicBean
)
}
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/net/LoanService.java
View file @
34c7325f
...
...
@@ -3,6 +3,7 @@ package com.duben.dayplaylet.net;
import
android.content.Context
;
import
android.text.TextUtils
;
import
com.duben.dayplaylet.mvp.model.MusicBean
;
import
com.google.gson.JsonObject
;
import
com.duben.dayplaylet.BuildConfig
;
import
com.duben.dayplaylet.mvp.model.BannerList
;
...
...
@@ -225,6 +226,14 @@ public interface LoanService {
@POST
(
"api/reportAddCoinMsg"
)
Observable
<
BaseResponse
<
JsonObject
>>
reportAddCoinMsg
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 猜歌页信息
*
* @return
*/
@POST
(
"api/reward/rdSongMsg"
)
Observable
<
BaseResponse
<
MusicBean
>>
rdSongMsg
();
/**
* 默认http工厂
*/
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
34c7325f
This diff is collapsed.
Click to expand it.
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