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
42ecd946
Commit
42ecd946
authored
Jul 03, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zx/gmFlutter' into 'test'
Zx/gm flutter See merge request
!7
parents
677bfbe3
354c33a9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
89 deletions
+132
-89
plan_compare_detail_green_star_all.png
assets/plan_compare_detail_green_star_all.png
+0
-0
plan_compare_detail_green_star_half.png
assets/plan_compare_detail_green_star_half.png
+0
-0
plan_compare_detail_red_star_all.png
assets/plan_compare_detail_red_star_all.png
+0
-0
plan_compare_detail_red_star_half.png
assets/plan_compare_detail_red_star_half.png
+0
-0
PlanCompareDetailModel.dart
...eModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
+0
-1
PlanCompareDetailPage.dart
...ueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
+132
-88
No files found.
assets/plan_compare_detail_green_star_all.png
0 → 100644
View file @
42ecd946
704 Bytes
assets/plan_compare_detail_green_star_half.png
0 → 100644
View file @
42ecd946
727 Bytes
assets/plan_compare_detail_red_star_all.png
0 → 100644
View file @
42ecd946
688 Bytes
assets/plan_compare_detail_red_star_half.png
0 → 100644
View file @
42ecd946
740 Bytes
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
View file @
42ecd946
...
...
@@ -11,7 +11,6 @@ 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
{
...
...
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
42ecd946
...
...
@@ -2,10 +2,8 @@
* @Author: zx
* @Date: 2020-06-30 17:40:43
* @Last Modified by: zx
* @Last Modified time: 2020-07-0
2 18:44:20
* @Last Modified time: 2020-07-0
3 13:47:57
*/
import
'package:cached_network_image/cached_network_image.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
...
...
@@ -91,7 +89,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
if
(
data
.
data
.
first
==
FAIL
)
{
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
()
{
//TODO
_model
.
init
([
1
,
2
]);
});
}
return
ListView
.
builder
(
...
...
@@ -113,9 +111,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Widget
widget
;
if
(
group
.
groupType
==
'hot'
)
{
widget
=
Container
(
height:
100
,
alignment:
Alignment
.
center
,
child:
baseText
(
"第一个"
,
15
,
Colors
.
black
),
child:
planPopularityView
(
group
),
// height: 100,
// alignment: Alignment.center,
// child: baseText("第一个", 15, Colors.black),
);
}
else
if
(
group
.
groupType
==
'normal_attrs'
)
{
widget
=
Container
(
...
...
@@ -164,6 +163,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
if
(
data
.
data
==
null
)
{
return
Container
();
}
PlansInfo
planinfo
=
data
.
data
.
second
[
index
];
return
Container
(
child:
Stack
(
children:
<
Widget
>[
Positioned
(
...
...
@@ -173,7 +173,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
height:
75
,
width:
(
screenWidth
-
30
-
11
)
/
2
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
15
),
borderRadius:
BorderRadius
.
circular
(
7
),
child:
Image
.
asset
(
'assets/plan_compare_detail_info_bg.png'
,
fit:
BoxFit
.
cover
),
),
...
...
@@ -181,12 +181,15 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Positioned
(
left:
12
,
top:
24
,
child:
baseText
(
'11111'
,
15
,
Color
(
0xff333333
),
bold:
true
),
child:
baseText
(
planinfo
.
planName
,
15
,
Color
(
0xff333333
),
bold:
true
),
),
Positioned
(
left:
12
,
top:
48
,
child:
baseText
(
'¥¥¥¥¥¥¥¥¥¥'
,
14
,
Colors
.
red
,
bold:
true
),
child:
baseText
(
'¥'
+
planinfo
.
minPrice
+
'-'
+
planinfo
.
maxPrice
,
14
,
Colors
.
red
,
bold:
true
),
),
]));
},
...
...
@@ -223,104 +226,164 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
);
}
Widget
planPopularityView
(
List
<
PlansInfo
>
planInfo
)
{
Widget
planPopularityView
(
Groups
groups
)
{
return
Container
(
height:
265
,
child:
Container
(
child:
Column
(
children:
<
Widget
>[
titleView
(
'111111'
),
Row
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
planPopularityLeftItem
(
planInfo
[
0
])),
Expanded
(
flex:
1
,
child:
planPopularityRightItem
(
planInfo
[
1
]))
])
])),
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
titleView
(
groups
.
groupName
),
Container
(
child:
planPopularityBodyView
(
groups
)),
Container
()
]),
);
}
Widget
planPopularity
LeftItem
(
PlansInfo
plan
)
{
Widget
planPopularity
BodyView
(
Groups
groups
)
{
return
Container
(
color:
Colors
.
red
,
// height: 80,
child:
Expanded
(
child:
Stack
(
children:
<
Widget
>[
height:
170
,
child:
Row
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
planPopularityLeftItem
(
groups
.
plans
[
0
])),
Expanded
(
flex:
1
,
child:
planPopularityRightItem
(
groups
.
plans
[
1
]))
]));
}
Widget
planPopularityLeftItem
(
Plans
plan
)
{
return
Container
(
height:
170
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
right:
20
,
top:
12
,
child:
baseText
(
'99%'
,
21
,
Color
(
0xffF25874
),
bold:
true
)),
top:
0
,
child:
baseText
(
plan
.
positiveRate
,
21
,
Color
(
0xff3FB5AF
),
bold:
true
)),
Positioned
(
right:
20
,
top:
33
,
// bottom: 12,
top:
24
,
child:
baseText
(
'好评率'
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
Positioned
(
right:
20
,
top:
55
,
// bottom: 12
,
child:
FiveStarView
(
3
,
5
),
top:
46
,
child:
FiveStarView
(
3
,
5
,
starAssets:
'assets/plan_compare_detail_green_star_all.png'
),
),
Positioned
(
right:
20
,
top:
98
,
bottom:
12
,
child:
baseText
(
'13679个'
,
21
,
Color
(
0xffF25874
),
bold:
true
),
top:
84
,
child:
baseText
(
plan
.
salesCount
,
21
,
Color
(
0xff3FB5AF
),
bold:
true
),
),
Positioned
(
right:
20
,
top:
112
,
bottom:
12
,
top:
108
,
child:
baseText
(
'销量'
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
Positioned
(
right:
20
,
top:
132
,
bottom:
12
,
child:
baseText
(
''
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
])));
right:
20
,
bottom:
30
,
child:
Container
(
height:
7
,
width:
95
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
left:
0
,
top:
0
,
width:
95
,
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF7F6FA
),
),
),
),
Positioned
(
right:
0
,
top:
0
,
width:
95
*
0.7
,
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xff3FB5AF
),
),
),
),
]),
)),
]));
}
Widget
planPopularityRightItem
(
Plans
Info
plan
)
{
Widget
planPopularityRightItem
(
Plans
plan
)
{
return
Container
(
color:
Colors
.
red
,
// height: 80,
child:
Expanded
(
child:
Stack
(
children:
<
Widget
>[
height:
170
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
left:
20
,
top:
12
,
child:
baseText
(
'99%'
,
21
,
Color
(
0xffF25874
),
bold:
true
)),
top:
0
,
child:
baseText
(
plan
.
positiveRate
,
21
,
Color
(
0xffF25874
),
bold:
true
)),
Positioned
(
left:
20
,
top:
33
,
// bottom: 12,
top:
24
,
child:
baseText
(
'好评率'
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
Positioned
(
left:
20
,
top:
55
,
// bottom: 12,
child:
FiveStarView
(
3
,
5
),
),
left:
20
,
top:
46
,
child:
Container
(
height:
13
,
width:
81
,
child:
FiveStarView
(
3
,
5
,
starAssets:
'assets/plan_compare_detail_red_star_all.png'
,
),
)),
Positioned
(
left:
20
,
top:
98
,
bottom:
12
,
child:
baseText
(
'13679个'
,
21
,
Color
(
0xffF25874
),
bold:
true
),
top:
84
,
child:
baseText
(
plan
.
salesCount
,
21
,
Color
(
0xffF25874
),
bold:
true
),
),
Positioned
(
left:
20
,
top:
112
,
bottom:
12
,
top:
108
,
child:
baseText
(
'销量'
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
Positioned
(
left:
20
,
top:
132
,
bottom:
12
,
child:
baseText
(
''
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
])));
left:
20
,
bottom:
30
,
child:
Container
(
height:
7
,
width:
95
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
left:
0
,
top:
0
,
width:
95
,
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF7F6FA
),
),
),
),
Positioned
(
left:
0
,
top:
0
,
width:
95
*
0.3
,
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF25874
),
),
),
),
]),
)),
]));
}
Widget
planNormalEffectiveAttrsView
(
Groups
groups
)
{
...
...
@@ -333,26 +396,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
list
// <Widget>[
// Expanded(
// child: Stack(children: <Widget>[
// ,
// Expanded(
// child: Container(
// margin: EdgeInsets.fromLTRB(0, 68, 0, 0),
// child:
// ListView.builder(
// shrinkWrap: true,
// physics: NeverScrollableScrollPhysics(),
// itemBuilder: (c, index) {
// return planBaseAttrsView(groups.plans);
// },
// itemCount: 5,
// )))
// ]))
));
children:
list
));
}
Widget
planBaseAttrsView
(
Plans
plans
)
{
...
...
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