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
bc18aa2b
Commit
bc18aa2b
authored
Jul 09, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
w
parent
101f8906
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
17 deletions
+74
-17
LevelOneList.dart
lib/ClueModel/page/levelOne/LevelOneList.dart
+23
-1
LevelOnePage.dart
lib/ClueModel/page/levelOne/LevelOnePage.dart
+6
-4
LevelTwoPage.dart
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
+4
-2
FilterView.dart
lib/ClueModel/page/plan/FilterView.dart
+4
-5
PlanModel.dart
lib/ClueModel/page/plan/PlanModel.dart
+4
-1
PlanProgressBar.dart
lib/ClueModel/page/plan/PlanProgressBar.dart
+26
-4
MainRouter.dart
lib/MainRouter/MainRouter.dart
+2
-0
MainRouterImpl.dart
lib/MainRouter/MainRouterImpl.dart
+5
-0
No files found.
lib/ClueModel/page/levelOne/LevelOneList.dart
View file @
bc18aa2b
...
@@ -4,8 +4,10 @@
...
@@ -4,8 +4,10 @@
**/
**/
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_common/commonModel/picker/base/BaseBottomPicker.dart'
;
import
'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart'
;
import
'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart'
;
import
'package:gm_flutter/ClueModel/page/levelOne/LevelOneListModel.dart'
;
import
'package:gm_flutter/ClueModel/page/levelOne/LevelOneListModel.dart'
;
import
'package:gm_flutter/ClueModel/page/mechanismBox/MechanismBoxPage.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart'
;
import
'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart'
;
import
'package:gm_flutter/commonModel/App.dart'
;
import
'package:gm_flutter/commonModel/App.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
...
@@ -99,7 +101,13 @@ class LevelOneListState extends State<LevelOneList>
...
@@ -99,7 +101,13 @@ class LevelOneListState extends State<LevelOneList>
return
LevelOneItem
(
return
LevelOneItem
(
_model
.
data
[
index
],
_model
.
data
[
index
],
lowPrice:
()
{
lowPrice:
()
{
if
(
CacheManager
.
getInstance
().
get
(
USER_ID
)
==
null
)
{
if
(
CacheManager
.
getInstance
()
.
get
(
MEMORY_CACHE
)
.
get
(
COOKIE
)
==
null
&&
RouterCenterImpl
()
.
findMainRouter
()
.
isWithNative
())
{
RouterCenterImpl
()
RouterCenterImpl
()
.
findMainRouter
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
...
@@ -116,6 +124,20 @@ class LevelOneListState extends State<LevelOneList>
...
@@ -116,6 +124,20 @@ class LevelOneListState extends State<LevelOneList>
?
_model
.
data
[
index
].
doctor
.
doctor_id
?
_model
.
data
[
index
].
doctor
.
doctor_id
:
""
);
:
""
);
},
},
ask:
()
{
var
data2
=
_model
.
data
[
index
];
if
(
data2
.
cardType
==
"doctor"
)
{
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
context
,
data2
.
doctor
.
messageUrl
,
null
,
true
);
}
else
if
(
data2
.
cardType
==
"hospital"
)
{
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
context
,
data2
.
hospital
.
messageUrl
,
null
,
true
);
}
else
if
(
data2
.
cardType
==
"plan"
)
{
BaseBottomPicker
()
..
setPicker
(
MechanismBox
(
data2
.
plan
.
plan_id
))
..
show
(
context
);
}
},
compare:
()
{
compare:
()
{
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
RouterCenterImpl
().
findMainRouter
().
jumpPage
(
context
,
context
,
...
...
lib/ClueModel/page/levelOne/LevelOnePage.dart
View file @
bc18aa2b
...
@@ -513,7 +513,8 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -513,7 +513,8 @@ class LevelOneState extends BaseState<LevelOnePage>
GestureDetector
(
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
onTap:
()
{
if
(
CacheManager
.
getInstance
().
get
(
USER_ID
)
==
null
)
{
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
COOKIE
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
RouterCenterImpl
()
.
findMainRouter
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
...
@@ -536,7 +537,8 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -536,7 +537,8 @@ class LevelOneState extends BaseState<LevelOnePage>
GestureDetector
(
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
onTap:
()
{
if
(
CacheManager
.
getInstance
().
get
(
USER_ID
)
==
null
)
{
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
COOKIE
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
RouterCenterImpl
()
.
findMainRouter
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
...
@@ -550,8 +552,8 @@ class LevelOneState extends BaseState<LevelOnePage>
...
@@ -550,8 +552,8 @@ class LevelOneState extends BaseState<LevelOnePage>
RouterCenterImpl
()
RouterCenterImpl
()
.
findMainRouter
()
.
findMainRouter
()
.
buriedEvent
(
"popup_view"
,
map
);
.
buriedEvent
(
"popup_view"
,
map
);
DiscussLowPricePopView
.
showPopView
(
context
,
DiscussLowPricePopView
.
showPopView
(
widget
.
PAGE_NAME
,
"
${widget.planId}
"
,
""
,
""
);
context
,
widget
.
PAGE_NAME
,
"
${widget.planId}
"
,
""
,
""
);
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
),
margin:
EdgeInsets
.
only
(
left:
15
),
...
...
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
View file @
bc18aa2b
...
@@ -301,7 +301,8 @@ class LevelTwoState extends BaseState<LevelTwoPage>
...
@@ -301,7 +301,8 @@ class LevelTwoState extends BaseState<LevelTwoPage>
style:
TextStyle
(
style:
TextStyle
(
color:
Color
(
0xff999999
),
fontSize:
12
)),
color:
Color
(
0xff999999
),
fontSize:
12
)),
Expanded
(
Expanded
(
child:
baseText
(
'¥'
+
_model
.
planoverItem
.
guidePrice
,
12
,
Color
(
0xffFF5963
)),
child:
baseText
(
'¥'
+
_model
.
planoverItem
.
guidePrice
,
12
,
Color
(
0xffFF5963
)),
)
)
],
],
)
)
...
@@ -482,7 +483,8 @@ class LevelTwoState extends BaseState<LevelTwoPage>
...
@@ -482,7 +483,8 @@ class LevelTwoState extends BaseState<LevelTwoPage>
GestureDetector
(
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
onTap:
()
{
if
(
CacheManager
.
getInstance
().
get
(
USER_ID
)
==
null
)
{
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
COOKIE
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
RouterCenterImpl
()
.
findMainRouter
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
...
...
lib/ClueModel/page/plan/FilterView.dart
View file @
bc18aa2b
...
@@ -14,8 +14,6 @@ class FilterView extends StatelessWidget {
...
@@ -14,8 +14,6 @@ class FilterView extends StatelessWidget {
FilterView
(
this
.
call
);
FilterView
(
this
.
call
);
int
min
=
0
;
int
max
=
0
;
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -31,9 +29,10 @@ class FilterView extends StatelessWidget {
...
@@ -31,9 +29,10 @@ class FilterView extends StatelessWidget {
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
child:
PlanProgressBar
(
child:
PlanProgressBar
(
0
,
0
,
5
,
5
000
,
0
,
0
,
10000
,
20010
,
call
,
padding:
15
,
padding:
15
,
),
),
),
),
...
@@ -75,7 +74,7 @@ class FilterView extends StatelessWidget {
...
@@ -75,7 +74,7 @@ class FilterView extends StatelessWidget {
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
child:
baseText
(
"确定"
,
16
,
Colors
.
white
),
child:
baseText
(
"确定"
,
16
,
Colors
.
white
),
).
gestureDetector
(()
{
).
gestureDetector
(()
{
call
(
max
,
min
);
SimpleEventBus
.
instance
().
notifyListener
(
"PlanProgressBarState"
,
"sure"
);
}),
}),
)
)
],
],
...
...
lib/ClueModel/page/plan/PlanModel.dart
View file @
bc18aa2b
...
@@ -180,9 +180,12 @@ class PlanModel extends BaseModel {
...
@@ -180,9 +180,12 @@ class PlanModel extends BaseModel {
}
}
void
filterClick
(
int
max
,
int
min
)
{
void
filterClick
(
int
max
,
int
min
)
{
if
(
max_price
==
max
.
toString
()
&&
min_price
==
min
.
toString
()
)
{
if
(
max_price
==
"
${max}
"
&&
min_price
==
"
${min}
"
)
{
return
;
return
;
}
}
if
(
max
>
20000
)
{
max
=
20000000
;
}
max_price
=
"
${max}
"
;
max_price
=
"
${max}
"
;
min_price
=
"
${min}
"
;
min_price
=
"
${min}
"
;
feedsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
feedsLive
.
notifyView
(
Pair
(
LOADING
,
null
));
...
...
lib/ClueModel/page/plan/PlanProgressBar.dart
View file @
bc18aa2b
...
@@ -13,8 +13,9 @@ class PlanProgressBar extends StatefulWidget {
...
@@ -13,8 +13,9 @@ class PlanProgressBar extends StatefulWidget {
int
maxlow
;
int
maxlow
;
int
maxHigh
;
int
maxHigh
;
int
padding
;
int
padding
;
final
Function
(
int
high
,
int
low
)
call
;
PlanProgressBar
(
this
.
low
,
this
.
high
,
this
.
maxlow
,
this
.
maxHigh
,
PlanProgressBar
(
this
.
low
,
this
.
high
,
this
.
maxlow
,
this
.
maxHigh
,
this
.
call
,
{
this
.
padding
});
{
this
.
padding
});
@override
@override
...
@@ -37,14 +38,23 @@ class PlanProgressBarState extends State<PlanProgressBar> {
...
@@ -37,14 +38,23 @@ class PlanProgressBarState extends State<PlanProgressBar> {
bool
isLeftMove
=
true
;
bool
isLeftMove
=
true
;
Function
(
String
str
)
func
;
Function
(
String
str
)
func
;
int
low
;
int
high
;
@override
@override
void
initState
()
{
void
initState
()
{
low
=
widget
.
low
;
high
=
widget
.
high
;
super
.
initState
();
super
.
initState
();
distance
=
widget
.
maxHigh
-
widget
.
maxlow
-
0.0
;
distance
=
widget
.
maxHigh
-
widget
.
maxlow
-
0.0
;
init
();
init
();
func
=
(
str
)
{
func
=
(
str
)
{
init
();
if
(
str
==
"sure"
)
{
setState
(()
{});
widget
.
call
(
high
,
low
);
}
else
{
init
();
setState
(()
{});
}
};
};
SimpleEventBus
.
instance
().
resignEvent
(
"PlanProgressBarState"
,
func
);
SimpleEventBus
.
instance
().
resignEvent
(
"PlanProgressBarState"
,
func
);
}
}
...
@@ -71,11 +81,23 @@ class PlanProgressBarState extends State<PlanProgressBar> {
...
@@ -71,11 +81,23 @@ class PlanProgressBarState extends State<PlanProgressBar> {
(
isLeftMove
?
leftPosTempPercent
:
rightPosTempPercent
+
0.03
)
*
(
isLeftMove
?
leftPosTempPercent
:
rightPosTempPercent
+
0.03
)
*
distance
)
distance
)
.
toInt
();
.
toInt
();
if
(
isLeftMove
)
{
low
=
textInt
;
}
else
{
high
=
textInt
;
}
String
textStr
=
"¥
${textInt}
"
;
String
textStr
=
"¥
${textInt}
"
;
if
(
textInt
>
20000
)
{
textStr
=
"无限"
;
}
double
textWidth
=
textStr
.
length
*
12.0
;
double
textWidth
=
textStr
.
length
*
12.0
;
if
(
textStr
==
"无限"
)
{
textWidth
=
textStr
.
length
*
14.0
;
}
double
textL
=
textLeft
*
totle
-
textWidth
/
2
+
9
;
double
textL
=
textLeft
*
totle
-
textWidth
/
2
+
9
;
// if (textL < 0) {
// if (textL < 0) {
// textL = 0;
// textL = 0;
// } else if (textL + textWidth > totle) {
// } else if (textL + textWidth > totle) {
...
...
lib/MainRouter/MainRouter.dart
View file @
bc18aa2b
...
@@ -20,4 +20,6 @@ abstract class MainRouter extends RouterBaser {
...
@@ -20,4 +20,6 @@ abstract class MainRouter extends RouterBaser {
Widget
getProxyPage
();
Widget
getProxyPage
();
void
catchErrorToBugly
(
String
err
);
void
catchErrorToBugly
(
String
err
);
bool
isWithNative
();
}
}
lib/MainRouter/MainRouterImpl.dart
View file @
bc18aa2b
...
@@ -42,4 +42,9 @@ class MainRouterImpl implements MainRouter {
...
@@ -42,4 +42,9 @@ class MainRouterImpl implements MainRouter {
void
catchErrorToBugly
(
String
err
)
{
void
catchErrorToBugly
(
String
err
)
{
MainManager
.
getInstance
().
catchErrorToBugly
(
err
);
MainManager
.
getInstance
().
catchErrorToBugly
(
err
);
}
}
@override
bool
isWithNative
()
{
return
MainManager
.
getInstance
().
isInit
;
}
}
}
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