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
376e160a
Commit
376e160a
authored
Jul 13, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
w
parent
0e864ab7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
390 additions
and
359 deletions
+390
-359
LevelOneItem.dart
lib/ClueModel/page/levelOne/LevelOneItem.dart
+184
-174
LevelOneList.dart
lib/ClueModel/page/levelOne/LevelOneList.dart
+114
-107
LevelOnePage.dart
lib/ClueModel/page/levelOne/LevelOnePage.dart
+34
-31
LevelTwoPage.dart
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
+30
-31
PlanItem.dart
lib/ClueModel/page/plan/PlanItem.dart
+1
-1
TopPage.dart
lib/ClueModel/page/top/TopPage.dart
+2
-2
BaseComponent.dart
lib/commonModel/base/BaseComponent.dart
+24
-12
main.dart
lib/main.dart
+1
-1
No files found.
lib/ClueModel/page/levelOne/LevelOneItem.dart
View file @
376e160a
...
@@ -22,6 +22,7 @@ class LevelOneItem extends StatelessWidget {
...
@@ -22,6 +22,7 @@ class LevelOneItem extends StatelessWidget {
Function
(
int
planId
)
gotoPlan
;
Function
(
int
planId
)
gotoPlan
;
int
position
;
int
position
;
String
tabName
;
String
tabName
;
int
allSize
;
LevelOneItem
(
this
.
cards
,
LevelOneItem
(
this
.
cards
,
{
this
.
lowPrice
,
{
this
.
lowPrice
,
...
@@ -29,7 +30,8 @@ class LevelOneItem extends StatelessWidget {
...
@@ -29,7 +30,8 @@ class LevelOneItem extends StatelessWidget {
this
.
compare
,
this
.
compare
,
this
.
gotoPlan
,
this
.
gotoPlan
,
this
.
position
,
this
.
position
,
this
.
tabName
});
this
.
tabName
,
this
.
allSize
});
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -100,11 +102,6 @@ class LevelOneItem extends StatelessWidget {
...
@@ -100,11 +102,6 @@ class LevelOneItem extends StatelessWidget {
),
),
),
),
),
),
Positioned
(
left:
57
,
top:
48
,
child:
FiveStarView
(
int
.
parse
(
cards
.
doctor
.
star
),
5
),
),
Positioned
(
Positioned
(
left:
57
,
left:
57
,
top:
17
,
top:
17
,
...
@@ -123,25 +120,39 @@ class LevelOneItem extends StatelessWidget {
...
@@ -123,25 +120,39 @@ class LevelOneItem extends StatelessWidget {
),
),
),
),
Positioned
(
Positioned
(
top:
42
,
top:
42
,
right:
0
,
left:
57
,
child:
Row
(
child:
Container
(
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
-
57
,
textBaseline:
TextBaseline
.
alphabetic
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
children:
<
Widget
>[
FiveStarView
(
int
.
parse
(
cards
.
doctor
.
star
),
5
),
price
==
"暂无报价"
Expanded
(
?
Container
(
child:
Container
(),
width:
0
,
),
height:
0
,
Row
(
)
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
textBaseline:
TextBaseline
.
alphabetic
,
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
mainAxisSize:
MainAxisSize
.
min
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
children:
<
Widget
>[
bold:
price
!=
"暂无报价"
)
price
==
"暂无报价"
],
?
Container
(
),
width:
0
,
),
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
],
),
)),
Positioned
(
Positioned
(
left:
57
,
left:
57
,
bottom:
15
,
bottom:
15
,
...
@@ -150,33 +161,18 @@ class LevelOneItem extends StatelessWidget {
...
@@ -150,33 +161,18 @@ class LevelOneItem extends StatelessWidget {
child:
Row
(
child:
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Expanded
(
Expanded
(
child:
askWidget
(),
child:
askWidget
(
margin:
true
),
),
),
Container
(
Container
(
width:
15
,
width:
15
,
),
),
Expanded
(
Expanded
(
child:
lowPriceWidget
(),
child:
lowPriceWidget
(
margin:
true
),
)
)
],
],
),
),
),
),
),
),
// Positioned(
// bottom: 15,
// right: 0,
// child: lowPriceWidget(),
// ),
// Positioned(
// bottom: 15,
// right: 137,
// child: askWidget(),
// ),
// Positioned(
// left: 4.5,
// bottom: 25,
// child: compareWidget(),
// ),
Positioned
(
Positioned
(
left:
0
,
left:
0
,
bottom:
0
,
bottom:
0
,
...
@@ -240,25 +236,41 @@ class LevelOneItem extends StatelessWidget {
...
@@ -240,25 +236,41 @@ class LevelOneItem extends StatelessWidget {
),
),
),
),
Positioned
(
Positioned
(
top:
42.5
,
top:
42.5
,
right:
0
,
left:
57
,
child:
Row
(
child:
Container
(
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
-
57
,
textBaseline:
TextBaseline
.
alphabetic
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
children:
<
Widget
>[
price
==
"暂无报价"
FiveStarView
(
int
.
parse
(
cards
.
hospital
.
star
),
5
),
?
Container
(
Expanded
(
width:
0
,
child:
Container
(
height:
0
,
height:
0
,
)
),
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
Row
(
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
bold:
price
!=
"暂无报价"
)
textBaseline:
TextBaseline
.
alphabetic
,
],
mainAxisSize:
MainAxisSize
.
min
,
),
children:
<
Widget
>[
),
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
],
))),
Positioned
(
Positioned
(
bottom:
15
,
bottom:
15
,
left:
57
,
left:
57
,
...
@@ -267,33 +279,18 @@ class LevelOneItem extends StatelessWidget {
...
@@ -267,33 +279,18 @@ class LevelOneItem extends StatelessWidget {
child:
Row
(
child:
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Expanded
(
Expanded
(
child:
askWidget
(),
child:
askWidget
(
margin:
true
),
),
),
Container
(
Container
(
width:
15
,
width:
15
,
),
),
Expanded
(
Expanded
(
child:
lowPriceWidget
(),
child:
lowPriceWidget
(
margin:
true
),
)
)
],
],
),
),
),
),
),
),
// Positioned(
// bottom: 15,
// right: 0,
// child: lowPriceWidget(),
// ),
// Positioned(
// bottom: 15,
// right: 137,
// child: askWidget(),
// ),
// Positioned(
// left: 4.5,
// bottom: 25,
// child: compareWidget(),
// ),
Positioned
(
Positioned
(
bottom:
63.5
,
bottom:
63.5
,
left:
57
,
left:
57
,
...
@@ -303,11 +300,11 @@ class LevelOneItem extends StatelessWidget {
...
@@ -303,11 +300,11 @@ class LevelOneItem extends StatelessWidget {
baseText
(
cards
.
hospital
.
address
,
12
,
Color
(
0xff666666
)),
baseText
(
cards
.
hospital
.
address
,
12
,
Color
(
0xff666666
)),
),
),
),
),
Positioned
(
//
Positioned(
left:
57
,
//
left: 57,
top:
47
,
//
top: 47,
child:
FiveStarView
(
int
.
parse
(
cards
.
hospital
.
star
),
5
),
//
child: FiveStarView(int.parse(cards.hospital.star), 5),
),
//
),
Positioned
(
Positioned
(
left:
0
,
left:
0
,
bottom:
0
,
bottom:
0
,
...
@@ -328,88 +325,97 @@ class LevelOneItem extends StatelessWidget {
...
@@ -328,88 +325,97 @@ class LevelOneItem extends StatelessWidget {
}
}
String
price
=
String
price
=
NumPlanUtil
.
getPrice
(
cards
.
plan
.
minPrice
,
cards
.
plan
.
maxPrice
);
NumPlanUtil
.
getPrice
(
cards
.
plan
.
minPrice
,
cards
.
plan
.
maxPrice
);
return
Container
(
return
Column
(
height:
118
,
children:
<
Widget
>[
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
Container
(
child:
Stack
(
height:
117.5
,
children:
<
Widget
>[
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
Positioned
(
child:
Column
(
left:
0
,
top:
15
,
child:
Container
(
width:
210
,
child:
baseText
(
cards
.
plan
.
planName
,
15
,
Color
(
0xff282828
),
bold:
true
),
),
),
Positioned
(
right:
0
,
top:
15
,
child:
Row
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
children:
<
Widget
>[
children:
<
Widget
>[
price
==
"暂无报价"
Container
(
?
Container
(
height:
11
,
width:
0
,
),
height:
0
,
Row
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
textBaseline:
TextBaseline
.
alphabetic
,
children:
<
Widget
>[
Container
(
constraints:
BoxConstraints
(
maxWidth:
MediaQuery
.
of
(
context
).
size
.
width
-
15
-
130
),
child:
baseText
(
cards
.
plan
.
planName
,
15
,
Color
(
0xff282828
),
bold:
true
),
),
Expanded
(
child:
Container
(),
),
price
==
"暂无报价"
?
Container
(
width:
0
,
height:
0
,
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
bold:
price
!=
"暂无报价"
)
],
),
Container
(
margin:
EdgeInsets
.
only
(
top:
7
),
alignment:
Alignment
.
centerRight
,
child:
baseText
(
"指导价:
${cards.plan.guide_price ?? "暂无报价"}
"
,
11
,
Color
(
0xff666666
)),
),
Container
(
margin:
EdgeInsets
.
only
(
top:
11
),
height:
37
,
child:
Row
(
children:
<
Widget
>[
compareWidget
(),
Expanded
(
child:
askWidget
(),
),
Expanded
(
child:
lowPriceWidget
(),
)
)
:
baseText
(
"¥"
,
12
,
Color
(
0xffFF5963
)),
],
baseText
(
price
,
price
==
"暂无报价"
?
13
:
15
,
),
price
==
"暂无报价"
?
Color
(
0xff999999
)
:
Color
(
0xffFF5963
),
)
bold:
price
!=
"暂无报价"
)
],
],
),
)).
gestureDetector
(()
{
),
buried_on_click_card
(
Positioned
(
position
,
tabName
,
"level_two_plan"
,
"
${cards.plan.plan_id}
"
);
left:
4.5
,
Map
<
String
,
dynamic
>
map
=
{
bottom:
25
,
"business_id"
:
"
${cards.plan.plan_id}
"
,
child:
compareWidget
(),
"planId"
:
cards
.
plan
.
plan_id
,
),
"referrer_tab_name"
:
tabName
Positioned
(
bottom:
15
,
right:
0
,
child:
lowPriceWidget
()),
};
Positioned
(
RouterCenterImpl
()
right:
137
,
.
findMainRouter
()
bottom:
15
,
.
jumpPage
(
context
,
"level_two_plan_deatil"
,
map
,
false
);
child:
askWidget
(),
}),
),
allSize
!=
null
&&
position
!=
null
&&
position
<
allSize
-
1
Positioned
(
?
Container
(
top:
40
,
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
,
right:
0
,
height:
0.5
,
child:
baseText
(
"指导价:
${cards.plan.guide_price ?? "暂无报价"}
"
,
11
,
color:
Color
(
0xffE5E5E5
),
Color
(
0xff666666
)),
)
),
:
Container
(
Positioned
(
height:
0.5
,
left:
0
,
),
bottom:
0
,
],
child:
Container
(
);
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
,
height:
0.5
,
color:
Color
(
0xffE5E5E5
),
),
)
],
),
).
gestureDetector
(()
{
buried_on_click_card
(
position
,
tabName
,
"level_two_plan"
,
"
${cards.plan.plan_id}
"
);
Map
<
String
,
dynamic
>
map
=
{
"business_id"
:
"
${cards.plan.plan_id}
"
,
"planId"
:
cards
.
plan
.
plan_id
,
"referrer_tab_name"
:
tabName
};
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_two_plan_deatil"
,
map
,
false
);
});
}
}
Widget
lowPriceWidget
()
{
Widget
lowPriceWidget
(
{
bool
margin
=
false
}
)
{
return
GestureDetector
(
return
GestureDetector
(
onTap:
lowPrice
,
onTap:
lowPrice
,
behavior:
HitTestBehavior
.
opaque
,
behavior:
HitTestBehavior
.
opaque
,
child:
Container
(
child:
Container
(
width:
122
,
margin:
EdgeInsets
.
only
(
left:
margin
?
0.0
:
15
)
,
height:
37
,
height:
37
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
18.5
),
borderRadius:
BorderRadius
.
circular
(
18.5
),
...
@@ -420,12 +426,12 @@ class LevelOneItem extends StatelessWidget {
...
@@ -420,12 +426,12 @@ class LevelOneItem extends StatelessWidget {
);
);
}
}
Widget
askWidget
()
{
Widget
askWidget
(
{
bool
margin
=
false
}
)
{
return
GestureDetector
(
return
GestureDetector
(
onTap:
ask
,
onTap:
ask
,
behavior:
HitTestBehavior
.
opaque
,
behavior:
HitTestBehavior
.
opaque
,
child:
Container
(
child:
Container
(
width:
122
,
margin:
EdgeInsets
.
only
(
left:
margin
?
0
:
15
)
,
height:
37
,
height:
37
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
18.5
),
borderRadius:
BorderRadius
.
circular
(
18.5
),
...
@@ -437,23 +443,27 @@ class LevelOneItem extends StatelessWidget {
...
@@ -437,23 +443,27 @@ class LevelOneItem extends StatelessWidget {
}
}
Widget
compareWidget
()
{
Widget
compareWidget
()
{
return
Row
(
return
Container
(
mainAxisSize:
MainAxisSize
.
min
,
height:
30
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
width:
71
,
children:
<
Widget
>[
child:
Row
(
Container
(
mainAxisSize:
MainAxisSize
.
min
,
width:
18
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
height:
18
,
children:
<
Widget
>[
child:
Image
.
asset
(
"assets/vs.png"
),
Container
(
),
width:
18
,
Container
(
height:
18
,
margin:
EdgeInsets
.
only
(
left:
1.5
),
child:
Image
.
asset
(
"assets/vs.png"
),
child:
baseText
(
"去比较"
,
13
,
Color
(
0xff282828
),
bold:
true
),
),
)
Container
(
],
margin:
EdgeInsets
.
only
(
left:
1.5
),
).
gestureDetector
(()
{
child:
baseText
(
"去比较"
,
13
,
Color
(
0xff282828
),
bold:
true
),
compare
(
cards
.
plan
.
plan_id
);
)
});
],
).
gestureDetector
(()
{
compare
(
cards
.
plan
.
plan_id
);
}),
);
}
}
Widget
DiaryItem
(
BuildContext
context
)
{
Widget
DiaryItem
(
BuildContext
context
)
{
...
...
lib/ClueModel/page/levelOne/LevelOneList.dart
View file @
376e160a
...
@@ -101,115 +101,122 @@ class LevelOneListState extends State<LevelOneList>
...
@@ -101,115 +101,122 @@ class LevelOneListState extends State<LevelOneList>
color:
Color
(
0xffF7F6FA
),
color:
Color
(
0xffF7F6FA
),
);
);
}
}
return
LevelOneItem
(
return
Container
(
_model
.
data
[
index
],
color:
Colors
.
white
,
lowPrice:
()
{
child:
LevelOneItem
(
if
(
CacheManager
.
getInstance
()
_model
.
data
[
index
],
.
get
(
MEMORY_CACHE
)
allSize:
_model
.
data
.
length
,
.
get
(
USER_ID
)
==
lowPrice:
()
{
null
&&
if
(
CacheManager
.
getInstance
()
RouterCenterImpl
()
.
get
(
MEMORY_CACHE
)
.
findMainRouter
()
.
get
(
USER_ID
)
==
.
isWithNative
())
{
null
&&
RouterCenterImpl
()
RouterCenterImpl
()
.
findMainRouter
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
.
isWithNative
())
{
return
;
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
}
context
,
"show_login"
,
null
,
true
);
return
;
}
var
data2
=
_model
.
data
[
index
];
var
data2
=
_model
.
data
[
index
];
if
(
data2
.
cardType
==
"doctor"
)
{
if
(
data2
.
cardType
==
"doctor"
)
{
buried_on_click_button
(
index
,
"bargain"
,
"doctor"
,
buried_on_click_button
(
index
,
"bargain"
,
data2
.
doctor
.
doctor_id
);
"doctor"
,
data2
.
doctor
.
doctor_id
);
}
else
if
(
data2
.
cardType
==
"hospital"
)
{
}
else
if
(
data2
.
cardType
==
"hospital"
)
{
buried_on_click_button
(
index
,
"bargain"
,
"hospital"
,
buried_on_click_button
(
index
,
"bargain"
,
data2
.
hospital
.
hosiptalId
);
"hospital"
,
data2
.
hospital
.
hosiptalId
);
}
else
if
(
data2
.
cardType
==
"plan"
)
{
}
else
if
(
data2
.
cardType
==
"plan"
)
{
buried_on_click_button
(
index
,
"bargain"
,
buried_on_click_button
(
index
,
"bargain"
,
"level_two_plan"
,
"
${data2.plan.plan_id}
"
);
"level_two_plan"
,
"
${data2.plan.plan_id}
"
);
}
}
DiscussLowPricePopView
.
showPopView
(
DiscussLowPricePopView
.
showPopView
(
context
,
context
,
widget
.
pageName
,
widget
.
pageName
,
"
${widget.planId}
"
,
"
${widget.planId}
"
,
_model
.
data
[
index
].
cardType
==
"hospital"
_model
.
data
[
index
].
cardType
==
"hospital"
?
_model
.
data
[
index
].
hospital
.
hosiptalId
?
_model
.
data
[
index
].
hospital
.
hosiptalId
:
""
,
:
""
,
_model
.
data
[
index
].
cardType
==
"doctor"
_model
.
data
[
index
].
cardType
==
"doctor"
?
_model
.
data
[
index
].
doctor
.
doctor_id
?
_model
.
data
[
index
].
doctor
.
doctor_id
:
""
);
:
""
);
},
},
ask:
()
{
ask:
()
{
var
data2
=
_model
.
data
[
index
];
var
data2
=
_model
.
data
[
index
];
if
(
data2
.
cardType
==
"doctor"
)
{
if
(
data2
.
cardType
==
"doctor"
)
{
if
(!
data2
.
doctor
.
accept_private_msg
)
{
if
(!
data2
.
doctor
.
accept_private_msg
)
{
NativeToast
.
showNativeToast
(
"该机构未开通私信功能"
);
NativeToast
.
showNativeToast
(
"该机构未开通私信功能"
);
return
;
return
;
}
}
buried_on_click_button
(
index
,
"consult"
,
"doctor"
,
buried_on_click_button
(
index
,
"consult"
,
data2
.
doctor
.
doctor_id
);
"doctor"
,
data2
.
doctor
.
doctor_id
);
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
context
,
data2
.
doctor
.
messageUrl
,
null
,
true
);
context
,
}
else
if
(
data2
.
cardType
==
"hospital"
)
{
data2
.
doctor
.
messageUrl
,
if
(!
data2
.
hospital
.
accept_private_msg
)
{
null
,
NativeToast
.
showNativeToast
(
"该机构未开通私信功能"
);
true
);
return
;
}
else
if
(
data2
.
cardType
==
"hospital"
)
{
}
if
(!
data2
.
hospital
.
accept_private_msg
)
{
buried_on_click_button
(
index
,
"consult"
,
"hospital"
,
NativeToast
.
showNativeToast
(
"该机构未开通私信功能"
);
data2
.
hospital
.
hosiptalId
);
return
;
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
}
context
,
data2
.
hospital
.
messageUrl
,
null
,
true
);
buried_on_click_button
(
index
,
"consult"
,
}
else
if
(
data2
.
cardType
==
"plan"
)
{
"hospital"
,
data2
.
hospital
.
hosiptalId
);
if
(
CacheManager
.
getInstance
()
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
.
get
(
MEMORY_CACHE
)
context
,
.
get
(
USER_ID
)
==
data2
.
hospital
.
messageUrl
,
null
&&
null
,
RouterCenterImpl
()
true
);
.
findMainRouter
()
}
else
if
(
data2
.
cardType
==
"plan"
)
{
.
isWithNative
())
{
if
(
CacheManager
.
getInstance
()
RouterCenterImpl
()
.
get
(
MEMORY_CACHE
)
.
findMainRouter
()
.
get
(
USER_ID
)
==
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
null
&&
return
;
RouterCenterImpl
()
}
.
findMainRouter
()
buried_on_click_button
(
index
,
"consult"
,
.
isWithNative
())
{
"level_two_plan"
,
"
${data2.plan.plan_id}
"
);
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
BaseBottomPicker
()
context
,
"show_login"
,
null
,
true
);
..
setPicker
(
MechanismBox
(
return
;
data2
.
plan
.
plan_id
,
widget
.
pageName
))
}
..
show
(
context
);
buried_on_click_button
(
index
,
"consult"
,
}
"level_two_plan"
,
"
${data2.plan.plan_id}
"
);
},
BaseBottomPicker
()
compare:
(
int
planId
)
{
..
setPicker
(
MechanismBox
(
var
data2
=
_model
.
data
[
index
];
data2
.
plan
.
plan_id
,
widget
.
pageName
))
if
(
data2
.
cardType
==
"doctor"
)
{
..
show
(
context
);
buried_on_click_button
(
index
,
"compare"
,
"doctor"
,
}
data2
.
doctor
.
doctor_id
);
},
}
else
if
(
data2
.
cardType
==
"hospital"
)
{
compare:
(
int
planId
)
{
buried_on_click_button
(
index
,
"compare"
,
"hospital"
,
var
data2
=
_model
.
data
[
index
];
data2
.
hospital
.
hosiptalId
);
if
(
data2
.
cardType
==
"doctor"
)
{
}
else
if
(
data2
.
cardType
==
"plan"
)
{
buried_on_click_button
(
index
,
"compare"
,
buried_on_click_button
(
index
,
"compare"
,
"doctor"
,
data2
.
doctor
.
doctor_id
);
"level_two_plan"
,
"
${data2.plan.plan_id}
"
);
}
else
if
(
data2
.
cardType
==
"hospital"
)
{
}
buried_on_click_button
(
index
,
"compare"
,
"hospital"
,
data2
.
hospital
.
hosiptalId
);
}
else
if
(
data2
.
cardType
==
"plan"
)
{
buried_on_click_button
(
index
,
"compare"
,
"level_two_plan"
,
"
${data2.plan.plan_id}
"
);
}
Map
<
String
,
dynamic
>
map
=
{
Map
<
String
,
dynamic
>
map
=
{
"business_id"
:
"
${widget.planId}
"
,
"business_id"
:
"
${widget.planId}
"
,
"planId"
:
planId
,
"planId"
:
planId
,
"planType"
:
2
,
"planType"
:
2
,
"referrer_tab_name"
:
""
"referrer_tab_name"
:
""
};
};
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
context
,
context
,
widget
.
index
==
0
widget
.
index
==
0
?
"level_one_plan_compare"
?
"level_one_plan_compare"
:
"level_two_plan_compare"
,
:
"level_two_plan_compare"
,
map
,
map
,
false
);
false
);
},
},
tabName:
widget
.
tabName
,
tabName:
widget
.
tabName
,
position:
index
,
position:
index
,
);
)
);
},
},
childCount:
_model
.
data
.
length
+
1
,
childCount:
_model
.
data
.
length
+
1
,
),
),
...
...
lib/ClueModel/page/levelOne/LevelOnePage.dart
View file @
376e160a
...
@@ -221,7 +221,8 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -221,7 +221,8 @@ class LevelOneState extends BaseState<LevelOnePage>
SliverOverlapAbsorber
(
SliverOverlapAbsorber
(
handle:
extend
.
NestedScrollView
.
sliverOverlapAbsorberHandleFor
(
handle:
extend
.
NestedScrollView
.
sliverOverlapAbsorberHandleFor
(
context
),
context
),
sliver:
baseSliverAppBar
(
_model
.
imageUrl
)),
sliver:
baseSliverAppBar
(
_model
.
imageUrl
,
height:
ScreenUtil
().
setHeight
(
200
))),
SliverList
(
SliverList
(
delegate:
SliverChildBuilderDelegate
((
BuildContext
c
,
int
i
)
{
delegate:
SliverChildBuilderDelegate
((
BuildContext
c
,
int
i
)
{
if
(
i
==
0
)
{
if
(
i
==
0
)
{
...
@@ -246,15 +247,17 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -246,15 +247,17 @@ class LevelOneState extends BaseState<LevelOnePage>
),
),
];
];
},
},
body:
TabBarView
(
controller:
tabController
,
children:
list
));
body:
Container
(
color:
Color
(
0xffF7F6FA
),
child:
TabBarView
(
controller:
tabController
,
children:
list
)));
}
}
List
<
Widget
>
getTabs
()
{
List
<
Widget
>
getTabs
()
{
List
<
Widget
>
list
=
[];
List
<
Widget
>
list
=
[];
for
(
int
i
=
0
;
i
<
_model
.
tabsList
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
_model
.
tabsList
.
length
;
i
++)
{
list
.
add
(
baseTabBarItem
(
_model
.
tabsList
[
i
].
name
,
list
.
add
(
baseTabBarItem
(
_model
.
tabsList
[
i
].
name
,
leftPadding:
i
==
0
?
2
4
:
28
,
leftPadding:
i
==
0
?
2
1.5
:
14
,
rightPadding:
i
==
_model
.
tabsList
.
length
-
1
?
2
4
:
28
));
rightPadding:
i
==
_model
.
tabsList
.
length
-
1
?
2
1.5
:
14
));
}
}
return
list
;
return
list
;
}
}
...
@@ -283,7 +286,7 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -283,7 +286,7 @@ class LevelOneState extends BaseState<LevelOnePage>
return
Container
(
return
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
54
,
height:
54
,
margin:
EdgeInsets
.
only
(
top:
1
4
,
bottom:
12
),
margin:
EdgeInsets
.
only
(
top:
1
9
,
bottom:
12
),
child:
Stack
(
child:
Stack
(
children:
<
Widget
>[
children:
<
Widget
>[
Positioned
(
Positioned
(
...
@@ -293,7 +296,7 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -293,7 +296,7 @@ class LevelOneState extends BaseState<LevelOnePage>
bold:
true
),
bold:
true
),
),
),
Positioned
(
Positioned
(
bottom:
6
,
bottom:
3.5
,
left:
15
,
left:
15
,
child:
Container
(
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
-
100
,
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
-
100
,
...
@@ -411,35 +414,35 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -411,35 +414,35 @@ class LevelOneState extends BaseState<LevelOnePage>
Widget
explain
()
{
Widget
explain
()
{
List
<
Widget
>
list
=
[];
List
<
Widget
>
list
=
[];
list
.
add
(
Row
(
children:
<
Widget
>[
baseText
(
"项目说明"
,
15
,
Color
(
0xff282828
),
bold:
true
),
Expanded
(
child:
Container
(),
),
GestureDetector
(
onTap:
()
{
Map
<
String
,
dynamic
>
map
=
{
"business_id"
:
"
${widget.planId}
"
,
"planId"
:
widget
.
planId
,
"referrer_tab_name"
:
_model
.
tabsList
[
tabController
.
index
].
name
};
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_one_plan_instruction"
,
map
,
false
);
},
behavior:
HitTestBehavior
.
opaque
,
child:
baseText
(
"了解更多"
,
12
,
Color
(
0xff3FB5AF
)),
)
],
));
list
.
add
(
Container
(
list
.
add
(
Container
(
height:
31
,
height:
11
,
child:
Row
(
children:
<
Widget
>[
baseText
(
"项目说明"
,
15
,
Color
(
0xff282828
)),
Expanded
(
child:
Container
(),
),
GestureDetector
(
onTap:
()
{
Map
<
String
,
dynamic
>
map
=
{
"business_id"
:
"
${widget.planId}
"
,
"planId"
:
widget
.
planId
,
"referrer_tab_name"
:
_model
.
tabsList
[
tabController
.
index
].
name
};
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_one_plan_instruction"
,
map
,
false
);
},
behavior:
HitTestBehavior
.
opaque
,
child:
baseText
(
"了解更多"
,
12
,
Color
(
0xff3FB5AF
)),
)
],
),
));
));
if
(
_model
.
planoverItem
!=
null
)
{
if
(
_model
.
planoverItem
!=
null
)
{
_model
.
planoverItem
.
explanationAttrs
.
forEach
((
element
)
{
_model
.
planoverItem
.
explanationAttrs
.
forEach
((
element
)
{
list
.
add
(
Container
(
list
.
add
(
Container
(
margin:
EdgeInsets
.
only
(
bottom:
1
5
),
margin:
EdgeInsets
.
only
(
bottom:
1
0
),
child:
Row
(
child:
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
...
@@ -489,7 +492,7 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -489,7 +492,7 @@ class LevelOneState extends BaseState<LevelOnePage>
});
});
}
}
return
Container
(
return
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
20
),
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
9
),
child:
Column
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
children:
list
,
children:
list
,
...
...
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
View file @
376e160a
...
@@ -256,8 +256,8 @@ class LevelTwoState extends BaseState<LevelTwoPage>
...
@@ -256,8 +256,8 @@ class LevelTwoState extends BaseState<LevelTwoPage>
List
<
Widget
>
list
=
[];
List
<
Widget
>
list
=
[];
for
(
int
i
=
0
;
i
<
_model
.
tabsList
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
_model
.
tabsList
.
length
;
i
++)
{
list
.
add
(
baseTabBarItem
(
_model
.
tabsList
[
i
].
name
,
list
.
add
(
baseTabBarItem
(
_model
.
tabsList
[
i
].
name
,
leftPadding:
i
==
0
?
2
4
:
28
,
leftPadding:
i
==
0
?
2
1.5
:
14
,
rightPadding:
i
==
_model
.
tabsList
.
length
-
1
?
2
4
:
28
));
rightPadding:
i
==
_model
.
tabsList
.
length
-
1
?
2
1.5
:
14
));
}
}
return
list
;
return
list
;
}
}
...
@@ -372,7 +372,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
...
@@ -372,7 +372,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
),
),
width:
double
.
maxFinite
,
width:
double
.
maxFinite
,
height:
62
,
height:
62
,
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
1
2
),
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
1
7
),
child:
Row
(
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
list
,
children:
list
,
...
@@ -382,31 +382,30 @@ class LevelTwoState extends BaseState<LevelTwoPage>
...
@@ -382,31 +382,30 @@ class LevelTwoState extends BaseState<LevelTwoPage>
Widget
explain
()
{
Widget
explain
()
{
List
<
Widget
>
list
=
[];
List
<
Widget
>
list
=
[];
list
.
add
(
Row
(
children:
<
Widget
>[
baseText
(
"项目说明"
,
15
,
Color
(
0xff282828
),
bold:
true
),
Expanded
(
child:
Container
(),
),
GestureDetector
(
onTap:
()
{
Map
<
String
,
dynamic
>
map
=
{
"business_id"
:
"
${widget.planId}
"
,
"referrer_tab_name"
:
_model
.
tabsList
[
tabController
.
index
].
name
,
"planId"
:
widget
.
planId
};
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_two_plan_instruction"
,
map
,
false
);
},
behavior:
HitTestBehavior
.
opaque
,
child:
baseText
(
"了解更多"
,
12
,
Color
(
0xff3FB5AF
)),
)
],
));
list
.
add
(
Container
(
list
.
add
(
Container
(
margin:
EdgeInsets
.
only
(
bottom:
4
),
height:
11
,
height:
31
,
child:
Row
(
children:
<
Widget
>[
baseText
(
"项目说明"
,
15
,
Color
(
0xff282828
),
bold:
true
),
Expanded
(
child:
Container
(),
),
GestureDetector
(
onTap:
()
{
Map
<
String
,
dynamic
>
map
=
{
"business_id"
:
"
${widget.planId}
"
,
"referrer_tab_name"
:
_model
.
tabsList
[
tabController
.
index
].
name
,
"planId"
:
widget
.
planId
};
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"level_two_plan_instruction"
,
map
,
false
);
},
behavior:
HitTestBehavior
.
opaque
,
child:
baseText
(
"了解更多"
,
12
,
Color
(
0xff3FB5AF
)),
)
],
),
));
));
if
(
_model
.
planoverItem
!=
null
)
{
if
(
_model
.
planoverItem
!=
null
)
{
_model
.
planoverItem
.
explanationAttrs
.
forEach
((
element
)
{
_model
.
planoverItem
.
explanationAttrs
.
forEach
((
element
)
{
...
@@ -417,9 +416,9 @@ class LevelTwoState extends BaseState<LevelTwoPage>
...
@@ -417,9 +416,9 @@ class LevelTwoState extends BaseState<LevelTwoPage>
Container
(
Container
(
width:
55
,
width:
55
,
child:
Text
(
child:
Text
(
element
.
attrName
.
length
==
2
element
.
attrName
.
length
==
2
?
"
${element.attrName.substring(0, 1)}
${element.attrName.substring(1, 2)}
"
?
"
${element.attrName.substring(0, 1)}
${element.attrName.substring(1, 2)}
"
:
element
.
attrName
,
:
element
.
attrName
,
textScaleFactor:
1.0
,
textScaleFactor:
1.0
,
softWrap:
true
,
softWrap:
true
,
maxLines:
1
,
maxLines:
1
,
...
@@ -456,7 +455,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
...
@@ -456,7 +455,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
});
});
}
}
return
Container
(
return
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
3
),
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
,
bottom:
9
),
child:
Column
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
mainAxisSize:
MainAxisSize
.
min
,
children:
list
,
children:
list
,
...
...
lib/ClueModel/page/plan/PlanItem.dart
View file @
376e160a
...
@@ -139,7 +139,7 @@ class PlanItem extends StatelessWidget {
...
@@ -139,7 +139,7 @@ class PlanItem extends StatelessWidget {
left:
91
,
left:
91
,
bottom:
12
,
bottom:
12
,
child:
Container
(
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
-
91
-
10
,
width:
MediaQuery
.
of
(
context
).
size
.
width
-
30
-
91
-
4
,
child:
Row
(
child:
Row
(
textBaseline:
TextBaseline
.
alphabetic
,
textBaseline:
TextBaseline
.
alphabetic
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
...
...
lib/ClueModel/page/top/TopPage.dart
View file @
376e160a
...
@@ -199,8 +199,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
...
@@ -199,8 +199,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
List
<
Widget
>
list
=
[];
List
<
Widget
>
list
=
[];
for
(
int
i
=
0
;
i
<
_model
.
tabs
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
_model
.
tabs
.
length
;
i
++)
{
list
.
add
(
baseTabBarItem
(
_model
.
tabs
[
i
].
name
,
list
.
add
(
baseTabBarItem
(
_model
.
tabs
[
i
].
name
,
leftPadding:
i
==
0
?
2
4
:
28
,
leftPadding:
i
==
0
?
2
1.5
:
14
,
rightPadding:
i
==
_model
.
tabs
.
length
-
1
?
2
4
:
28
));
rightPadding:
i
==
_model
.
tabs
.
length
-
1
?
2
1.5
:
14
));
}
}
return
list
;
return
list
;
}
}
...
...
lib/commonModel/base/BaseComponent.dart
View file @
376e160a
...
@@ -458,17 +458,30 @@ Widget baseTabBar(
...
@@ -458,17 +458,30 @@ Widget baseTabBar(
Widget
baseTabBarItem
(
String
text
,
Widget
baseTabBarItem
(
String
text
,
{
double
leftPadding
,
double
rightPadding
,
double
wantWidth
})
{
{
double
leftPadding
,
double
rightPadding
,
double
wantWidth
})
{
leftPadding
=
leftPadding
??
28.0
;
leftPadding
=
leftPadding
??
14.0
;
rightPadding
=
rightPadding
??
28.0
;
rightPadding
=
rightPadding
??
14.0
;
double
width
=
leftPadding
+
text
.
length
*
16.0
+
rightPadding
;
return
Row
(
return
Container
(
mainAxisSize:
MainAxisSize
.
min
,
height:
40.0
,
children:
<
Widget
>[
width:
wantWidth
??
width
,
Container
(
alignment:
Alignment
.
center
,
width:
leftPadding
,
child:
Tab
(
),
text:
text
,
Tab
(
),
text:
text
,
),
Container
(
width:
rightPadding
,
)
],
);
);
// Container(
// height: 40.0,
// width: wantWidth ?? width,
// alignment: Alignment.center,
// child: Tab(
// text: text,
// ),
// );
}
}
Widget
baseSliverAppBar
(
String
url
,
Widget
baseSliverAppBar
(
String
url
,
...
@@ -485,8 +498,7 @@ Widget baseSliverAppBar(String url,
...
@@ -485,8 +498,7 @@ Widget baseSliverAppBar(String url,
imageUrl:
url
??
''
,
imageUrl:
url
??
''
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)
)
:
Container
(
:
Container
(),
),
),
),
);
);
}
}
...
...
lib/main.dart
View file @
376e160a
...
@@ -120,7 +120,7 @@ class Home extends StatefulWidget {
...
@@ -120,7 +120,7 @@ class Home extends StatefulWidget {
class
HomeState
extends
State
<
Home
>
{
class
HomeState
extends
State
<
Home
>
{
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
ScreenUtil
.
init
(
context
,
width:
375
,
height:
810
);
ScreenUtil
.
init
(
context
,
width:
375
,
height:
667
);
return
isDebug
return
isDebug
?
RouterCenterImpl
().
findMainRouter
().
getTestPage
()
?
RouterCenterImpl
().
findMainRouter
().
getTestPage
()
:
Container
(
:
Container
(
...
...
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