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
8a9b5254
Commit
8a9b5254
authored
Aug 28, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新个人信息接口
parent
8ad0271a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
0 deletions
+67
-0
HomePresenter.kt
.../java/com/xinfu/helivideo/mvp/presenters/HomePresenter.kt
+38
-0
MainFragment.kt
...main/java/com/xinfu/helivideo/ui/fragment/MainFragment.kt
+1
-0
RecommendFragment.kt
...java/com/xinfu/helivideo/ui/fragment/RecommendFragment.kt
+28
-0
No files found.
video/app/src/main/java/com/xinfu/helivideo/mvp/presenters/HomePresenter.kt
View file @
8a9b5254
...
...
@@ -277,4 +277,42 @@ class HomePresenter : BasePresenter<HomeView>() {
}
})
}
fun
getMyInfo
()
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"os"
]
=
"android"
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getMyInfo
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
UserBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onError
(
e
:
Throwable
?)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserBean
>)
{
if
(
isLinkView
)
return
val
code
:
Int
=
baseResponse
.
status
val
message
:
String
=
baseResponse
.
message
when
(
code
)
{
200
->
{
UserManager
.
getInstance
().
saveUserInfo
(
baseResponse
.
data
)
}
else
->
{
view
.
showToast
(
message
)
}
}
}
})
}
}
\ No newline at end of file
video/app/src/main/java/com/xinfu/helivideo/ui/fragment/MainFragment.kt
View file @
8a9b5254
...
...
@@ -129,6 +129,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
//获取游客登录数据
homePresenter
.
userLogin
()
}
else
{
homePresenter
.
getMyInfo
()
homePresenter
.
topTabs
()
homePresenter
.
orders
()
TrackManager
.
getInstance
().
getMyInfo
()
...
...
video/app/src/main/java/com/xinfu/helivideo/ui/fragment/RecommendFragment.kt
View file @
8a9b5254
...
...
@@ -10,14 +10,22 @@ import com.google.android.material.tabs.TabLayoutMediator
import
com.xinfu.helivideo.R
import
com.xinfu.helivideo.common.AppConfig
import
com.xinfu.helivideo.common.Constant
import
com.xinfu.helivideo.manager.AppHttpManager
import
com.xinfu.helivideo.manager.UserManager
import
com.xinfu.helivideo.mvp.model.BaseResponse
import
com.xinfu.helivideo.mvp.model.OrderRecordBean
import
com.xinfu.helivideo.mvp.model.UserBean
import
com.xinfu.helivideo.ui.activitys.MainActivity
import
com.xinfu.helivideo.ui.adapter.RecommendPageAdapter
import
com.xinfu.helivideo.ui.fragment.base.BaseFragment
import
com.xinfu.helivideo.video.csj.DramaTabFragment
import
com.xinfu.helivideo.video.tx.TxVideoFragment
import
com.xinfu.library.net.neterror.BaseSubscriber
import
com.xinfu.library.net.neterror.Throwable
import
com.xinfu.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_order_record.*
import
kotlinx.android.synthetic.main.fragment_recommend.*
import
kotlinx.android.synthetic.main.header_layout.*
/**
* @author Assen
...
...
@@ -147,9 +155,29 @@ class RecommendFragment : BaseFragment(), View.OnClickListener {
// 重置状态
initVp2
()
}
getData
()
}
}
private
fun
getData
()
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"os"
]
=
"android"
AppHttpManager
.
getInstance
(
baseApplication
)
.
call
(
baseApplication
.
loanService
.
getMyInfo
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
UserBean
>>()
{
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
t
:
BaseResponse
<
UserBean
>)
{
if
(
t
.
status
==
200
)
{
UserManager
.
getInstance
().
saveUserInfo
(
t
.
data
)
}
}
})
}
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
...
...
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