Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
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
bp
ShenghuoquanBusiness
Commits
7cffb505
Commit
7cffb505
authored
Sep 14, 2021
by
chengkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网络请求完成重置状态
parent
25cceb26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
UserOrderListOperation.kt
...an/shenghuoquan/buserorder/http/UserOrderListOperation.kt
+6
-1
OrderListCallBack.kt
...henghuoquan/buserorder/http/callback/OrderListCallBack.kt
+2
-0
OrderListViewModel.kt
...n/shenghuoquan/buserorder/viewmodel/OrderListViewModel.kt
+10
-0
No files found.
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/http/UserOrderListOperation.kt
View file @
7cffb505
...
...
@@ -20,11 +20,16 @@ object UserOrderListOperation {
.
subscribe
(
object
:
HttpResultSubscriber
<
List
<
OrderWebData
>?>()
{
override
fun
onSuccess
(
result
:
HttpResult
<
List
<
OrderWebData
>?>?)
{
Timber
.
tag
(
"UserOrderListOperation"
).
i
(
"onSuccess ${result?.result.toString()}"
)
callBack
.
onOrderListCallback
(
result
!!
.
result
)
callBack
?
.
onOrderListCallback
(
result
!!
.
result
)
}
override
fun
onFailure
(
result
:
HttpResult
<
List
<
OrderWebData
>?>?)
{
Timber
.
tag
(
"UserOrderListOperation"
).
i
(
"onFailure ${result?.result.toString()}"
)
callBack
?.
onOrderFail
()
}
override
fun
onComplete
()
{
callBack
?.
onComplete
()
}
})
}
...
...
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/http/callback/OrderListCallBack.kt
View file @
7cffb505
...
...
@@ -4,4 +4,6 @@ import com.yidian.shenghuoquan.buserorder.app.bean.OrderWebData
interface
OrderListCallBack
{
fun
onOrderListCallback
(
orders
:
List
<
OrderWebData
>?)
fun
onOrderFail
()
fun
onComplete
()
}
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/viewmodel/OrderListViewModel.kt
View file @
7cffb505
...
...
@@ -53,6 +53,16 @@ class OrderListViewModel : BaseViewModel(){
_state
=
REQUEST_COMPLETE
},
1000
)
}
override
fun
onOrderFail
()
{
Timber
.
tag
(
"OrderListViewmodel"
).
i
(
"onOrderFail"
)
_state
=
REQUEST_COMPLETE
}
override
fun
onComplete
()
{
Timber
.
tag
(
"OrderListViewmodel"
).
i
(
"onComplete"
)
_state
=
REQUEST_COMPLETE
}
}
private
fun
generateLoadmoreParam
(
param
:
HashMap
<
String
,
String
?>):
HashMap
<
String
,
String
?>
{
...
...
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