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
61b4a967
Commit
61b4a967
authored
Jul 06, 2020
by
朱翠翠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
逻辑添加
parent
662f4759
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
14 deletions
+36
-14
PlansCompareFeedModel.dart
...lueModel/page/PlansCompareFeed/PlansCompareFeedModel.dart
+2
-2
PlansCompareFeedPage.dart
...ClueModel/page/PlansCompareFeed/PlansCompareFeedPage.dart
+9
-1
ProjectDetailsModel.dart
lib/ClueModel/page/ProjectDetails/ProjectDetailsModel.dart
+2
-2
ProjectDetailsPage.dart
lib/ClueModel/page/ProjectDetails/ProjectDetailsPage.dart
+19
-5
ClueApi.dart
lib/ClueModel/server/api/ClueApi.dart
+2
-2
ClueApi.serv.dart
lib/ClueModel/server/api/ClueApi.serv.dart
+2
-2
No files found.
lib/ClueModel/page/PlansCompareFeed/PlansCompareFeedModel.dart
View file @
61b4a967
...
...
@@ -10,9 +10,9 @@ class PlansCompareFeedModel extends BaseModel {
LiveData
<
PlansCompareFeed
>
liveData
=
LiveData
();
RxDispose
rxDispose
=
RxDispose
();
void
init
()
{
void
init
(
int
_planType
,
int
_planId
)
{
ClueApiImpl
.
getInstance
()
.
getPlansCompareFeed
(
DioUtil
.
getInstance
().
getDio
(),
123
,
1
)
.
getPlansCompareFeed
(
DioUtil
.
getInstance
().
getDio
(),
_planId
,
_planType
)
.
listen
((
event
)
{
liveData
.
notifyView
(
event
);
})
...
...
lib/ClueModel/page/PlansCompareFeed/PlansCompareFeedPage.dart
View file @
61b4a967
...
...
@@ -5,6 +5,7 @@
**/
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:gm_flutter/ClueModel/page/PlansCompareFeed/PlansCompareFeedModel.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlansCompareFeed.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
...
...
@@ -14,6 +15,9 @@ import 'CallBackCompareItem.dart';
import
'PlansCompareFeedItemView.dart'
;
class
PlansCompareFeedPage
extends
StatefulWidget
{
int
_planType
;
int
_planId
;
@override
State
<
StatefulWidget
>
createState
()
=>
_PlansCompareFeedState
();
}
...
...
@@ -28,7 +32,7 @@ class _PlansCompareFeedState extends BaseState<PlansCompareFeedPage>
void
initState
()
{
super
.
initState
();
_model
=
new
PlansCompareFeedModel
();
_model
.
init
();
_model
.
init
(
widget
.
_planType
,
widget
.
_planId
);
_compareColor
=
Color
(
0xFFCCCCCC
);
_setCompare
=
Set
();
}
...
...
@@ -101,6 +105,10 @@ class _PlansCompareFeedState extends BaseState<PlansCompareFeedPage>
onClickCompare
()
{
if
(
_compareColor
==
Color
(
0xFFCCCCCC
))
return
;
setState
(()
{
FlutterBoost
.
onPageStart
();
FlutterBoost
.
singleton
.
open
(
"sample"
,
);
print
(
"onClickCompare=====_compareColor
$_compareColor
"
);
});
}
...
...
lib/ClueModel/page/ProjectDetails/ProjectDetailsModel.dart
View file @
61b4a967
...
...
@@ -16,9 +16,9 @@ class ProjectDetailsModel extends BaseModel {
LiveData
<
ProjectDetailsItem
>
liveData
=
LiveData
();
RxDispose
rxDispose
=
RxDispose
();
void
init
()
{
void
init
(
int
_planId
)
{
ClueApiImpl
.
getInstance
()
.
getProjectDetails
(
DioUtil
.
getInstance
().
getDio
(),
123
)
.
getProjectDetails
(
DioUtil
.
getInstance
().
getDio
(),
_planId
)
.
listen
((
event
)
{
liveData
.
notifyView
(
event
);
})
...
...
lib/ClueModel/page/ProjectDetails/ProjectDetailsPage.dart
View file @
61b4a967
...
...
@@ -13,6 +13,8 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart';
import
'../../server/entity/ProjectDetailsItem.dart'
;
class
ProjectDetailsPage
extends
StatefulWidget
{
int
_planId
;
@override
State
<
StatefulWidget
>
createState
()
=>
_ProjectDetailsState
();
}
...
...
@@ -24,7 +26,7 @@ class _ProjectDetailsState extends BaseState<ProjectDetailsPage> {
void
initState
()
{
super
.
initState
();
_model
=
new
ProjectDetailsModel
();
_model
.
init
();
_model
.
init
(
widget
.
_planId
);
}
@override
...
...
@@ -58,12 +60,24 @@ class _ProjectDetailsState extends BaseState<ProjectDetailsPage> {
}
ProjectDetailsItem
item
=
data
.
data
;
if
(
item
==
null
||
item
.
data
==
null
||
item
.
data
.
groups
==
null
)
{
return
emptyItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
);
return
emptyItem
(
MediaQuery
.
of
(
context
)
.
size
.
width
,
MediaQuery
.
of
(
context
)
.
size
.
height
);
}
if
(
item
.
error
!=
0
)
{
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
()
{});
return
errorItem
(
MediaQuery
.
of
(
context
)
.
size
.
width
,
MediaQuery
.
of
(
context
)
.
size
.
height
,
()
{});
}
return
ListView
.
builder
(
itemCount:
item
.
data
.
groups
.
length
,
...
...
lib/ClueModel/server/api/ClueApi.dart
View file @
61b4a967
...
...
@@ -19,11 +19,11 @@ import 'package:gm_flutter/ClueModel/server/entity/DiscussLowPriceAuthBean.dart'
@ServiceCenter
()
abstract
class
ClueApi
{
@Get
(
"/api/janus/plans/plan_detail"
)
ProjectDetailsItem
getProjectDetails
(
@Query
(
"plan_id"
)
double
plan_id
);
ProjectDetailsItem
getProjectDetails
(
@Query
(
"plan_id"
)
int
plan_id
);
@Get
(
"/api/janus/plans/compare_feed"
)
PlansCompareFeed
getPlansCompareFeed
(
@Query
(
"plan_id"
)
double
plan_id
,
@Query
(
"plan_type"
)
double
plan_type
);
@Query
(
"plan_id"
)
int
plan_id
,
@Query
(
"plan_type"
)
int
plan_type
);
@Get
(
"api/janus/plans/plan_feed"
)
LevelOneFeedList
getLevelOneList
(
@Query
(
"plan_id"
)
int
plan_id
,
...
...
lib/ClueModel/server/api/ClueApi.serv.dart
View file @
61b4a967
...
...
@@ -41,7 +41,7 @@ class ClueApiImpl {
return
_instance
;
}
Stream
<
ProjectDetailsItem
>
getProjectDetails
(
Dio
_dio
,
double
plan_id
)
{
Stream
<
ProjectDetailsItem
>
getProjectDetails
(
Dio
_dio
,
int
plan_id
)
{
return
Stream
.
fromFuture
(
get
(
_dio
,
'/api/janus/plans/plan_detail'
,
data:
{
'plan_id'
:
plan_id
,
})).
flatMap
((
value
)
{
...
...
@@ -56,7 +56,7 @@ class ClueApiImpl {
}
Stream
<
PlansCompareFeed
>
getPlansCompareFeed
(
Dio
_dio
,
double
plan_id
,
double
plan_type
)
{
Dio
_dio
,
int
plan_id
,
int
plan_type
)
{
return
Stream
.
fromFuture
(
get
(
_dio
,
'/api/janus/plans/compare_feed'
,
data:
{
'plan_id'
:
plan_id
,
'plan_type'
:
plan_type
,
...
...
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