Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_flutter
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
gm_flutter
Commits
353d5b11
Commit
353d5b11
authored
Jul 02, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zx/gmFlutter' into 'test'
Zx/gm flutter See merge request
!6
parents
c22fb1c0
65f6b83c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
9 deletions
+26
-9
plan_compare_detail_info_bg.png
assets/plan_compare_detail_info_bg.png
+0
-0
plan_compare_detail_title_bg.png
assets/plan_compare_detail_title_bg.png
+0
-0
PlanCompareDetailModel.dart
...eModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
+26
-9
PlanCompareDetailPage.dart
...ueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
+0
-0
No files found.
assets/plan_compare_detail_info_bg.png
0 → 100644
View file @
353d5b11
7.22 KB
assets/plan_compare_detail_title_bg.png
0 → 100644
View file @
353d5b11
1.62 KB
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
View file @
353d5b11
...
...
@@ -2,7 +2,7 @@
* @Author: zx
* @Date: 2020-06-30 17:43:13
* @Last Modified by: zx
* @Last Modified time: 2020-07-0
1 20:04:23
* @Last Modified time: 2020-07-0
2 13:50:15
*/
import
'package:flutter_common/commonModel/live/BaseModel.dart'
;
import
'package:flutter_common/commonModel/live/LiveData.dart'
;
...
...
@@ -10,25 +10,43 @@ import 'package:gm_flutter/ClueModel/server/api/ClueApi.serv.dart';
import
'package:gm_flutter/ClueModel/server/entity/PlanCompareDetail.dart'
;
import
'package:gm_flutter/commonModel/GMBase.dart'
;
import
'package:gm_flutter/commonModel/rx/RxDispose.dart'
;
import
'package:flutter_common/commonModel/toast/NativeToast.dart'
;
import
'package:gm_flutter/commonModel/util/PrintUtil.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
class
PlanCompareDetailModel
extends
BaseModel
{
LiveData
<
PlanCompareDetail
>
detailLive
=
LiveData
();
LiveData
<
Pair
<
int
,
List
<
Groups
>>>
detailLive
=
LiveData
();
LiveData
<
Pair
<
int
,
List
<
PlansInfo
>>>
headerLive
=
LiveData
();
RxDispose
rxDispose
=
RxDispose
();
void
init
()
{
void
init
(
List
<
int
>
planIds
)
{
ClueApiImpl
.
getInstance
()
.
getPlanCompareDetail
(
DioUtil
.
getInstance
().
getDio
(),
[
1
,
2
]
)
.
getPlanCompareDetail
(
DioUtil
.
getInstance
().
getDio
(),
planIds
)
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
detailLive
.
notifyView
(
event
);
if
(
event
.
data
.
plansInfo
==
null
||
event
.
data
.
groups
.
isEmpty
)
{
headerLive
.
notifyView
(
Pair
(
ENDLOADING
,
[]));
detailLive
.
notifyView
(
Pair
(
ENDLOADING
,
[]));
}
else
{
detailLive
.
notifyView
(
Pair
(
ENDLOADING
,
event
.
data
.
groups
));
}
}
else
{
NativeToast
.
showNativeToast
(
event
.
message
);
headerLive
.
notifyView
(
Pair
(
FAIL
,
null
));
detailLive
.
notifyView
(
Pair
(
FAIL
,
null
));
}
})
.
addToDispose
(
rxDispose
)
.
onError
((
err
)
{});
.
onError
((
err
)
{
headerLive
.
notifyView
(
Pair
(
FAIL
,
null
));
detailLive
.
notifyView
(
Pair
(
FAIL
,
null
));
NativeToast
.
showNativeToast
(
err
.
message
);
});
}
@override
void
dispose
()
{
detailLive
.
dispost
();
}
}
\ No newline at end of file
}
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
353d5b11
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