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
7fa04e7f
Commit
7fa04e7f
authored
Jul 11, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
w
parent
ddf25116
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
26 deletions
+40
-26
PlanCompareDetailModel.dart
...eModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
+4
-4
PlanCompareDetailPage.dart
...ueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
+16
-2
PlansCompareFeedItemView.dart
...Model/page/PlansCompareFeed/PlansCompareFeedItemView.dart
+13
-19
PlanItem.dart
lib/ClueModel/page/plan/PlanItem.dart
+1
-1
PlanCompareDetail.dart
lib/ClueModel/server/entity/PlanCompareDetail.dart
+6
-0
No files found.
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
View file @
7fa04e7f
...
@@ -26,15 +26,15 @@ class PlanCompareDetailModel extends BaseModel {
...
@@ -26,15 +26,15 @@ class PlanCompareDetailModel extends BaseModel {
.
listen
((
event
)
{
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
if
(
event
.
error
==
0
)
{
stateLive
.
notifyView
(
ENDLOADING
);
stateLive
.
notifyView
(
ENDLOADING
);
if
(
event
.
data
.
plansInfo
!=
null
&&
event
.
data
.
plansInfo
.
length
>
1
)
{
headerLive
.
notifyView
(
event
.
data
.
plansInfo
);
}
if
(
event
.
data
.
groups
==
null
||
event
.
data
.
groups
.
isEmpty
)
{
if
(
event
.
data
.
groups
==
null
||
event
.
data
.
groups
.
isEmpty
)
{
detailLive
.
notifyView
(
Pair
(
EMPTY
,
null
));
detailLive
.
notifyView
(
Pair
(
EMPTY
,
null
));
}
else
{
}
else
{
detailLive
.
notifyView
(
Pair
(
ENDLOADING
,
event
.
data
.
groups
));
detailLive
.
notifyView
(
Pair
(
ENDLOADING
,
event
.
data
.
groups
));
}
}
if
(
event
.
data
.
plansInfo
!=
null
&&
event
.
data
.
plansInfo
.
length
>
1
)
{
headerLive
.
notifyView
(
event
.
data
.
plansInfo
);
}
}
else
{
}
else
{
stateLive
.
notifyView
(
FAIL
);
stateLive
.
notifyView
(
FAIL
);
NativeToast
.
showNativeToast
(
event
.
message
);
NativeToast
.
showNativeToast
(
event
.
message
);
...
...
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
7fa04e7f
...
@@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
...
@@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:gm_flutter/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.dart'
;
import
'package:gm_flutter/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanCompareDetail.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/PlanCompareDetail.dart'
;
import
'package:gm_flutter/ClueModel/util/NumPlanUtil.dart'
;
import
'package:gm_flutter/ClueModel/view/FiveStarView.dart'
;
import
'package:gm_flutter/ClueModel/view/FiveStarView.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
...
@@ -177,6 +178,8 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -177,6 +178,8 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
if
(
data
.
data
==
null
||
data
.
data
.
length
!=
2
)
{
if
(
data
.
data
==
null
||
data
.
data
.
length
!=
2
)
{
return
Container
();
return
Container
();
}
}
var
price
=
NumPlanUtil
.
getPrice
(
data
.
data
[
index
].
min_price
,
data
.
data
[
index
].
max_price
);
return
Container
(
return
Container
(
child:
Stack
(
children:
<
Widget
>[
child:
Stack
(
children:
<
Widget
>[
Positioned
(
Positioned
(
...
@@ -203,8 +206,19 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
...
@@ -203,8 +206,19 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Positioned
(
Positioned
(
left:
12
,
left:
12
,
top:
56
,
top:
56
,
child:
baseText
(
'
${data.data[index].price}
'
,
14
,
Colors
.
red
,
child:
Column
(
bold:
true
),
children:
<
Widget
>[
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
),
),
]));
]));
},
},
...
...
lib/ClueModel/page/PlansCompareFeed/PlansCompareFeedItemView.dart
View file @
7fa04e7f
...
@@ -166,27 +166,21 @@ class _PlansCompareFeedItemViewState
...
@@ -166,27 +166,21 @@ class _PlansCompareFeedItemViewState
bold:
true
),
bold:
true
),
),
),
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
<
Widget
>[
children:
<
Widget
>[
Row
(
price
==
"暂无报价"
mainAxisSize:
MainAxisSize
.
min
,
?
Container
(
crossAxisAlignment:
CrossAxisAlignment
.
end
,
width:
0
,
children:
<
Widget
>[
height:
0
,
price
==
"暂无报价"
)
?
Container
(
:
baseText
(
"¥"
,
12
,
Color
(
0xFFFF5963
)),
width:
0
,
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
height:
0
,
price
==
"暂无报价"
?
Color
(
0xFF666666
)
:
Color
(
0xFFFF5963
),
)
bold:
price
!=
"暂无报价"
),
:
baseText
(
"¥"
,
12
,
Color
(
0xFFFF5963
)),
Expanded
(
baseText
(
child:
Container
(),
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xFF666666
)
:
Color
(
0xFFFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
),
baseText
(
"指导价:
${widget.plan.guidePrice ?? "暂无报价"}
"
,
11
,
Color
(
0xff666666
)),
],
],
),
),
],
],
...
...
lib/ClueModel/page/plan/PlanItem.dart
View file @
7fa04e7f
...
@@ -50,7 +50,7 @@ class PlanItem extends StatelessWidget {
...
@@ -50,7 +50,7 @@ class PlanItem extends StatelessWidget {
return
Container
(
return
Container
(
margin:
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
),
margin:
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
),
child:
Card
(
child:
Card
(
elevation:
1
.0
,
elevation:
3
.0
,
child:
Container
(
child:
Container
(
height:
90
,
height:
90
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
...
...
lib/ClueModel/server/entity/PlanCompareDetail.dart
View file @
7fa04e7f
...
@@ -88,18 +88,24 @@ class PlansInfoDetail {
...
@@ -88,18 +88,24 @@ class PlansInfoDetail {
int
planId
;
int
planId
;
String
planName
;
String
planName
;
String
price
;
String
price
;
String
min_price
;
String
max_price
;
PlansInfoDetail
({
this
.
planId
,
this
.
planName
,
this
.
price
});
PlansInfoDetail
({
this
.
planId
,
this
.
planName
,
this
.
price
});
PlansInfoDetail
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
PlansInfoDetail
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
planId
=
json
[
'plan_id'
];
planId
=
json
[
'plan_id'
];
planName
=
json
[
'plan_name'
];
planName
=
json
[
'plan_name'
];
min_price
=
json
[
'min_price'
];
max_price
=
json
[
'max_price'
];
price
=
json
[
'price'
];
price
=
json
[
'price'
];
}
}
Map
<
String
,
dynamic
>
toJson
()
{
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'plan_id'
]
=
this
.
planId
;
data
[
'plan_id'
]
=
this
.
planId
;
data
[
'min_price'
]
=
this
.
min_price
;
data
[
'max_price'
]
=
this
.
max_price
;
data
[
'plan_name'
]
=
this
.
planName
;
data
[
'plan_name'
]
=
this
.
planName
;
data
[
'price'
]
=
this
.
price
;
data
[
'price'
]
=
this
.
price
;
return
data
;
return
data
;
...
...
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