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
43f78c66
Commit
43f78c66
authored
Jul 12, 2020
by
朱翠翠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
http://git.wanmeizhensuo.com/linshengyu/gm_flutter
into zcc/flutter
parents
e4256dff
3d2d9451
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
662 additions
and
501 deletions
+662
-501
PlanCompareDetailModel.dart
...eModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
+4
-6
PlanCompareDetailPage.dart
...ueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
+171
-150
PlansCompareFeedItemView.dart
...Model/page/PlansCompareFeed/PlansCompareFeedItemView.dart
+47
-23
PlansCompareFeedPage.dart
...ClueModel/page/PlansCompareFeed/PlansCompareFeedPage.dart
+37
-41
ProjectDetailsItemView.dart
...ClueModel/page/ProjectDetails/ProjectDetailsItemView.dart
+5
-2
ProjectDetailsPage.dart
lib/ClueModel/page/ProjectDetails/ProjectDetailsPage.dart
+4
-3
LevelOneItem.dart
lib/ClueModel/page/levelOne/LevelOneItem.dart
+43
-26
LevelOneList.dart
lib/ClueModel/page/levelOne/LevelOneList.dart
+13
-1
LevelOnePage.dart
lib/ClueModel/page/levelOne/LevelOnePage.dart
+2
-1
MechanismBoxPage.dart
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
+10
-4
PlanBar.dart
lib/ClueModel/page/plan/PlanBar.dart
+2
-1
PlanItem.dart
lib/ClueModel/page/plan/PlanItem.dart
+33
-20
PlanPage.dart
lib/ClueModel/page/plan/PlanPage.dart
+6
-5
TopList.dart
lib/ClueModel/page/top/TopList.dart
+5
-4
TopPage.dart
lib/ClueModel/page/top/TopPage.dart
+2
-1
PlanBean.dart
lib/ClueModel/server/entity/PlanBean.dart
+1
-1
PlanCompareDetail.dart
lib/ClueModel/server/entity/PlanCompareDetail.dart
+169
-150
NumPlanUtil.dart
lib/ClueModel/util/NumPlanUtil.dart
+17
-0
FiveStarView.dart
lib/ClueModel/view/FiveStarView.dart
+56
-20
MainRouter.dart
lib/MainRouter/MainRouter.dart
+4
-1
MainRouterImpl.dart
lib/MainRouter/MainRouterImpl.dart
+5
-0
MainManager.dart
lib/MainRouter/manager/MainManager.dart
+6
-15
TestPage.dart
lib/MainRouter/page/test/TestPage.dart
+3
-3
BaseComponent.dart
lib/commonModel/base/BaseComponent.dart
+7
-5
DioInterceptor.dart
lib/commonModel/net/DioInterceptor.dart
+1
-1
baseTabIndicator.dart
lib/commonModel/view/baseTabIndicator.dart
+3
-2
pubspec.lock
pubspec.lock
+0
-7
pubspec.yaml
pubspec.yaml
+6
-8
No files found.
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.dart
View file @
43f78c66
...
...
@@ -26,25 +26,23 @@ class PlanCompareDetailModel extends BaseModel {
.
listen
((
event
)
{
if
(
event
.
error
==
0
)
{
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
)
{
detailLive
.
notifyView
(
Pair
(
EMPTY
,
null
));
}
else
{
detailLive
.
notifyView
(
Pair
(
ENDLOADING
,
event
.
data
.
groups
));
}
if
(
event
.
data
.
plansInfo
!=
null
&&
event
.
data
.
plansInfo
.
length
>
1
)
{
headerLive
.
notifyView
(
event
.
data
.
plansInfo
);
}
}
else
{
stateLive
.
notifyView
(
FAIL
);
NativeToast
.
showNativeToast
(
event
.
message
);
detailLive
.
notifyView
(
Pair
(
FAIL
,
null
));
}
})
.
addToDispose
(
rxDispose
)
.
onError
((
err
)
{
stateLive
.
notifyView
(
FAIL
);
detailLive
.
notifyView
(
Pair
(
FAIL
,
null
));
NativeToast
.
showNativeToast
(
err
.
message
);
});
}
...
...
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
43f78c66
...
...
@@ -12,11 +12,13 @@ import 'package:flutter/material.dart';
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:gm_flutter/ClueModel/page/PlanCompareDetail/PlanCompareDetailModel.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/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
import
'package:gm_flutter/commonModel/net/DioUtil.dart'
;
import
'package:gm_flutter/commonModel/util/DartUtil.dart'
;
import
'dart:convert'
;
import
'package:gm_flutter/main.mark.dart'
;
...
...
@@ -99,13 +101,6 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
stream:
_model
.
detailLive
.
stream
,
initialData:
_model
.
detailLive
.
data
??
Pair
(
LOADING
,
null
),
builder:
(
c
,
data
)
{
if
(
data
.
data
.
first
==
FAIL
)
{
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
()
{
_model
.
stateLive
.
notifyView
(
LOADING
);
_model
.
init
(
widget
.
_planIds
);
});
}
if
(
data
.
data
.
first
==
EMPTY
)
{
return
emptyItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
);
...
...
@@ -129,17 +124,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Widget
widget
;
if
(
group
.
groupType
==
'hot'
)
{
widget
=
planPopularityView
(
group
);
// height: 100,
// alignment: Alignment.center,
// child: baseText("第一个", 15, Colors.black),
}
else
if
(
group
.
groupType
==
'normal_attrs'
)
{
widget
=
Container
(
child:
planNormalEffectiveAttrsView
(
group
),
);
widget
=
planNormalEffectiveAttrsView
(
group
);
}
else
if
(
group
.
groupType
==
'effective_attrs'
)
{
widget
=
Container
(
child:
planNormalEffectiveAttrsView
(
group
),
);
widget
=
planNormalEffectiveAttrsView
(
group
);
}
else
{
widget
=
planNormalEffectiveAttrsView
(
group
);
}
...
...
@@ -158,27 +146,40 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Widget
head
()
{
return
Container
(
// key: keyTop,
width:
screenWidth
,
height:
105
,
alignment:
Alignment
.
topLeft
,
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
child:
Row
(
children:
<
Widget
>[
// 根据 flex系数,分配剩余空间
Expanded
(
flex:
1
,
child:
headItem
(
0
)),
Expanded
(
flex:
1
,
child:
headItem
(
1
))
]),
);
decoration:
BoxDecoration
(
boxShadow:
[
BoxShadow
(
color:
Colors
.
black12
,
offset:
Offset
(
0.0
,
2.0
),
blurRadius:
0.5
,
spreadRadius:
0.5
)
],
color:
Colors
.
white
,
),
// key: keyTop,
width:
screenWidth
,
height:
98
,
alignment:
Alignment
.
topLeft
,
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
child:
Row
(
children:
<
Widget
>[
// 根据 flex系数,分配剩余空间
Expanded
(
flex:
1
,
child:
headItem
(
0
)),
Expanded
(
flex:
1
,
child:
headItem
(
1
))
]),
));
}
Widget
headItem
(
int
index
)
{
return
StreamBuilder
<
List
<
PlansInfoDetail
>>(
stream:
_model
.
headerLive
.
stream
,
initialData:
_model
.
headerLive
.
data
??
null
,
initialData:
_model
.
headerLive
.
data
,
builder:
(
c
,
data
)
{
if
(
data
.
data
==
null
||
data
.
data
.
length
!=
2
)
{
return
Container
();
}
var
price
=
NumPlanUtil
.
getPrice
(
data
.
data
[
index
].
min_price
,
data
.
data
[
index
].
max_price
);
return
Container
(
child:
Stack
(
children:
<
Widget
>[
Positioned
(
...
...
@@ -196,20 +197,31 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Positioned
(
left:
12
,
top:
24
,
child:
baseText
(
data
.
data
[
index
].
planName
,
15
,
Color
(
0xff333333
),
bold:
true
),
child:
Container
(
width:
(
screenWidth
-
30
-
11
)
/
2
,
child:
baseText
(
data
.
data
[
index
].
planName
,
15
,
Color
(
0xff333333
),
bold:
true
),
),
),
Positioned
(
left:
12
,
top:
48
,
child:
baseText
(
'¥'
+
data
.
data
[
index
].
minPrice
+
'-'
+
data
.
data
[
index
].
maxPrice
,
14
,
Colors
.
red
,
bold:
true
),
top:
56
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
children:
<
Widget
>[
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
),
]));
},
...
...
@@ -218,9 +230,9 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Widget
titleView
(
String
title
)
{
return
Container
(
height:
7
5
,
height:
2
5
,
width:
screenWidth
,
margin:
EdgeInsets
.
fromLTRB
(
0
,
30
,
0
,
2
0
),
margin:
EdgeInsets
.
fromLTRB
(
0
,
30
,
0
,
2
5
),
alignment:
Alignment
.
center
,
child:
Container
(
width:
90
,
...
...
@@ -260,8 +272,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Widget
planPopularityBodyView
(
Groups
groups
)
{
return
Container
(
height:
170
,
child:
Row
(
children:
<
Widget
>[
child:
Row
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
planPopularityLeftItem
(
groups
.
plans
[
0
],
groups
)),
Expanded
(
...
...
@@ -286,8 +297,12 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Positioned
(
right:
20
,
top:
46
,
child:
FiveStarView
(
3
,
5
,
starAssets:
'assets/plan_compare_detail_green_star_all.png'
),
child:
FiveStarView
(
plan
.
planStart
,
5
,
starAssets:
'assets/plan_compare_detail_green_star_all.png'
,
isForward:
true
,
),
),
Positioned
(
right:
20
,
...
...
@@ -305,33 +320,32 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
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
*
sellCount
(
0
,
groups
.
plans
[
1
]),
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xff3FB5AF
),
),
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF7F6FA
),
),
]
),
),
)),
Positioned
(
right:
20
,
bottom:
30
,
child:
Container
(
width:
95
*
sellCount
(
0
,
plan
,
max
(
int
.
parse
(
groups
.
plans
[
0
].
salesCount
),
int
.
parse
(
groups
.
plans
[
1
].
salesCount
))),
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xff3FB5AF
),
),
),
),
)
]));
}
...
...
@@ -356,7 +370,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
height:
13
,
width:
81
,
child:
FiveStarView
(
3
,
plan
.
planStart
,
5
,
starAssets:
'assets/plan_compare_detail_red_star_all.png'
,
),
...
...
@@ -377,42 +391,48 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
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
*
sellCount
(
1
,
groups
.
plans
[
0
]),
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF25874
),
),
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF7F6FA
),
),
]
),
),
)),
Positioned
(
left:
20
,
bottom:
30
,
child:
Container
(
width:
95
*
sellCount
(
1
,
plan
,
max
(
int
.
parse
(
groups
.
plans
[
0
].
salesCount
),
int
.
parse
(
groups
.
plans
[
1
].
salesCount
))),
height:
7
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
3.5
),
child:
Container
(
color:
Color
(
0xffF25874
),
),
),
),
)
]));
}
Widget
planNormalEffectiveAttrsView
(
Groups
groups
)
{
List
<
Widget
>
list
=
new
List
();
list
.
add
(
titleView
(
groups
.
groupName
));
groups
.
plans
.
forEach
((
element
)
{
list
.
add
(
planBaseAttrsView
(
element
));
});
if
(
groups
.
plans
!=
null
&&
groups
.
plans
.
length
==
2
)
{
for
(
int
i
=
0
;
i
<
max
(
groups
.
plans
[
0
].
attrs
.
length
,
groups
.
plans
[
1
].
attrs
.
length
);
i
++)
{
list
.
add
(
planBaseAttrsView
(
groups
.
plans
[
0
],
groups
.
plans
[
1
],
i
));
}
}
list
.
add
(
Container
(
height:
6
,
));
return
Container
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
...
...
@@ -420,60 +440,61 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
children:
list
));
}
Widget
planBaseAttrsView
(
Plans
plans
)
{
return
Container
(
height:
56
,
child:
Row
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
planBaseAttrsLeftView
(
plans
)),
Expanded
(
flex:
1
,
child:
planBaseAttrsRightView
(
plans
))
]));
}
Widget
planBaseAttrsLeftView
(
Plans
plan
)
{
return
Container
(
height:
56
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
right:
20
,
top:
0
,
child:
baseText
(
plan
.
attrs
[
0
].
attrValue
,
14
,
Color
(
0xff3FB5AF
),
bold:
true
)),
Positioned
(
top:
20
,
right:
20
,
child:
baseText
(
plan
.
attrs
[
0
].
attrName
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
]));
Widget
planBaseAttrsView
(
Plans
plan1
,
Plans
plan2
,
int
index
)
{
return
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
planItem
(
index
>
plan1
.
attrs
.
length
-
1
?
"无"
:
"
${plan1.attrs[index].attrValue}
"
,
index
>
plan2
.
attrs
.
length
-
1
?
"无"
:
"
${plan2.attrs[index].attrValue}
"
,
false
),
Container
(
height:
6
,
),
planItem
(
index
>
plan1
.
attrs
.
length
-
1
?
"无"
:
"
${plan1.attrs[index].attrName}
"
,
index
>
plan2
.
attrs
.
length
-
1
?
"无"
:
"
${plan2.attrs[index].attrName}
"
,
true
),
Container
(
height:
24
,
)
],
);
;
}
Widget
planBaseAttrsRightView
(
Plans
plan
)
{
return
Container
(
height:
56
,
child:
Stack
(
children:
<
Widget
>[
Positioned
(
left:
20
,
top:
0
,
child:
baseText
(
plan
.
attrs
[
0
].
attrValue
,
14
,
Color
(
0xffF25874
),
bold:
true
)),
Positioned
(
left:
20
,
top:
20
,
child:
baseText
(
plan
.
attrs
[
0
].
attrName
,
12
,
Color
(
0xff666666
),
bold:
false
),
),
]));
Widget
planItem
(
String
left
,
String
right
,
bool
isName
)
{
return
Row
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
baseText
(
left
.
empty
()
?
"无"
:
left
,
14
,
isName
?
Color
(
0xff666666
)
:
Color
(
0xff3FB5AF
),
bold:
true
,
maxLines:
100
,
isWarp:
true
,
textAlign:
TextAlign
.
end
),
),
Container
(
width:
40
,
),
Expanded
(
flex:
1
,
child:
baseText
(
right
.
empty
()
?
"无"
:
right
,
14
,
isName
?
Color
(
0xff666666
)
:
Color
(
0xffF25874
),
bold:
true
,
maxLines:
100
,
isWarp:
true
,
textAlign:
TextAlign
.
start
))
]);
}
double
sellCount
(
int
index
,
Plans
anotherPlans
)
{
Groups
popularity
=
_model
.
detailLive
.
data
.
second
[
0
];
Plans
plans
=
popularity
.
plans
[
index
];
int
salesCount
=
int
.
parse
(
plans
.
salesCount
);
int
anSalesCount
=
int
.
parse
(
plans
.
salesCount
);
if
(
salesCount
>=
anSalesCount
)
{
return
1.0
;
}
else
{
return
anSalesCount
/
salesCount
;
}
double
sellCount
(
int
index
,
Plans
anotherPlans
,
int
max
)
{
int
salesCount
=
int
.
parse
(
anotherPlans
.
salesCount
);
return
salesCount
/
max
/
1.0
;
}
}
lib/ClueModel/page/PlansCompareFeed/PlansCompareFeedItemView.dart
View file @
43f78c66
...
...
@@ -48,6 +48,8 @@ class _PlansCompareFeedItemViewState
}
getFirstLevelItem
()
{
String
price
=
NumPlanUtil
.
getPrice
(
widget
.
plan
.
minPrice
,
widget
.
plan
.
maxPrice
);
return
Container
(
width:
double
.
maxFinite
,
height:
80
,
...
...
@@ -109,10 +111,21 @@ class _PlansCompareFeedItemViewState
),
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
children:
<
Widget
>[
baseText
(
'¥
${widget.plan.minPrice}
-
${widget.plan.maxPrice}
'
,
13
,
Color
(
0xFFFF5963
)),
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xFFFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xFF666666
)
:
Color
(
0xFFFF5963
),
bold:
price
!=
"暂无报价"
),
Expanded
(
child:
Container
(),
),
baseText
(
"销量
${widget.plan.salesCount}
"
,
11
,
Color
(
0xFF666666
))
],
...
...
@@ -128,25 +141,23 @@ class _PlansCompareFeedItemViewState
}
getSecondLevelItem
()
{
String
price
=
NumPlanUtil
.
getPrice
(
widget
.
plan
.
minPrice
,
widget
.
plan
.
maxPrice
);
return
Container
(
height:
77
,
child:
Row
(
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
right:
15.0
),
alignment:
Alignment
.
centerLeft
,
child:
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
=>
onClickCheckBox
(
_icon
),
child:
Container
(
alignment:
Alignment
.
center
,
child:
Image
.
asset
(
_icon
,
width:
17
,
height:
17
,
fit:
BoxFit
.
fill
,
))),
),
margin:
EdgeInsets
.
only
(
right:
15.0
),
alignment:
Alignment
.
centerLeft
,
child:
Container
(
alignment:
Alignment
.
center
,
child:
Image
.
asset
(
_icon
,
width:
17
,
height:
17
,
fit:
BoxFit
.
fill
,
))),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -157,12 +168,23 @@ class _PlansCompareFeedItemViewState
bold:
true
),
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
children:
<
Widget
>[
baseText
(
'¥
${widget.plan.minPrice}
-
${widget.plan.maxPrice}
'
,
13
,
Color
(
0xFFFF5963
)),
baseText
(
"指导价:¥
${widget.plan.guidePrice}
"
,
11
,
Color
(
0xFF666666
)),
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xFFFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xFF666666
)
:
Color
(
0xFFFF5963
),
bold:
price
!=
"暂无报价"
),
Expanded
(
child:
Container
(),
),
baseText
(
"指导价:
${widget.plan.guidePrice ?? "暂无报价"}
"
,
11
,
Color
(
0xff666666
)),
],
),
],
...
...
@@ -170,7 +192,9 @@ class _PlansCompareFeedItemViewState
)
],
),
);
).
gestureDetector
(()
{
onClickCheckBox
(
_icon
);
});
}
onClickCheckBox
(
String
icon
)
{
...
...
lib/ClueModel/page/PlansCompareFeed/PlansCompareFeedPage.dart
View file @
43f78c66
...
...
@@ -52,20 +52,20 @@ class _PlansCompareFeedState extends BaseState<PlansCompareFeedPage>
@override
Widget
buildItem
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
baseAppBar
(
title:
"方案对比"
,
centerTitle:
true
,
backClick:
()
{
if
(
RouterCenterImpl
().
findMainRouter
().
isWithNative
()
)
{
FlutterBoost
.
singleton
.
closeCurrent
();
}
else
{
Navigator
.
of
(
context
).
pop
();
}
}),
body:
Center
(
child:
getBody
(),
),
);
backgroundColor:
Colors
.
white
,
appBar:
baseAppBar
(
title:
"方案对比"
,
centerTitle:
true
,
backClick:
(
)
{
if
(
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
FlutterBoost
.
singleton
.
closeCurrent
();
}
else
{
Navigator
.
of
(
context
).
pop
();
}
}),
body:
SafeArea
(
child:
getBody
(
),
)
);
}
getBody
()
{
...
...
@@ -93,36 +93,32 @@ class _PlansCompareFeedState extends BaseState<PlansCompareFeedPage>
}
getList
(
List
<
Plans
>
plans
)
{
return
Stack
(
alignment:
Alignment
.
bottomCenter
,
children:
<
Widget
>[
ListView
.
builder
(
itemCount:
plans
.
length
,
itemBuilder:
(
BuildContext
context
,
int
position
)
{
return
PlansCompareFeedItemView
(
plans
[
position
],
this
,
_setCompare
);
}),
GestureDetector
(
return
Column
(
children:
<
Widget
>[
Expanded
(
child:
ListView
.
builder
(
itemCount:
plans
.
length
,
itemBuilder:
(
BuildContext
context
,
int
position
)
{
return
PlansCompareFeedItemView
(
plans
[
position
],
this
,
_setCompare
);
}),
),
Divider
(
height:
0.5
,
color:
Color
(
0xFFE5E5E5
)),
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
=>
onClickCompare
(),
child:
Container
(
color:
Colors
.
white
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Divider
(
height:
0.5
,
color:
Color
(
0xFFE5E5E5
)),
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
top:
7.5
,
bottom:
7.5
),
width:
double
.
maxFinite
,
height:
40
,
decoration:
BoxDecoration
(
color:
_compareColor
,
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"对比"
,
14
,
Colors
.
white
,
bold:
true
),
)
],
),
))
]);
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
top:
7.5
,
bottom:
7.5
),
width:
double
.
maxFinite
,
height:
40
,
decoration:
BoxDecoration
(
color:
_compareColor
,
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"对比"
,
14
,
Colors
.
white
,
bold:
true
),
),
)
],
);
}
onClickCompare
()
{
...
...
lib/ClueModel/page/ProjectDetails/ProjectDetailsItemView.dart
View file @
43f78c66
...
...
@@ -7,6 +7,7 @@ import 'package:flutter/cupertino.dart';
import
'package:flutter/material.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/ProjectDetailsItem.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/util/DartUtil.dart'
;
class
ProjectDetailsItemView
extends
StatelessWidget
{
Groups
listData
;
...
...
@@ -53,14 +54,16 @@ class ProjectDetailsItemView extends StatelessWidget {
Container
(
margin:
EdgeInsets
.
only
(
right:
25.0
,
left:
15
,
bottom:
25
),
width:
78
,
child:
baseText
(
attrs
.
attrName
,
13
,
Color
(
0xFF999999
),
child:
baseText
(
attrs
.
attrName
.
empty
()
?
"无"
:
attrs
.
attrName
,
13
,
Color
(
0xFF999999
),
textAlign:
TextAlign
.
start
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
)),
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
only
(
right:
15
,
bottom:
25
),
child:
baseText
(
attrs
.
attrValue
,
14
,
Color
(
0xFF282828
),
child:
baseText
(
attrs
.
attrValue
.
empty
()
?
"无"
:
attrs
.
attrValue
,
14
,
Color
(
0xFF282828
),
textAlign:
TextAlign
.
start
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
)),
...
...
lib/ClueModel/page/ProjectDetails/ProjectDetailsPage.dart
View file @
43f78c66
...
...
@@ -48,9 +48,9 @@ class _ProjectDetailsState extends BaseState<ProjectDetailsPage> {
title:
"项目说明"
,
centerTitle:
true
,
backClick:
()
{
if
(
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
if
(
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
FlutterBoost
.
singleton
.
closeCurrent
();
}
else
{
}
else
{
Navigator
.
of
(
context
).
pop
();
}
}),
...
...
@@ -66,7 +66,8 @@ class _ProjectDetailsState extends BaseState<ProjectDetailsPage> {
initialData:
_model
.
liveData
.
data
??
null
,
builder:
(
c
,
data
)
{
if
(
_model
.
liveData
.
data
==
null
)
{
return
loadingItem
();
// return loadingItem();
return
Container
();
}
ProjectDetailsItem
item
=
data
.
data
;
if
(
item
==
null
||
item
.
data
==
null
||
item
.
data
.
groups
==
null
)
{
...
...
lib/ClueModel/page/levelOne/LevelOneItem.dart
View file @
43f78c66
...
...
@@ -6,10 +6,12 @@ import 'package:cached_network_image/cached_network_image.dart';
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart'
;
import
'package:gm_flutter/ClueModel/util/NumPlanUtil.dart'
;
import
'package:gm_flutter/ClueModel/view/FiveStarView.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseUtil.dart'
;
import
'package:gm_flutter/commonModel/util/DartUtil.dart'
;
import
'package:gm_flutter/commonModel/util/NumberUtil.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
class
LevelOneItem
extends
StatelessWidget
{
...
...
@@ -20,6 +22,7 @@ class LevelOneItem extends StatelessWidget {
Function
(
int
planId
)
gotoPlan
;
int
position
;
String
tabName
;
LevelOneItem
(
this
.
cards
,
{
this
.
lowPrice
,
this
.
ask
,
...
...
@@ -64,6 +67,8 @@ class LevelOneItem extends StatelessWidget {
if
(
cards
.
doctor
==
null
&&
isDebug
)
{
throw
new
Exception
();
}
var
price
=
NumPlanUtil
.
getPrice
(
cards
.
doctor
.
minPrice
,
cards
.
doctor
.
maxPrice
);
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
...
...
@@ -104,7 +109,8 @@ class LevelOneItem extends StatelessWidget {
top:
18
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
children:
<
Widget
>[
baseText
(
cards
.
doctor
.
name
,
15
,
Color
(
0xff333333
),
bold:
true
),
...
...
@@ -120,12 +126,19 @@ class LevelOneItem extends StatelessWidget {
top:
42
,
right:
0
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
end
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
"
${cards.doctor.minPrice}
-
${cards.doctor.maxPrice}
"
,
15
,
Color
(
0xffFF5963
)),
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
),
...
...
@@ -183,6 +196,8 @@ class LevelOneItem extends StatelessWidget {
if
(
cards
.
hospital
==
null
&&
isDebug
)
{
throw
new
Exception
();
}
var
price
=
NumPlanUtil
.
getPrice
(
cards
.
hospital
.
minPrice
,
cards
.
hospital
.
maxPrice
);
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
...
...
@@ -209,6 +224,7 @@ class LevelOneItem extends StatelessWidget {
child:
ClipOval
(
child:
CachedNetworkImage
(
imageUrl:
cards
.
hospital
.
portrait
,
fit:
BoxFit
.
cover
,
),
),
),
...
...
@@ -226,15 +242,19 @@ class LevelOneItem extends StatelessWidget {
top:
42.5
,
right:
0
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
end
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
"
${cards.hospital.minPrice}
-
${cards.hospital.maxPrice}
"
,
15
,
Color
(
0xffFF5963
),
bold:
true
),
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
),
...
...
@@ -276,7 +296,11 @@ class LevelOneItem extends StatelessWidget {
Positioned
(
bottom:
63.5
,
left:
57
,
child:
baseText
(
cards
.
hospital
.
address
,
12
,
Color
(
0xff666666
)),
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
-
57
,
child:
baseText
(
cards
.
hospital
.
address
,
12
,
Color
(
0xff666666
)),
),
),
Positioned
(
left:
57
,
...
...
@@ -301,16 +325,8 @@ class LevelOneItem extends StatelessWidget {
if
(
cards
.
plan
==
null
&&
isDebug
)
{
throw
new
Exception
();
}
String
price
;
if
(
cards
.
plan
.
minPrice
.
empty
()
&&
cards
.
plan
.
maxPrice
.
empty
())
{
price
=
"暂无报价"
;
}
else
if
(
cards
.
plan
.
minPrice
.
empty
()
&&
!
cards
.
plan
.
maxPrice
.
empty
())
{
price
=
"
${cards.plan.maxPrice}
"
;
}
else
if
(!
cards
.
plan
.
minPrice
.
empty
()
&&
cards
.
plan
.
maxPrice
.
empty
())
{
price
=
"
${cards.plan.minPrice}
"
;
}
else
{
price
=
"
${cards.plan.minPrice}
-
${cards.plan.maxPrice}
"
;
}
String
price
=
NumPlanUtil
.
getPrice
(
cards
.
plan
.
minPrice
,
cards
.
plan
.
maxPrice
);
return
Container
(
height:
118
,
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
...
...
@@ -330,7 +346,8 @@ class LevelOneItem extends StatelessWidget {
top:
15
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
children:
<
Widget
>[
price
==
"暂无报价"
?
Container
(
...
...
@@ -358,8 +375,8 @@ class LevelOneItem extends StatelessWidget {
Positioned
(
top:
40
,
right:
0
,
child:
baseText
(
"指导价:
${cards.plan.guide_price}
"
,
11
,
Color
(
0xff666666
)),
child:
baseText
(
"指导价:
${cards.plan.guide_price ?? "暂无报价"}
"
,
11
,
Color
(
0xff666666
)),
),
Positioned
(
left:
0
,
...
...
lib/ClueModel/page/levelOne/LevelOneList.dart
View file @
43f78c66
...
...
@@ -150,6 +150,18 @@ class LevelOneListState extends State<LevelOneList>
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
context
,
data2
.
hospital
.
messageUrl
,
null
,
true
);
}
else
if
(
data2
.
cardType
==
"plan"
)
{
if
(
CacheManager
.
getInstance
()
.
get
(
MEMORY_CACHE
)
.
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
()
.
findMainRouter
()
.
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
buried_on_click_button
(
index
,
"consult"
,
"level_two_plan"
,
"
${data2.plan.plan_id}
"
);
BaseBottomPicker
()
...
...
@@ -180,7 +192,7 @@ class LevelOneListState extends State<LevelOneList>
widget
.
index
==
0
?
"level_one_plan_compare"
:
"level_two_plan_compare"
,
{
"planId"
:
planId
,
"planType"
:
2
}
,
map
,
false
);
},
tabName:
_model
.
tab_type
,
...
...
lib/ClueModel/page/levelOne/LevelOnePage.dart
View file @
43f78c66
...
...
@@ -314,7 +314,8 @@ class LevelOneState extends BaseState<LevelOnePage>
top:
6
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
children:
<
Widget
>[
baseText
(
"好评率"
,
11
,
Color
(
0xff282828
)),
Container
(
...
...
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
View file @
43f78c66
...
...
@@ -173,8 +173,11 @@ class MechanismBox implements IBottomPicker {
// 机构列表
Widget
mechanismList
(
mq
,
keyHeight
)
{
Hospital
firstHospital
=
_levelModel
.
cardsLive
.
data
[
0
].
hospital
;
firstHospital
.
isCheck
=
true
;
doctor_ids
.
add
(
firstHospital
.
doctorId
);
return
Container
(
height:
mq
.
size
.
height
-
140
-
96
-
50
-
keyHeight
,
height:
mq
.
size
.
height
-
286
-
keyHeight
,
width:
mq
.
size
.
width
,
padding:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
child:
baseRefreshView
(
refreshController
,
()
{},
null
,
null
,
...
...
@@ -201,7 +204,7 @@ class MechanismBox implements IBottomPicker {
}
if
(
_levelModel
.
data
[
index
].
cardType
==
'hospital'
)
{
return
HospitalItem
(
_levelModel
.
data
[
index
].
hospital
);
_levelModel
.
data
[
index
].
hospital
,
index
);
}
else
{
return
Container
();
}
...
...
@@ -218,11 +221,11 @@ class MechanismBox implements IBottomPicker {
}
// 机构卡片
Widget
HospitalItem
(
Hospital
hospital
)
{
Widget
HospitalItem
(
Hospital
hospital
,
index
)
{
return
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
doctor_ids
.
indexOf
(
hospital
.
doctorId
)
!=
-
1
)
{
if
(
doctor_ids
.
contains
(
hospital
.
doctorId
)
)
{
doctor_ids
.
remove
(
hospital
.
doctorId
);
}
else
{
doctor_ids
.
add
(
hospital
.
doctorId
);
...
...
@@ -230,6 +233,9 @@ class MechanismBox implements IBottomPicker {
hospital
.
isCheck
=
!
hospital
.
isCheck
;
focusNode
.
unfocus
();
_levelModel
.
cardsLive
.
notifyView
(
_levelModel
.
cardsLive
.
data
);
if
(
doctor_ids
.
length
>
3
||
doctor_ids
.
length
==
0
)
{
NativeToast
.
showNativeToast
(
'请选择1-3个机构咨询'
);
}
},
child:
Container
(
height:
91.5
,
...
...
lib/ClueModel/page/plan/PlanBar.dart
View file @
43f78c66
...
...
@@ -68,12 +68,13 @@ class PlanBarView extends StatelessWidget {
alignment:
Alignment
.
center
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
children:
<
Widget
>[
baseText
(
text
,
14
,
index
==
showIndex
?
Color
(
0xff3FB5AF
)
:
Color
(
0xff666666
)),
Container
(
width:
10
,
height:
1
0
,
height:
1
3
,
padding:
EdgeInsets
.
only
(
top:
3
),
alignment:
Alignment
.
topCenter
,
child:
Container
(
...
...
lib/ClueModel/page/plan/PlanItem.dart
View file @
43f78c66
...
...
@@ -15,8 +15,9 @@ class PlanItem extends StatelessWidget {
final
Plans
plans
;
final
int
pos
;
final
bool
isPlanPage
;
String
tabName
;
PlanItem
(
this
.
plans
,
this
.
pos
,
this
.
isPlanPage
);
PlanItem
(
this
.
plans
,
this
.
pos
,
this
.
isPlanPage
,
this
.
tabName
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -27,8 +28,8 @@ class PlanItem extends StatelessWidget {
if
(
i
!=
plans
.
baseAttrs
.
length
-
1
)
{
list
.
add
(
Container
(
width:
8.5
,
height:
8
,
alignment:
Alignment
.
c
enter
,
height:
10
,
alignment:
Alignment
.
topC
enter
,
child:
Container
(
width:
0.5
,
height:
8
,
...
...
@@ -46,10 +47,11 @@ class PlanItem extends StatelessWidget {
rate
=
rate
.
split
(
"."
)[
0
];
}
rate
=
rate
.
replaceAll
(
"%"
,
""
);
var
price
=
NumPlanUtil
.
getPrice
(
plans
.
minPrice
,
plans
.
maxPrice
);
return
Container
(
margin:
EdgeInsets
.
only
(
top:
10
,
left:
10
,
right:
10
),
child:
Card
(
elevation:
1
.0
,
elevation:
3
.0
,
child:
Container
(
height:
90
,
decoration:
BoxDecoration
(
...
...
@@ -79,7 +81,7 @@ class PlanItem extends StatelessWidget {
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Container
(
constraints:
BoxConstraints
(
maxWidth:
110
),
constraints:
BoxConstraints
(
maxWidth:
95
),
child:
baseText
(
plans
.
name
,
14
,
Color
(
0xff282828
),
bold:
true
),
),
...
...
@@ -110,9 +112,9 @@ class PlanItem extends StatelessWidget {
top:
15
,
right:
10
,
child:
Row
(
textBaseline:
TextBaseline
.
alphabetic
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
mainAxisSize:
MainAxisSize
.
min
,
// crossAxisAlignment: CrossAxisAlignment.end,
verticalDirection:
VerticalDirection
.
down
,
children:
<
Widget
>[
baseText
(
"好评率"
,
11
,
Color
(
0xff282828
)),
Container
(
...
...
@@ -124,7 +126,7 @@ class PlanItem extends StatelessWidget {
),
),
Positioned
(
bottom:
1
4
,
bottom:
1
6
,
right:
10
,
child:
baseText
(
"销量
${plans.salesCount}
"
,
11
,
Color
(
0xff282828
)),
...
...
@@ -133,13 +135,23 @@ class PlanItem extends StatelessWidget {
left:
91
,
bottom:
14
,
child:
Row
(
verticalDirection:
VerticalDirection
.
down
,
textBaseline:
TextBaseline
.
alphabetic
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
baseText
(
"¥"
,
10
,
Color
(
0xffFF5963
)),
baseText
(
"
${plans.minPrice}
-
${plans.maxPrice}
"
,
13
,
Color
(
0xffFF5963
),
bold:
true
),
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
),
...
...
@@ -148,7 +160,7 @@ class PlanItem extends StatelessWidget {
top:
36
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
end
,
children:
list
,
),
)
...
...
@@ -156,24 +168,25 @@ class PlanItem extends StatelessWidget {
),
),
).
gestureDetector
(()
{
Map
<
String
,
dynamic
>
map
;
map
=
{
"tab_name"
:
isPlanPage
?
"plan_home"
:
""
,
Map
<
String
,
dynamic
>
buriedMap
=
{
"tab_name"
:
tabName
,
"position"
:
pos
,
"card_id"
:
plans
.
id
,
"card_type"
:
"card"
,
"transaction_type"
:
""
,
"card_content_type"
:
"level_one_plan"
};
RouterCenterImpl
().
findMainRouter
().
buriedEvent
(
"on_click_card"
,
map
);
Map
<
String
,
dynamic
>
buriedMap
=
{
RouterCenterImpl
()
.
findMainRouter
()
.
buriedEvent
(
"on_click_card"
,
buriedMap
);
Map
<
String
,
dynamic
>
map
=
{
"business_id"
:
"
${plans.id}
"
,
"planId"
:
plans
.
id
,
"title"
:
"
${plans.name}
"
};
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_one_plan_detail"
,
buriedM
ap
,
false
);
.
jumpPage
(
context
,
"level_one_plan_detail"
,
m
ap
,
false
);
}));
}
}
lib/ClueModel/page/plan/PlanPage.dart
View file @
43f78c66
...
...
@@ -64,7 +64,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override
void
initState
()
{
print
(
"LSY PLAN INIT "
);
DioUtil
.
getInstance
().
setProxy
(
"172.30.9.128"
);
//
DioUtil.getInstance().setProxy("172.30.9.128");
_model
.
init
(
needCache:
true
);
super
.
initState
();
planBarView
=
...
...
@@ -404,7 +404,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
}
else
{
refreshController
.
loadComplete
();
}
return
PlanItem
(
_model
.
feedDatas
[
index
],
index
,
true
);
return
PlanItem
(
_model
.
feedDatas
[
index
],
index
,
true
,
""
);
},
childCount:
_model
.
feedDatas
.
length
,
),
...
...
@@ -424,7 +425,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
Widget
towPic
()
{
return
Container
(
height:
90
,
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
top:
15
,
bottom:
0
),
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
top:
0
,
bottom:
0
),
child:
Row
(
children:
<
Widget
>[
Expanded
(
...
...
@@ -497,9 +498,9 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
boxShadow:
[
BoxShadow
(
color:
Colors
.
black12
,
offset:
Offset
(
0.0
,
2.0
),
blurRadius:
0.5
,
spreadRadius:
0.5
)
spreadRadius:
0.5
)
],
color:
Colors
.
white
,
),
...
...
lib/ClueModel/page/top/TopList.dart
View file @
43f78c66
...
...
@@ -16,8 +16,8 @@ class TopList extends StatefulWidget {
final
int
id
;
double
topHeight
;
final
String
rankId
;
TopList
(
this
.
rankId
,
this
.
id
,
this
.
topHeight
);
String
tabName
;
TopList
(
this
.
rankId
,
this
.
id
,
this
.
topHeight
,
this
.
tabName
);
@override
State
<
StatefulWidget
>
createState
()
=>
TopListState
();
...
...
@@ -88,7 +88,8 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
itemExtent:
100
,
delegate:
SliverChildBuilderDelegate
(
(
BuildContext
context
,
int
index
)
{
return
PlanItem
(
_model
.
datas
[
index
],
index
,
false
);
return
PlanItem
(
_model
.
datas
[
index
],
index
,
false
,
widget
.
tabName
);
},
childCount:
_model
.
datas
.
length
,
),
...
...
@@ -112,7 +113,7 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
],
),
onLoading:
()
{
_model
.
loadMore
();
},
pullDown:
false
,
pullUp:
true
,
loadMoreColor:
Color
(
0xffF7F6FA
));
},
pullDown:
false
,
pullUp:
true
,
loadMoreColor:
Color
(
0xffF7F6FA
));
}
@override
...
...
lib/ClueModel/page/top/TopPage.dart
View file @
43f78c66
...
...
@@ -160,7 +160,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
for
(
int
i
=
0
;
i
<
_model
.
tabs
.
length
;
i
++)
{
list
.
add
(
extend
.
NestedScrollViewInnerScrollPositionKeyWidget
(
Key
(
"Tab
${i}
"
),
TopList
(
widget
.
id
,
_model
.
tabs
[
i
].
id
,
kToolbarHeight
+
d
)));
TopList
(
widget
.
id
,
_model
.
tabs
[
i
].
id
,
kToolbarHeight
+
d
,
_model
.
tabs
[
i
].
name
)));
}
return
extend
.
NestedScrollView
(
innerScrollPositionKeyBuilder:
()
{
...
...
lib/ClueModel/server/entity/PlanBean.dart
View file @
43f78c66
...
...
@@ -6,7 +6,7 @@ class PlanBean {
int
error
;
String
message
;
Map
extra
;
Map
errorCode
;
int
errorCode
;
Map
errorExtra
;
Data
data
;
UserType
userType
;
...
...
lib/ClueModel/server/entity/PlanCompareDetail.dart
View file @
43f78c66
...
...
@@ -5,184 +5,203 @@
* @Last Modified time: 2020-07-01 20:31:42
*/
class
PlanCompareDetail
{
int
error
;
String
message
;
Map
extra
;
Map
errorExtra
;
UserType
userType
;
Data
data
;
PlanCompareDetail
({
this
.
error
,
this
.
message
,
this
.
extra
,
this
.
errorExtra
,
this
.
userType
,
this
.
data
});
PlanCompareDetail
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
error
=
json
[
'error'
];
message
=
json
[
'message'
];
extra
=
json
[
'extra'
];
errorExtra
=
json
[
'error_extra'
];
userType
=
json
[
'user_type'
]
!=
null
?
new
UserType
.
fromJson
(
json
[
'user_type'
])
:
null
;
data
=
json
[
'data'
]
!=
null
?
new
Data
.
fromJson
(
json
[
'data'
])
:
null
;
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'error_extra'
]
=
this
.
errorExtra
;
if
(
this
.
userType
!=
null
)
{
data
[
'user_type'
]
=
this
.
userType
.
toJson
();
}
if
(
this
.
data
!=
null
)
{
int
error
;
String
message
;
Map
extra
;
int
errorCode
;
Map
errorExtra
;
Data
data
;
UserType
userType
;
PlanCompareDetail
(
{
this
.
error
,
this
.
message
,
this
.
extra
,
this
.
errorCode
,
this
.
errorExtra
,
this
.
data
,
this
.
userType
});
PlanCompareDetail
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
error
=
json
[
'error'
];
message
=
json
[
'message'
];
extra
=
json
[
'extra'
];
errorCode
=
json
[
'error_code'
];
errorExtra
=
json
[
'error_extra'
];
data
=
json
[
'data'
]
!=
null
?
new
Data
.
fromJson
(
json
[
'data'
])
:
null
;
userType
=
json
[
'user_type'
]
!=
null
?
new
UserType
.
fromJson
(
json
[
'user_type'
])
:
null
;
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
data
[
'extra'
]
=
this
.
extra
;
data
[
'error_code'
]
=
this
.
errorCode
;
data
[
'error_extra'
]
=
this
.
errorExtra
;
if
(
this
.
data
!=
null
)
{
data
[
'data'
]
=
this
.
data
.
toJson
();
}
return
data
;
}
if
(
this
.
userType
!=
null
)
{
data
[
'user_type'
]
=
this
.
userType
.
toJson
();
}
return
data
;
}
}
class
UserType
{
UserType
();
class
Data
{
List
<
PlansInfoDetail
>
plansInfo
;
List
<
Groups
>
groups
;
UserType
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
}
Data
({
this
.
plansInfo
,
this
.
groups
});
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
return
data
;
}
}
Data
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'plans_info'
]
!=
null
)
{
plansInfo
=
new
List
<
PlansInfoDetail
>();
json
[
'plans_info'
].
forEach
((
v
)
{
plansInfo
.
add
(
new
PlansInfoDetail
.
fromJson
(
v
));
});
}
if
(
json
[
'groups'
]
!=
null
)
{
groups
=
new
List
<
Groups
>();
json
[
'groups'
].
forEach
((
v
)
{
groups
.
add
(
new
Groups
.
fromJson
(
v
));
});
}
}
class
Data
{
List
<
PlansInfoDetail
>
plansInfo
;
List
<
Groups
>
groups
;
Data
({
this
.
plansInfo
,
this
.
groups
});
Data
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'plans_info'
]
!=
null
)
{
plansInfo
=
new
List
<
PlansInfoDetail
>();
json
[
'plans_info'
].
forEach
((
v
)
{
plansInfo
.
add
(
new
PlansInfoDetail
.
fromJson
(
v
));
});
}
if
(
json
[
'groups'
]
!=
null
)
{
groups
=
new
List
<
Groups
>();
json
[
'groups'
].
forEach
((
v
)
{
groups
.
add
(
new
Groups
.
fromJson
(
v
));
});
}
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
plansInfo
!=
null
)
{
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
plansInfo
!=
null
)
{
data
[
'plans_info'
]
=
this
.
plansInfo
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
if
(
this
.
groups
!=
null
)
{
if
(
this
.
groups
!=
null
)
{
data
[
'groups'
]
=
this
.
groups
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
return
data
;
}
return
data
;
}
}
class
PlansInfoDetail
{
int
planId
;
String
planName
;
String
minPrice
;
String
maxPrice
;
PlansInfoDetail
({
this
.
planId
,
this
.
planName
,
this
.
minPrice
,
this
.
maxPrice
});
PlansInfoDetail
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
planId
=
json
[
'plan_id'
];
planName
=
json
[
'plan_name'
];
minPrice
=
json
[
'min_price'
];
maxPrice
=
json
[
'max_price'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'plan_id'
]
=
this
.
planId
;
data
[
'plan_name'
]
=
this
.
planName
;
data
[
'min_price'
]
=
this
.
minPrice
;
data
[
'max_price'
]
=
this
.
maxPrice
;
return
data
;
}
int
planId
;
String
planName
;
String
price
;
String
min_price
;
String
max_price
;
PlansInfoDetail
({
this
.
planId
,
this
.
planName
,
this
.
price
});
PlansInfoDetail
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
planId
=
json
[
'plan_id'
];
planName
=
json
[
'plan_name'
];
min_price
=
json
[
'min_price'
];
max_price
=
json
[
'max_price'
];
price
=
json
[
'price'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'plan_id'
]
=
this
.
planId
;
data
[
'min_price'
]
=
this
.
min_price
;
data
[
'max_price'
]
=
this
.
max_price
;
data
[
'plan_name'
]
=
this
.
planName
;
data
[
'price'
]
=
this
.
price
;
return
data
;
}
}
class
Groups
{
String
groupType
;
String
groupName
;
List
<
Plans
>
plans
;
Groups
({
this
.
groupType
,
this
.
groupName
,
this
.
plans
});
Groups
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
groupType
=
json
[
'group_type'
];
groupName
=
json
[
'group_name'
];
if
(
json
[
'plans'
]
!=
null
)
{
plans
=
new
List
<
Plans
>();
json
[
'plans'
].
forEach
((
v
)
{
plans
.
add
(
new
Plans
.
fromJson
(
v
));
});
}
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'group_type'
]
=
this
.
groupType
;
data
[
'group_name'
]
=
this
.
groupName
;
if
(
this
.
plans
!=
null
)
{
String
groupType
;
String
groupName
;
List
<
Plans
>
plans
;
Groups
({
this
.
groupType
,
this
.
groupName
,
this
.
plans
});
Groups
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
groupType
=
json
[
'group_type'
];
groupName
=
json
[
'group_name'
];
if
(
json
[
'plans'
]
!=
null
)
{
plans
=
new
List
<
Plans
>();
json
[
'plans'
].
forEach
((
v
)
{
plans
.
add
(
new
Plans
.
fromJson
(
v
));
});
}
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'group_type'
]
=
this
.
groupType
;
data
[
'group_name'
]
=
this
.
groupName
;
if
(
this
.
plans
!=
null
)
{
data
[
'plans'
]
=
this
.
plans
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
return
data
;
}
return
data
;
}
}
class
Plans
{
int
planId
;
String
positiveRate
;
String
salesCount
;
List
<
Attrs
>
attrs
;
Plans
({
this
.
planId
,
this
.
positiveRate
,
this
.
salesCount
,
this
.
attrs
});
Plans
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
planId
=
json
[
'plan_id'
];
positiveRate
=
json
[
'positive_rate'
];
salesCount
=
json
[
'sales_count'
];
if
(
json
[
'attrs'
]
!=
null
)
{
attrs
=
new
List
<
Attrs
>();
json
[
'attrs'
].
forEach
((
v
)
{
attrs
.
add
(
new
Attrs
.
fromJson
(
v
));
});
}
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'plan_id'
]
=
this
.
planId
;
data
[
'positive_rate'
]
=
this
.
positiveRate
;
data
[
'sales_count'
]
=
this
.
salesCount
;
if
(
this
.
attrs
!=
null
)
{
int
planId
;
List
<
Attrs
>
attrs
;
String
positiveRate
;
String
salesCount
;
int
planStart
;
Plans
({
this
.
planId
,
this
.
attrs
});
Plans
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
planId
=
json
[
'plan_id'
];
positiveRate
=
json
[
'positive_rate'
];
salesCount
=
json
[
'sales_count'
];
planStart
=
json
[
'plan_start'
];
if
(
json
[
'attrs'
]
!=
null
)
{
attrs
=
new
List
<
Attrs
>();
json
[
'attrs'
].
forEach
((
v
)
{
attrs
.
add
(
new
Attrs
.
fromJson
(
v
));
});
}
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'plan_id'
]
=
this
.
planId
;
data
[
'positive_rate'
]
=
this
.
positiveRate
;
data
[
'sales_count'
]
=
this
.
salesCount
;
data
[
'plan_start'
]
=
this
.
planStart
;
if
(
this
.
attrs
!=
null
)
{
data
[
'attrs'
]
=
this
.
attrs
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
return
data
;
}
return
data
;
}
}
class
Attrs
{
String
attrName
;
String
attrValue
;
Attrs
({
this
.
attrName
,
this
.
attrValue
});
Attrs
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
attrName
=
json
[
'attr_name'
];
attrValue
=
json
[
'attr_value'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'attr_name'
]
=
this
.
attrName
;
data
[
'attr_value'
]
=
this
.
attrValue
;
return
data
;
}
String
attrName
;
String
attrValue
;
Attrs
({
this
.
attrName
,
this
.
attrValue
});
Attrs
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
attrName
=
json
[
'attr_name'
];
attrValue
=
json
[
'attr_value'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'attr_name'
]
=
this
.
attrName
;
data
[
'attr_value'
]
=
this
.
attrValue
;
return
data
;
}
}
class
UserType
{
UserType
();
UserType
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
return
data
;
}
}
lib/ClueModel/util/NumPlanUtil.dart
View file @
43f78c66
...
...
@@ -3,6 +3,7 @@
* @date 2020/7/10
**/
import
'package:common_utils/common_utils.dart'
;
import
'package:gm_flutter/commonModel/util/DartUtil.dart'
;
class
NumPlanUtil
{
static
String
getSale
(
String
sale
)
{
...
...
@@ -24,4 +25,20 @@ class NumPlanUtil {
static
formatNum
(
double
num
,
int
postion
)
{
return
(
NumUtil
.
getNumByValueDouble
(
num
,
postion
)).
toStringAsFixed
(
postion
);
}
static
String
getPrice
(
String
min
,
String
max
)
{
String
price
;
if
(
min
.
empty
()
&&
max
.
empty
())
{
price
=
"暂无报价"
;
}
else
if
(
min
.
empty
()
&&
!
max
.
empty
())
{
price
=
"
${max}
"
;
}
else
if
(!
min
.
empty
()
&&
max
.
empty
())
{
price
=
"
${min}
"
;
}
else
if
(
min
==
max
)
{
price
=
"
${max}
"
;
}
else
{
price
=
"
${min}
-
${max}
"
;
}
return
price
;
}
}
lib/ClueModel/view/FiveStarView.dart
View file @
43f78c66
...
...
@@ -8,36 +8,72 @@ class FiveStarView extends StatelessWidget {
final
int
allStarCount
;
final
int
lightStarCount
;
String
starAssets
;
bool
isForward
=
false
;
FiveStarView
(
this
.
lightStarCount
,
this
.
allStarCount
,
{
this
.
starAssets
});
FiveStarView
(
this
.
lightStarCount
,
this
.
allStarCount
,
{
this
.
starAssets
,
this
.
isForward
})
{
if
(
isForward
==
null
)
{
isForward
=
false
;
}
}
@override
Widget
build
(
BuildContext
context
)
{
List
<
Widget
>
list
=
new
List
();
for
(
int
i
=
0
;
i
<
allStarCount
;
i
++)
{
if
(
i
<=
lightStarCount
)
{
list
.
add
(
Container
(
height:
13
,
width:
13
,
child:
Image
.
asset
(
starAssets
??
"assets/sel_star.png"
),
));
if
(
i
!=
allStarCount
-
1
)
{
if
(
isForward
)
{
for
(
int
i
=
0
;
i
<
allStarCount
;
i
++)
{
if
(
i
>=
allStarCount
-
lightStarCount
)
{
list
.
add
(
Container
(
height:
13
,
width:
13
,
child:
Image
.
asset
(
starAssets
??
"assets/sel_star.png"
),
));
if
(
i
!=
allStarCount
-
1
)
{
list
.
add
(
Container
(
height:
1
,
width:
2
,
));
}
}
else
{
list
.
add
(
Container
(
height:
1
,
width:
2
,
height:
13
,
width:
13
,
child:
Image
.
asset
(
"assets/normal_star.png"
),
));
if
(
i
!=
allStarCount
-
1
)
{
list
.
add
(
Container
(
height:
1
,
width:
2
,
));
}
}
}
else
{
list
.
add
(
Container
(
height:
13
,
width:
13
,
child:
Image
.
asset
(
"assets/normal_star.png"
),
));
if
(
i
!=
allStarCount
-
1
)
{
}
}
else
{
for
(
int
i
=
0
;
i
<
allStarCount
;
i
++)
{
if
(
i
<
lightStarCount
)
{
list
.
add
(
Container
(
height:
13
,
width:
13
,
child:
Image
.
asset
(
starAssets
??
"assets/sel_star.png"
),
));
if
(
i
!=
allStarCount
-
1
)
{
list
.
add
(
Container
(
height:
1
,
width:
2
,
));
}
}
else
{
list
.
add
(
Container
(
height:
1
,
width:
2
,
height:
13
,
width:
13
,
child:
Image
.
asset
(
"assets/normal_star.png"
),
));
if
(
i
!=
allStarCount
-
1
)
{
list
.
add
(
Container
(
height:
1
,
width:
2
,
));
}
}
}
}
...
...
lib/MainRouter/MainRouter.dart
View file @
43f78c66
...
...
@@ -15,11 +15,14 @@ abstract class MainRouter extends RouterBaser {
void
buriedEvent
(
String
name
,
Map
<
String
,
dynamic
>
map
);
void
jumpPage
(
BuildContext
context
,
String
pageName
,
Map
<
String
,
dynamic
>
params
,
bool
nativePage
);
void
jumpPage
(
BuildContext
context
,
String
pageName
,
Map
<
String
,
dynamic
>
params
,
bool
nativePage
);
Widget
getProxyPage
();
void
catchErrorToBugly
(
String
err
);
bool
isWithNative
();
void
jumpToSetting
();
}
lib/MainRouter/MainRouterImpl.dart
View file @
43f78c66
...
...
@@ -47,4 +47,9 @@ class MainRouterImpl implements MainRouter {
bool
isWithNative
()
{
return
MainManager
.
getInstance
().
isInit
;
}
@override
void
jumpToSetting
()
{
MainManager
.
getInstance
().
jumpToSetting
();
}
}
lib/MainRouter/manager/MainManager.dart
View file @
43f78c66
...
...
@@ -118,21 +118,12 @@ class MainManager {
}
}
void
getInitParams
(
VoidCallback
callback
)
{
if
(
isInit
)
{
if
(
flutterChannel
!=
null
)
{
flutterChannel
.
invokeMethod
(
"get_common_params"
).
then
((
data
)
{
if
(
data
is
Map
)
{
var
map
=
Map
<
String
,
dynamic
>.
from
(
data
);
initParams
(
map
,
callback:
callback
);
}
}).
whenComplete
(()
{
// callback();
});
return
;
}
void
jumpToSetting
()
{
if
(!
isInit
)
{
return
;
}
if
(
flutterChannel
!=
null
)
{
flutterChannel
.
invokeMethod
(
"check_system_settings"
,
""
);
}
callback
();
}
}
lib/MainRouter/page/test/TestPage.dart
View file @
43f78c66
...
...
@@ -30,12 +30,12 @@ class TestState extends BaseState<TestPage> {
list
.
add
(
listItem
(
"一级列表页"
,
()
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_one_plan_detail"
,
{
"planId"
:
13
7
},
false
);
.
jumpPage
(
context
,
"level_one_plan_detail"
,
{
"planId"
:
64
7
},
false
);
}));
list
.
add
(
listItem
(
"二级列表页"
,
()
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_two_plan_deatil"
,
{
"planId"
:
192
},
false
);
.
jumpPage
(
context
,
"level_two_plan_deatil"
,
{
"planId"
:
696
},
false
);
}));
list
.
add
(
listItem
(
"项目首页"
,
()
{
RouterCenterImpl
()
...
...
@@ -77,7 +77,7 @@ class TestState extends BaseState<TestPage> {
@override
Widget
buildItem
(
BuildContext
context
)
{
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
save
(
COOKIE
,
"_g
m_token=1da6071594101423; csrftoken=rUrkkYYMOVZfIIQnU2IH09QIGmsfe8tE; sessionid=uz7f70uap76r6og48znci5l2hbr9vm5c; _gtid=5af9a5deba8511ea8d4082a085c393c93393
"
);
"_g
tid=c14659b0c25b11ea80d77a872bf3b5437841;sessionid=0r8emll1qcqay0vz44hhgf4j1014vgxq;_gm_token=ba7e621594369445;
"
);
return
Scaffold
(
appBar:
baseAppBar
(
title:
"测试页面"
,
...
...
lib/commonModel/base/BaseComponent.dart
View file @
43f78c66
...
...
@@ -3,7 +3,6 @@
* @date 2019-10-13
**/
import
'package:app_settings/app_settings.dart'
;
import
'package:cached_network_image/cached_network_image.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
...
...
@@ -11,6 +10,7 @@ import 'package:flutter_common/commonModel/live/LiveData.dart';
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
import
'package:gm_flutter/commonModel/util/DartUtil.dart'
;
import
'package:gm_flutter/commonModel/view/baseTabIndicator.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'package:lottie/lottie.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
...
...
@@ -84,11 +84,13 @@ Text baseText(String text, double fontSize, Color color,
{
bool
bold
=
false
,
TextAlign
textAlign
,
int
maxLines
=
1
,
TextOverflow
overflow
})
{
TextOverflow
overflow
,
bool
isWarp
=
false
})
{
return
Text
(
text
,
textAlign:
textAlign
??
TextAlign
.
start
,
textScaleFactor:
1.0
,
softWrap:
isWarp
,
style:
TextStyle
(
decoration:
TextDecoration
.
none
,
fontSize:
fontSize
,
...
...
@@ -209,7 +211,7 @@ Widget errorItem(double width, double height, VoidCallback retry,
alignment:
Alignment
.
center
,
child:
baseText
(
"检查网络设置"
,
16
,
Color
(
0xffFF5963
)),
).
gestureDetector
(()
{
AppSettings
.
openWIFISettings
();
RouterCenterImpl
().
findMainRouter
().
jumpToSetting
();
}),
],
)));
...
...
@@ -432,9 +434,9 @@ Widget baseTabBar(
boxShadow:
[
BoxShadow
(
color:
Colors
.
black12
,
offset:
Offset
(
0.0
,
2.0
),
blurRadius:
0.5
,
spreadRadius:
0.5
)
spreadRadius:
0.5
)
],
),
child:
TabBar
(
...
...
lib/commonModel/net/DioInterceptor.dart
View file @
43f78c66
...
...
@@ -123,7 +123,7 @@ class DioInterceptorManager {
print
(
"请求之前 onRequest
${opt.uri}${opt.queryParameters}${opt.headers}
"
);
},
onResponse:
(
response
)
{
print
(
"响应之前
onResponse
${response}
"
);
print
(
"响应之前 "
);
},
onError:
(
e
)
{
print
(
"网络错误
$e
message
${e.message}
"
);
});
...
...
lib/commonModel/view/baseTabIndicator.dart
View file @
43f78c66
...
...
@@ -43,14 +43,15 @@ class _MD2Painter extends BoxPainter {
void
paint
(
Canvas
canvas
,
Offset
offset
,
ImageConfiguration
configuration
)
{
assert
(
configuration
!=
null
);
assert
(
configuration
.
size
!=
null
);
double
width
=
(
configuration
.
size
.
width
-
50
)
/
3.0
*
2.0
;
Rect
rect
=
Offset
(
offset
.
dx
+
configuration
.
size
.
width
/
2
-
decoration
.
indicatorW
idth
/
2
,
w
idth
/
2
,
(
configuration
.
size
.
height
-
decoration
.
indicatorHeight
-
decoration
.
indicatorPaddingBottom
))
&
Size
(
decoration
.
indicatorW
idth
,
decoration
.
indicatorHeight
);
Size
(
w
idth
,
decoration
.
indicatorHeight
);
final
Paint
paint
=
Paint
();
paint
.
color
=
decoration
.
indicatorColor
;
...
...
pubspec.lock
View file @
43f78c66
...
...
@@ -15,13 +15,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.39.11"
app_settings:
dependency: "direct main"
description:
name: app_settings
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.1+1"
archive:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
43f78c66
...
...
@@ -8,16 +8,16 @@ environment:
dependencies
:
flutter
:
sdk
:
flutter
# cupertino_icons: ^0.1.3
# cupertino_icons: ^0.1.3
cached_network_image
:
^2.2.0+1
flutter_boost
:
git
:
url
:
'
https://github.com/alibaba/flutter_boost.git'
ref
:
'
v1.17.1-hotfixes'
url
:
"
https://github.com/alibaba/flutter_boost.git"
ref
:
"
v1.17.1-hotfixes"
flutter_common
:
git
:
url
:
'
https://github.com/asd451398533/flutter_common.git'
ref
:
'
8175a0900ac0244040289488b86c5a98c45b0e94'
url
:
"
https://github.com/asd451398533/flutter_common.git"
ref
:
"
8175a0900ac0244040289488b86c5a98c45b0e94"
#网络库
dio
:
^3.0.0
dio_cookie_manager
:
^1.0.0
...
...
@@ -32,17 +32,15 @@ dependencies:
#轻量级存储
shared_preferences
:
^0.5.7+1
lottie
:
^0.4.0+1
app_settings
:
^4.0.1+1
extended_nested_scroll_view
:
^1.0.0
#适配库
flutter_screenutil
:
^1.1.0
common_utils
:
^1.2.1
dev_dependencies
:
flutter_test
:
sdk
:
flutter
source_gen
:
'
>=0.8.0'
source_gen
:
"
>=0.8.0"
build_runner
:
^1.9.0
flutter
:
...
...
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