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
966fb05c
Commit
966fb05c
authored
Jul 13, 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
1d94117c
ef179381
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
226 additions
and
196 deletions
+226
-196
PlanCompareDetailPage.dart
...ueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
+5
-3
LevelOnePage.dart
lib/ClueModel/page/levelOne/LevelOnePage.dart
+75
-77
LevelTwoPage.dart
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
+77
-74
MechanismBoxPage.dart
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
+8
-10
MechanismModel.dart
lib/ClueModel/page/mechanismBox/MechanismModel.dart
+0
-1
PlanModel.dart
lib/ClueModel/page/plan/PlanModel.dart
+19
-4
PlanPage.dart
lib/ClueModel/page/plan/PlanPage.dart
+0
-2
TopList.dart
lib/ClueModel/page/top/TopList.dart
+0
-2
TopListModel.dart
lib/ClueModel/page/top/TopListModel.dart
+12
-1
TopPage.dart
lib/ClueModel/page/top/TopPage.dart
+3
-4
BaseComponent.dart
lib/commonModel/base/BaseComponent.dart
+24
-15
Api.dart
lib/commonModel/net/Api.dart
+2
-2
updateAar.sh
updateAar.sh
+1
-1
No files found.
lib/ClueModel/page/PlanCompareDetail/PlanCompareDetailPage.dart
View file @
966fb05c
...
...
@@ -38,7 +38,6 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
@override
void
initState
()
{
// DioUtil.getInstance().setProxy("172.30.9.128");
super
.
initState
();
_model
.
init
(
widget
.
_planIds
);
}
...
...
@@ -472,7 +471,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
flex:
1
,
child:
baseText
(
left
.
empty
()
?
"暂无"
:
left
,
12
,
isName
?
Color
(
0xff666666
)
:
Color
(
0xff3FB5AF
),
bold:
isName
?
false
:
true
,
maxLines:
100
,
isWarp:
true
,
textAlign:
TextAlign
.
end
),
bold:
isName
?
false
:
true
,
maxLines:
100
,
isWarp:
true
,
textAlign:
TextAlign
.
end
),
),
Container
(
width:
40
,
...
...
@@ -481,7 +483,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
flex:
1
,
child:
baseText
(
right
.
empty
()
?
"暂无"
:
right
,
12
,
isName
?
Color
(
0xff666666
)
:
Color
(
0xffF25874
),
bold:
isName
?
false
:
true
,
bold:
isName
?
false
:
true
,
maxLines:
100
,
isWarp:
true
,
textAlign:
TextAlign
.
start
))
...
...
lib/ClueModel/page/levelOne/LevelOnePage.dart
View file @
966fb05c
...
...
@@ -64,7 +64,6 @@ class LevelOneState extends BaseState<LevelOnePage>
@override
void
initState
()
{
// DioUtil.getInstance().setProxy("172.30.8.245");
super
.
initState
();
_model
.
plan_id
=
widget
.
planId
;
_model
.
init
(()
{
...
...
@@ -255,9 +254,7 @@ class LevelOneState extends BaseState<LevelOnePage>
List
<
Widget
>
getTabs
()
{
List
<
Widget
>
list
=
[];
for
(
int
i
=
0
;
i
<
_model
.
tabsList
.
length
;
i
++)
{
list
.
add
(
baseTabBarItem
(
_model
.
tabsList
[
i
].
name
,
leftPadding:
i
==
0
?
21.5
:
14
,
rightPadding:
i
==
_model
.
tabsList
.
length
-
1
?
21.5
:
14
));
list
.
add
(
baseTabBarItem
(
_model
.
tabsList
[
i
].
name
));
}
return
list
;
}
...
...
@@ -441,32 +438,29 @@ class LevelOneState extends BaseState<LevelOnePage>
));
if
(
_model
.
planoverItem
!=
null
)
{
_model
.
planoverItem
.
explanationAttrs
.
forEach
((
element
)
{
List
<
Widget
>
textList
=
[];
if
(
element
.
attrName
.
length
<
4
)
{
for
(
int
i
=
0
;
i
<
element
.
attrName
.
length
;
i
++)
{
textList
.
add
(
baseText
(
element
.
attrName
.
substring
(
i
,
i
+
1
),
13
,
Color
(
0xff999999
)));
if
(
i
<
element
.
attrName
.
length
-
1
)
{
textList
.
add
(
Expanded
(
child:
Container
(),
));
}
}
}
list
.
add
(
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
child:
Row
(
children:
<
Widget
>[
Container
(
width:
55
,
// constraints: BoxConstraints(
// maxWidth: 55,
// minWidth: 50
// ),
child:
Text
(
element
.
attrName
.
length
==
2
?
"
${element.attrName.substring(0, 1)}
${element.attrName.substring(1, 2)}
"
:
element
.
attrName
,
textScaleFactor:
1.0
,
softWrap:
true
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
textAlign:
TextAlign
.
start
,
style:
TextStyle
(
decoration:
TextDecoration
.
none
,
fontSize:
13
,
color:
Color
(
0xff999999
),
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
),
)),
width:
52
,
child:
element
.
attrName
.
length
<
4
?
Row
(
children:
textList
,
)
:
baseText
(
element
.
attrName
,
13
,
Color
(
0xff999999
))),
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
12
),
...
...
@@ -482,8 +476,6 @@ class LevelOneState extends BaseState<LevelOnePage>
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
),
),
// baseText(element.attrValue, 13, Color(0xff666666)
// ),
),
)
],
...
...
@@ -522,7 +514,7 @@ class LevelOneState extends BaseState<LevelOnePage>
.
jumpPage
(
context
,
"level_one_plan_compare"
,
map
,
false
);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
21
),
margin:
EdgeInsets
.
only
(
left:
21
,
right:
20
),
width:
30
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
...
...
@@ -541,56 +533,62 @@ class LevelOneState extends BaseState<LevelOnePage>
),
),
Expanded
(
child:
Container
(),
child:
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
CacheManager
.
getInstance
()
.
get
(
MEMORY_CACHE
)
.
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
BaseBottomPicker
()
..
setPicker
(
MechanismBox
(
widget
.
planId
,
widget
.
PAGE_NAME
))
..
show
(
context
);
},
child:
Container
(
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xff51CDC7
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"咨询"
,
14
,
Colors
.
white
,
bold:
true
),
))),
Container
(
width:
15
,
),
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
BaseBottomPicker
()
..
setPicker
(
MechanismBox
(
widget
.
planId
,
widget
.
PAGE_NAME
))
..
show
(
context
);
},
child:
Container
(
width:
ScreenUtil
().
setWidth
(
137
),
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xff51CDC7
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"咨询"
,
14
,
Colors
.
white
,
bold:
true
),
)),
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
DiscussLowPricePopView
.
showPopView
(
context
,
widget
.
PAGE_NAME
,
"
${widget.planId}
"
,
""
,
""
);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
width:
ScreenUtil
().
setWidth
(
137
),
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xffF96079
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"获取底价"
,
14
,
Colors
.
white
,
bold:
true
),
)),
Expanded
(
child:
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
CacheManager
.
getInstance
()
.
get
(
MEMORY_CACHE
)
.
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
DiscussLowPricePopView
.
showPopView
(
context
,
widget
.
PAGE_NAME
,
"
${widget.planId}
"
,
""
,
""
);
},
child:
Container
(
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xffF96079
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"获取底价"
,
14
,
Colors
.
white
,
bold:
true
),
))),
Container
(
width:
15
,
)
],
),
);
...
...
lib/ClueModel/page/levelTwo/LevelTwoPage.dart
View file @
966fb05c
...
...
@@ -3,7 +3,6 @@
* @date 2020/6/29
**/
import
'dart:async'
;
import
'dart:math'
;
import
'dart:ui'
;
import
'package:cached_network_image/cached_network_image.dart'
;
...
...
@@ -25,7 +24,6 @@ import 'package:gm_flutter/commonModel/base/BaseState.dart';
import
'package:gm_flutter/commonModel/bean/Pair.dart'
;
import
'package:gm_flutter/commonModel/cache/CacheManager.dart'
;
import
'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart'
;
import
'package:gm_flutter/commonModel/net/DioUtil.dart'
;
import
'package:gm_flutter/commonModel/view/baseRefreshIndicator.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'package:pull_to_refresh/pull_to_refresh.dart'
;
...
...
@@ -58,7 +56,6 @@ class LevelTwoState extends BaseState<LevelTwoPage>
@override
void
initState
()
{
// DioUtil.getInstance().setProxy('172.30.9.253');
super
.
initState
();
_model
.
plan_id
=
widget
.
planId
;
_model
.
init
(()
{
...
...
@@ -255,9 +252,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
List
<
Widget
>
getTabs
()
{
List
<
Widget
>
list
=
[];
for
(
int
i
=
0
;
i
<
_model
.
tabsList
.
length
;
i
++)
{
list
.
add
(
baseTabBarItem
(
_model
.
tabsList
[
i
].
name
,
leftPadding:
i
==
0
?
21.5
:
14
,
rightPadding:
i
==
_model
.
tabsList
.
length
-
1
?
21.5
:
14
));
list
.
add
(
baseTabBarItem
(
_model
.
tabsList
[
i
].
name
));
}
return
list
;
}
...
...
@@ -384,7 +379,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
List
<
Widget
>
list
=
[];
list
.
add
(
Row
(
children:
<
Widget
>[
baseText
(
"项目说明"
,
15
,
Color
(
0xff282828
),
bold:
true
),
baseText
(
"项目说明"
,
15
,
Color
(
0xff282828
),
bold:
true
),
Expanded
(
child:
Container
(),
),
...
...
@@ -409,27 +404,29 @@ class LevelTwoState extends BaseState<LevelTwoPage>
));
if
(
_model
.
planoverItem
!=
null
)
{
_model
.
planoverItem
.
explanationAttrs
.
forEach
((
element
)
{
List
<
Widget
>
textList
=
[];
if
(
element
.
attrName
.
length
<
4
)
{
for
(
int
i
=
0
;
i
<
element
.
attrName
.
length
;
i
++)
{
textList
.
add
(
baseText
(
element
.
attrName
.
substring
(
i
,
i
+
1
),
13
,
Color
(
0xff999999
)));
if
(
i
<
element
.
attrName
.
length
-
1
)
{
textList
.
add
(
Expanded
(
child:
Container
(),
));
}
}
}
list
.
add
(
Container
(
margin:
EdgeInsets
.
only
(
bottom:
10
),
child:
Row
(
children:
<
Widget
>[
Container
(
width:
55
,
child:
Text
(
element
.
attrName
.
length
==
2
?
"
${element.attrName.substring(0, 1)}
${element.attrName.substring(1, 2)}
"
:
element
.
attrName
,
textScaleFactor:
1.0
,
softWrap:
true
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
decoration:
TextDecoration
.
none
,
fontSize:
13
,
color:
Color
(
0xff999999
),
fontStyle:
FontStyle
.
normal
,
fontWeight:
FontWeight
.
w400
),
)),
width:
52
,
child:
element
.
attrName
.
length
<
4
?
Row
(
children:
textList
,
)
:
baseText
(
element
.
attrName
,
13
,
Color
(
0xff999999
))),
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
12
),
...
...
@@ -486,7 +483,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
.
jumpPage
(
context
,
"level_two_plan_compare"
,
map
,
false
);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
21
),
margin:
EdgeInsets
.
only
(
left:
21
,
right:
20
),
width:
30
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
...
...
@@ -504,58 +501,64 @@ class LevelTwoState extends BaseState<LevelTwoPage>
),
),
),
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
BaseBottomPicker
()
..
setPicker
(
MechanismBox
(
widget
.
planId
,
widget
.
PAGE_NAME
))
..
show
(
context
);
},
child:
Container
(
width:
ScreenUtil
().
setWidth
(
137
),
margin:
EdgeInsets
.
only
(
left:
20
),
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xff51CDC7
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"咨询"
,
14
,
Colors
.
white
,
bold:
true
),
)),
Expanded
(
child:
Container
(),
child:
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
CacheManager
.
getInstance
()
.
get
(
MEMORY_CACHE
)
.
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
BaseBottomPicker
()
..
setPicker
(
MechanismBox
(
widget
.
planId
,
widget
.
PAGE_NAME
))
..
show
(
context
);
},
child:
Container
(
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xff51CDC7
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"咨询"
,
14
,
Colors
.
white
,
bold:
true
),
)),
),
Container
(
width:
15
,
),
Expanded
(
child:
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
CacheManager
.
getInstance
()
.
get
(
MEMORY_CACHE
)
.
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
DiscussLowPricePopView
.
showPopView
(
context
,
widget
.
PAGE_NAME
,
"
${widget.planId}
"
,
""
,
""
);
},
child:
Container
(
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xffF96079
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"获取底价"
,
14
,
Colors
.
white
,
bold:
true
),
))),
Container
(
width:
15
,
),
GestureDetector
(
behavior:
HitTestBehavior
.
opaque
,
onTap:
()
{
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
USER_ID
)
==
null
&&
RouterCenterImpl
().
findMainRouter
().
isWithNative
())
{
RouterCenterImpl
()
.
findMainRouter
()
.
jumpPage
(
context
,
"show_login"
,
null
,
true
);
return
;
}
DiscussLowPricePopView
.
showPopView
(
context
,
widget
.
PAGE_NAME
,
"
${widget.planId}
"
,
""
,
""
);
},
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
width:
ScreenUtil
().
setWidth
(
137
),
height:
40
,
decoration:
BoxDecoration
(
color:
Color
(
0xffF96079
),
borderRadius:
BorderRadius
.
circular
(
20
)),
alignment:
Alignment
.
center
,
child:
baseText
(
"获取底价"
,
14
,
Colors
.
white
,
bold:
true
),
)),
],
),
);
...
...
lib/ClueModel/page/mechanismBox/MechanismBoxPage.dart
View file @
966fb05c
...
...
@@ -63,7 +63,7 @@ class MechanismBox implements IBottomPicker {
color:
Colors
.
white
,
),
width:
mq
.
size
.
width
,
height:
mq
.
size
.
height
-
140
,
height:
mq
.
size
.
height
-
mq
.
size
.
height
/
5
,
child:
StreamBuilder
(
stream:
_model
.
stateLive
.
stream
,
initialData:
_model
.
stateLive
.
data
??
LOADING
,
...
...
@@ -93,6 +93,7 @@ class MechanismBox implements IBottomPicker {
}
setupHome
(
mq
,
keyHeight
,
BuildContext
context
)
{
var
heigth
=
mq
.
size
.
height
-
(
mq
.
size
.
height
/
5
)
-
146
-
keyHeight
;
return
Column
(
mainAxisSize:
MainAxisSize
.
max
,
children:
<
Widget
>[
...
...
@@ -104,24 +105,22 @@ class MechanismBox implements IBottomPicker {
if
(
data
.
data
==
LOADING
)
{
return
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
mq
.
size
.
height
-
140
-
96
-
50
-
keyHeight
,
height:
heigth
,
child:
loadingItem
(),
);
}
if
(
data
.
data
==
FAIL
)
{
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
mq
.
size
.
height
-
140
-
96
-
50
-
keyHeight
,
()
{
return
errorItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
heigth
,
()
{
_model
.
refreshView
(
true
);
});
}
if
(
data
.
data
==
EMPTY
)
{
return
emptyItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
mq
.
size
.
height
-
140
-
96
-
50
-
keyHeight
)
return
emptyItem
(
MediaQuery
.
of
(
context
).
size
.
width
,
heigth
)
.
gestureDetector
(()
{
focusNode
.
unfocus
();
});
}
return
mechanismList
(
mq
,
keyHeight
);
return
mechanismList
(
mq
,
heigth
);
},
),
bottomMessage
(
context
)
...
...
@@ -165,9 +164,9 @@ class MechanismBox implements IBottomPicker {
}
// 机构列表
Widget
mechanismList
(
mq
,
keyHeight
)
{
Widget
mechanismList
(
mq
,
heigth
)
{
return
Container
(
height:
mq
.
size
.
height
-
286
-
keyHeight
,
height:
heigth
,
width:
mq
.
size
.
width
,
padding:
EdgeInsets
.
only
(
left:
15
,
right:
15
),
child:
baseRefreshView
(
refreshController
,
()
{},
null
,
null
,
...
...
@@ -383,7 +382,6 @@ class MechanismBox implements IBottomPicker {
focusNode:
focusNode
,
textInputAction:
TextInputAction
.
send
,
onSubmitted:
(
txt
)
{
print
(
_model
.
hospital_ids
.
toList
());
if
(
txt
.
isNotEmpty
)
{
_model
.
sendMessage
(
_model
.
doctor_ids
.
join
(
','
),
...
...
lib/ClueModel/page/mechanismBox/MechanismModel.dart
View file @
966fb05c
...
...
@@ -102,7 +102,6 @@ class MechanismModel extends BaseModel {
.
sendMessage
(
DioUtil
.
getInstance
().
getDio
(),
doctor_ids
,
hospital_ids
,
question
,
plan_id
)
.
listen
((
event
)
{
print
(
event
.
toJson
());
if
(
event
.
error
==
0
)
{
func
(
0
);
messageLive
.
notifyView
(
event
.
data
.
success
);
...
...
lib/ClueModel/page/plan/PlanModel.dart
View file @
966fb05c
...
...
@@ -101,7 +101,8 @@ class PlanModel extends BaseModel {
PlanModelInstance
.
getInstance
().
max_price
=
max_price
;
low
=
0
;
projectSelectIndex
=
0
;
PlanModelInstance
.
getInstance
().
projectSelectIndex
=
projectSelectIndex
;
PlanModelInstance
.
getInstance
().
projectSelectIndex
=
projectSelectIndex
;
high
=
20100
;
sortPos
=
0
;
picLive
.
notifyView
(
event
.
data
.
ranks
);
...
...
@@ -114,8 +115,10 @@ class PlanModel extends BaseModel {
PlanModelInstance
.
getInstance
().
high
=
high
;
PlanModelInstance
.
getInstance
().
sortPos
=
sortPos
;
if
(
call
!=
null
)
{
SimpleEventBus
.
instance
().
notifyListener
(
"FilterViewState"
,
"reset"
);
SimpleEventBus
.
instance
().
notifyListener
(
"ProjectViewState"
,
"reset"
);
SimpleEventBus
.
instance
()
.
notifyListener
(
"FilterViewState"
,
"reset"
);
SimpleEventBus
.
instance
()
.
notifyListener
(
"ProjectViewState"
,
"reset"
);
call
();
}
refreshFeed
(
true
,
needCache:
needCache
);
...
...
@@ -182,6 +185,19 @@ class PlanModel extends BaseModel {
feedsLive
.
notifyView
(
Pair
(
ENDLOADING
,
[]));
}
}
else
{
//去重复
event
.
data
.
plans
.
forEach
((
element
)
{
bool
haveIt
=
false
;
for
(
int
i
=
0
;
i
<
feedDatas
.
length
;
i
++)
{
if
(
feedDatas
[
i
].
id
==
element
.
id
)
{
haveIt
=
true
;
break
;
}
}
if
(!
haveIt
)
{
feedDatas
.
add
(
element
);
}
});
feedDatas
.
addAll
(
event
.
data
.
plans
);
feedsLive
.
notifyView
(
Pair
(
ENDLOADING
,
feedDatas
));
}
...
...
@@ -216,7 +232,6 @@ class PlanModel extends BaseModel {
backLive
.
dispost
();
feedsLive
.
dispost
();
showTab
.
dispost
();
print
(
"LSY PLAN DISPOSE"
);
}
void
backProgress
(
double
pro
,
int
index
)
{
...
...
lib/ClueModel/page/plan/PlanPage.dart
View file @
966fb05c
...
...
@@ -63,8 +63,6 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override
void
initState
()
{
print
(
"LSY PLAN INIT "
);
// DioUtil.getInstance().setProxy("172.30.9.128");
_model
.
init
(
needCache:
true
);
super
.
initState
();
planBarView
=
...
...
lib/ClueModel/page/top/TopList.dart
View file @
966fb05c
...
...
@@ -40,7 +40,6 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
_model
.
getData
(
true
);
};
SimpleEventBus
.
instance
().
resignEvent
(
"TopList"
,
refresh
);
print
(
"
${this}
INIT"
);
}
@override
...
...
@@ -48,7 +47,6 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
refreshController
.
dispose
();
_model
.
dispose
();
SimpleEventBus
.
instance
().
unResignEvent
(
"TopList"
,
refresh
);
print
(
"
${this}
QUIT"
);
super
.
dispose
();
}
...
...
lib/ClueModel/page/top/TopListModel.dart
View file @
966fb05c
...
...
@@ -44,8 +44,19 @@ class TopListModel extends BaseModel {
datasLive
.
notifyView
([]);
}
}
else
{
event
.
data
.
plans
.
forEach
((
element
)
{
bool
haveIt
=
false
;
for
(
int
i
=
0
;
i
<
datas
.
length
;
i
++)
{
if
(
datas
[
i
].
id
==
element
.
id
)
{
haveIt
=
true
;
break
;
}
}
if
(!
haveIt
)
{
datas
.
add
(
element
);
}
});
stateLive
.
notifyView
(
ENDLOADING
);
datas
.
addAll
(
event
.
data
.
plans
);
datasLive
.
notifyView
(
datas
);
}
}
else
{
...
...
lib/ClueModel/page/top/TopPage.dart
View file @
966fb05c
...
...
@@ -31,7 +31,6 @@ class TopPage extends StatefulWidget {
String
title
;
TopPage
(
Map
<
String
,
dynamic
>
map
)
{
print
(
"LSY
${map.toString()}
"
);
this
.
rank_type
=
map
[
"rank_type"
];
this
.
id
=
map
[
"id"
];
this
.
title
=
map
[
"title"
];
...
...
@@ -49,7 +48,6 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
@override
void
initState
()
{
// DioUtil.getInstance().setProxy("172.30.8.245");
_model
.
rank_type
=
widget
.
rank_type
;
init
();
super
.
initState
();
...
...
@@ -84,7 +82,7 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
Widget
buildItem
(
BuildContext
context
)
{
return
Scaffold
(
body:
SafeArea
(
top:
false
,
top:
false
,
child:
baseStateView
(
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
height
,
...
...
@@ -200,7 +198,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
for
(
int
i
=
0
;
i
<
_model
.
tabs
.
length
;
i
++)
{
list
.
add
(
baseTabBarItem
(
_model
.
tabs
[
i
].
name
,
leftPadding:
i
==
0
?
21.5
:
14
,
rightPadding:
i
==
_model
.
tabs
.
length
-
1
?
21.5
:
14
));
rightPadding:
i
==
_model
.
tabs
.
length
-
1
?
21.5
:
14
,
isScroll:
true
));
}
return
list
;
}
...
...
lib/commonModel/base/BaseComponent.dart
View file @
966fb05c
...
...
@@ -457,23 +457,32 @@ Widget baseTabBar(
}
Widget
baseTabBarItem
(
String
text
,
{
double
leftPadding
,
double
rightPadding
,
double
wantWidth
})
{
{
double
leftPadding
,
double
rightPadding
,
double
wantWidth
,
bool
isScroll
=
false
})
{
leftPadding
=
leftPadding
??
14.0
;
rightPadding
=
rightPadding
??
14.0
;
return
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Container
(
width:
leftPadding
,
),
Tab
(
text:
text
,
),
Container
(
width:
rightPadding
,
)
],
);
return
isScroll
?
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Container
(
width:
leftPadding
,
),
Tab
(
text:
text
,
),
Container
(
width:
rightPadding
,
)
],
)
:
Center
(
child:
Tab
(
text:
text
,
),
);
// Container(
// height: 40.0,
// width: wantWidth ?? width,
...
...
lib/commonModel/net/Api.dart
View file @
966fb05c
...
...
@@ -13,7 +13,7 @@ import 'DioUtil.dart';
/**
* 生产环境
*/
const
String
APP_HOST_RELEASE
=
"http
://backend.paas-merchant.env
"
;
const
String
APP_HOST_RELEASE
=
"http
s://backend.igengmei.com
"
;
/**
* 测试环境
*/
...
...
@@ -26,7 +26,7 @@ const String APP_HOST_DEBUG = "http://backend.paas-merchant.env";
/**
* 开发环境
*/
const
String
APP_HOST_DEV
=
"https://
x6cgr5y5-gengmei.mock.coding.io
"
;
const
String
APP_HOST_DEV
=
"https://
backend.igengmei.com
"
;
class
Api
{
static
String
BUILD_CONFIG
;
...
...
updateAar.sh
View file @
966fb05c
...
...
@@ -18,6 +18,6 @@ flutter build aar --release --target-platform android-arm
#rm -rf /Users/apple/lsy/gengmei_android/gm-flutter/libs/flutterApp.aar
#cp -r ${projectDir}/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/zcc/Downloads/gm-flutter/libs/flutterApp.aar
cp
-r
${
projectDir
}
/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/apple/lsy/gengmei_android/libs/flutterApp.aar
cp
-r
${
projectDir
}
/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/apple/lsy/gengmei_android/
gm-flutter/
libs/flutterApp.aar
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