Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
xxsq
Commits
d91e42c4
Commit
d91e42c4
authored
Jun 10, 2022
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
4838caf3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
IHomeApi.kt
cms/src/main/java/com/zxhl/cms/net/api/IHomeApi.kt
+1
-1
RechargeActivity.kt
...ain/java/com/zxbw/modulemain/activity/RechargeActivity.kt
+3
-1
RechargeContract.kt
...ain/java/com/zxbw/modulemain/contract/RechargeContract.kt
+2
-1
RechargePresenter.kt
...n/java/com/zxbw/modulemain/presenter/RechargePresenter.kt
+6
-3
No files found.
cms/src/main/java/com/zxhl/cms/net/api/IHomeApi.kt
View file @
d91e42c4
...
...
@@ -398,5 +398,5 @@ interface IHomeApi {
//获取用户话费券列表
@GET
(
NetConfig
.
QY
.
XX_GOODS_FETCHALL_CARD
)
fun
getFetchallCard
():
Observable
<
Response
<
List
<
SkillEntity
>>>
fun
getFetchallCard
(
@Query
(
"phone"
)
phone
:
String
?
):
Observable
<
Response
<
List
<
SkillEntity
>>>
}
\ No newline at end of file
moduleMain/src/main/java/com/zxbw/modulemain/activity/RechargeActivity.kt
View file @
d91e42c4
...
...
@@ -8,6 +8,7 @@ import com.zxbw.modulemain.contract.RechargeContract
import
com.zxbw.modulemain.presenter.RechargePresenter
import
com.zxhl.cms.AppContext
import
com.zxhl.cms.common.base.BaseActivity
import
com.zxhl.cms.net.SettingPreference
import
com.zxhl.cms.net.model.qy.RightsDetailEntity
import
com.zxhl.cms.utils.OnRecycleItemClickListener
import
kotlinx.android.synthetic.main.activity_layout_recharge.*
...
...
@@ -31,11 +32,12 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<RightsDetail
}
override
fun
init
()
{
val
user
=
SettingPreference
.
getUserInfoData
()
mPresenter
=
RechargePresenter
(
this
)
mAdapter
=
RechargeAdapter
(
this
,
this
)
id_rl_recharge
?.
layoutManager
=
GridLayoutManager
(
this
,
3
)
id_rl_recharge
?.
adapter
=
mAdapter
mPresenter
?.
getFetchCard
()
mPresenter
?.
getFetchCard
(
user
.
nickname
)
}
override
fun
onItemClick
(
view
:
View
?,
position
:
Int
,
data
:
RightsDetailEntity
?)
{
...
...
moduleMain/src/main/java/com/zxbw/modulemain/contract/RechargeContract.kt
View file @
d91e42c4
...
...
@@ -7,6 +7,7 @@ class RechargeContract {
}
interface
Presenter
{
fun
getFetchCard
()
fun
getFetchCard
(
phone
:
String
)
fun
getPayList
()
}
}
\ No newline at end of file
moduleMain/src/main/java/com/zxbw/modulemain/presenter/RechargePresenter.kt
View file @
d91e42c4
...
...
@@ -4,7 +4,6 @@ import com.zxbw.modulemain.contract.RechargeContract
import
com.zxhl.cms.net.ApiClient
import
com.zxhl.cms.net.RxSchedulers
import
com.zxhl.cms.net.callback.BaseObserver
import
com.zxhl.cms.net.model.qy.RightsDetailEntity
import
com.zxhl.cms.net.model.qy.SkillEntity
class
RechargePresenter
:
RechargeContract
.
Presenter
{
...
...
@@ -14,8 +13,8 @@ class RechargePresenter : RechargeContract.Presenter {
constructor
(
mView
:
RechargeContract
.
View
)
{
this
.
mView
=
mView
}
override
fun
getFetchCard
()
{
ApiClient
.
homeApi
.
getFetchallCard
().
compose
(
RxSchedulers
.
observableIO2Main
())
override
fun
getFetchCard
(
phone
:
String
)
{
ApiClient
.
homeApi
.
getFetchallCard
(
phone
).
compose
(
RxSchedulers
.
observableIO2Main
())
.
subscribe
(
object
:
BaseObserver
<
List
<
SkillEntity
>>()
{
override
fun
onSuccess
(
result
:
List
<
SkillEntity
>?)
{
if
(!
result
.
isNullOrEmpty
()){
...
...
@@ -28,4 +27,8 @@ class RechargePresenter : RechargeContract.Presenter {
}
})
}
override
fun
getPayList
()
{
}
}
\ No newline at end of file
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