Commit 64ce8366 authored by 朱璇's avatar 朱璇

销量展示规则

parents b017fb10 2070454b
...@@ -375,7 +375,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> { ...@@ -375,7 +375,7 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Positioned( Positioned(
left: 0, left: 0,
top: 0, top: 0,
width: 95 * sellCount(0, groups.plans[1]), width: 95 * sellCount(1, groups.plans[0]),
height: 7, height: 7,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(3.5), borderRadius: BorderRadius.circular(3.5),
...@@ -447,10 +447,6 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> { ...@@ -447,10 +447,6 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
])); ]));
} }
double starCount() {
return 5.0;
}
double sellCount(int index, Plans anotherPlans) { double sellCount(int index, Plans anotherPlans) {
Groups popularity = _model.detailLive.data.second[0]; Groups popularity = _model.detailLive.data.second[0];
Plans plans = popularity.plans[index]; Plans plans = popularity.plans[index];
......
...@@ -50,6 +50,7 @@ class ProjectDetailsItemView extends StatelessWidget { ...@@ -50,6 +50,7 @@ class ProjectDetailsItemView extends StatelessWidget {
width: double.maxFinite, width: double.maxFinite,
margin: EdgeInsets.only(bottom: 25, left: 15, right: 15), margin: EdgeInsets.only(bottom: 25, left: 15, right: 15),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(right: 25.0), margin: EdgeInsets.only(right: 25.0),
...@@ -57,9 +58,23 @@ class ProjectDetailsItemView extends StatelessWidget { ...@@ -57,9 +58,23 @@ class ProjectDetailsItemView extends StatelessWidget {
width: 78, width: 78,
child: baseText(attrs.attrName, 13, Color(0xFF999999)), child: baseText(attrs.attrName, 13, Color(0xFF999999)),
), ),
Container( Expanded(
alignment: Alignment.centerLeft, child: Container(
child: baseText(attrs.attrValue, 14, Color(0xFF282828))), alignment: Alignment.centerLeft,
child: Text(
attrs.attrValue,
textScaleFactor: 1.0,
softWrap: true,
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 14,
color: Color(0xFF282828),
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400),
)
// baseText(attrs.attrValue, 14, Color(0xFF282828))
),
),
], ],
), ),
); );
......
...@@ -48,7 +48,7 @@ class _ProjectDetailsState extends BaseState<ProjectDetailsPage> { ...@@ -48,7 +48,7 @@ class _ProjectDetailsState extends BaseState<ProjectDetailsPage> {
backClick: () { backClick: () {
Navigator.pop(context); Navigator.pop(context);
}), }),
body: Center( body: Container(
child: getBody(), child: getBody(),
), ),
); );
......
...@@ -9,14 +9,16 @@ import 'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart'; ...@@ -9,14 +9,16 @@ import 'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart';
import 'package:gm_flutter/ClueModel/view/FiveStarView.dart'; import 'package:gm_flutter/ClueModel/view/FiveStarView.dart';
import 'package:gm_flutter/commonModel/base/BaseComponent.dart'; import 'package:gm_flutter/commonModel/base/BaseComponent.dart';
import 'package:gm_flutter/commonModel/base/BaseUtil.dart'; import 'package:gm_flutter/commonModel/base/BaseUtil.dart';
import 'package:gm_flutter/commonModel/util/DartUtil.dart';
import 'package:gm_flutter/main.mark.dart'; import 'package:gm_flutter/main.mark.dart';
class LevelOneItem extends StatelessWidget { class LevelOneItem extends StatelessWidget {
final Cards cards; final Cards cards;
VoidCallback lowPrice; VoidCallback lowPrice;
VoidCallback ask; VoidCallback ask;
VoidCallback compare;
LevelOneItem(this.cards, {this.lowPrice, this.ask}); LevelOneItem(this.cards, {this.lowPrice, this.ask, this.compare});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -335,7 +337,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -335,7 +337,7 @@ class LevelOneItem extends StatelessWidget {
child: baseText("去比较", 13, Color(0xff282828), bold: true), child: baseText("去比较", 13, Color(0xff282828), bold: true),
) )
], ],
); ).gestureDetector(compare);
} }
Widget DiaryItem(BuildContext context) { Widget DiaryItem(BuildContext context) {
......
...@@ -10,6 +10,7 @@ import 'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart'; ...@@ -10,6 +10,7 @@ import 'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart';
import 'package:gm_flutter/commonModel/base/BaseComponent.dart'; import 'package:gm_flutter/commonModel/base/BaseComponent.dart';
import 'package:gm_flutter/commonModel/bean/Pair.dart'; import 'package:gm_flutter/commonModel/bean/Pair.dart';
import 'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart'; import 'package:gm_flutter/commonModel/eventbus/SimpleEventBus.dart';
import 'package:gm_flutter/main.mark.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'LevelOneItem.dart'; import 'LevelOneItem.dart';
...@@ -18,8 +19,11 @@ class LevelOneList extends StatefulWidget { ...@@ -18,8 +19,11 @@ class LevelOneList extends StatefulWidget {
double topHeight; double topHeight;
int planId; int planId;
String tabName; String tabName;
String pageName;
int index;
LevelOneList(this.planId, this.tabName, this.topHeight); LevelOneList(
this.index, this.pageName, this.planId, this.tabName, this.topHeight);
@override @override
State<StatefulWidget> createState() => LevelOneListState(); State<StatefulWidget> createState() => LevelOneListState();
...@@ -56,11 +60,8 @@ class LevelOneListState extends State<LevelOneList> ...@@ -56,11 +60,8 @@ class LevelOneListState extends State<LevelOneList>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return baseStateView( return baseStateView(MediaQuery.of(context).size.width,
MediaQuery.of(context).size.width, MediaQuery.of(context).size.height, _model.stateLive, pages(), () {
MediaQuery.of(context).size.height ,
_model.stateLive,
pages(), () {
_model.refreshView(true); _model.refreshView(true);
}, paddingTop: widget.topHeight); }, paddingTop: widget.topHeight);
} }
...@@ -98,6 +99,7 @@ class LevelOneListState extends State<LevelOneList> ...@@ -98,6 +99,7 @@ class LevelOneListState extends State<LevelOneList>
lowPrice: () { lowPrice: () {
DiscussLowPricePopView.showPopView( DiscussLowPricePopView.showPopView(
context, context,
widget.pageName,
"${widget.planId}", "${widget.planId}",
_model.data[index].cardType == "hospital" _model.data[index].cardType == "hospital"
? _model.data[index].hospital ? _model.data[index].hospital
...@@ -106,6 +108,18 @@ class LevelOneListState extends State<LevelOneList> ...@@ -106,6 +108,18 @@ class LevelOneListState extends State<LevelOneList>
? _model.data[index].doctor ? _model.data[index].doctor
: ""); : "");
}, },
compare: () {
RouterCenterImpl().findMainRouter().jumpPage(
context,
widget.index == 0
? "level_one_plan_compare"
: "level_two_plan_compare",
{
"planId": widget.planId,
"planType": widget.index == 0 ? 1 : 2
},
false);
},
); );
}, },
childCount: _model.data.length + 1, childCount: _model.data.length + 1,
......
...@@ -24,6 +24,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart'; ...@@ -24,6 +24,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
class LevelOnePage extends StatefulWidget { class LevelOnePage extends StatefulWidget {
int planId = 10; int planId = 10;
Map<String, dynamic> params; Map<String, dynamic> params;
final String PAGE_NAME = "level_one_plan_detail";
LevelOnePage(this.params) { LevelOnePage(this.params) {
this.planId = params["planId"]; this.planId = params["planId"];
...@@ -172,8 +173,8 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -172,8 +173,8 @@ class LevelOneState extends BaseState<LevelOnePage>
for (int i = 0; i < _model.tabsList.length; i++) { for (int i = 0; i < _model.tabsList.length; i++) {
list.add(extend.NestedScrollViewInnerScrollPositionKeyWidget( list.add(extend.NestedScrollViewInnerScrollPositionKeyWidget(
Key("Tab${i}"), Key("Tab${i}"),
LevelOneList(widget.planId, _model.tabsList[i].tabType, LevelOneList(0, widget.PAGE_NAME, widget.planId,
kToolbarHeight + stateBarHeight))); _model.tabsList[i].tabType, kToolbarHeight + stateBarHeight)));
} }
final double statusBarHeight = MediaQuery.of(context).padding.top; final double statusBarHeight = MediaQuery.of(context).padding.top;
final double pinnedHeaderHeight = statusBarHeight + kToolbarHeight; final double pinnedHeaderHeight = statusBarHeight + kToolbarHeight;
...@@ -319,8 +320,36 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -319,8 +320,36 @@ class LevelOneState extends BaseState<LevelOnePage>
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
baseText(element.attrName, 14, Color(0xff282828), bold: true), Container(
baseText(element.attrValue, 11, Color(0xff999999)), margin: EdgeInsets.only(left: 2, right: 2),
child: Text(
element.attrName,
textScaleFactor: 1.0,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 14,
color: Color(0xff282828),
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400),
),
),
Container(
margin: EdgeInsets.only(left: 2, right: 2),
child: Text(
element.attrValue,
textScaleFactor: 1.0,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 11,
color: Color(0xff999999),
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400),
),
)
], ],
), ),
), ),
...@@ -361,9 +390,11 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -361,9 +390,11 @@ class LevelOneState extends BaseState<LevelOnePage>
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
RouterCenterImpl() RouterCenterImpl().findMainRouter().jumpPage(
.findMainRouter() context,
.jumpPage(context, "", {}, false); "level_one_plan_instruction",
{"planId": widget.planId},
false);
}, },
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: baseText("了解更多", 12, Color(0xff3FB5AF)), child: baseText("了解更多", 12, Color(0xff3FB5AF)),
...@@ -374,14 +405,48 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -374,14 +405,48 @@ class LevelOneState extends BaseState<LevelOnePage>
if (_model.planoverItem != null) { if (_model.planoverItem != null) {
_model.planoverItem.explanationAttrs.forEach((element) { _model.planoverItem.explanationAttrs.forEach((element) {
list.add(Container( list.add(Container(
height: 28, margin: EdgeInsets.only(bottom: 15),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
baseText(element.attrName, 13, Color(0xff999999)),
Container( Container(
margin: EdgeInsets.only(left: 12), constraints: BoxConstraints(
child: baseText(element.attrValue, 13, Color(0xff666666)), maxWidth: 52,
),
child: Text(
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),
)
),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 12),
child:
Text(
element.attrValue,
textScaleFactor: 1.0,
softWrap: false,
overflow: TextOverflow.ellipsis,
style: TextStyle(
decoration: TextDecoration.none,
fontSize: 13,
color: Color(0xff666666),
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400),
),
// baseText(element.attrValue, 13, Color(0xff666666)
// ),
),
) )
], ],
), ),
)); ));
......
...@@ -23,6 +23,8 @@ import 'package:gm_flutter/main.mark.dart'; ...@@ -23,6 +23,8 @@ import 'package:gm_flutter/main.mark.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
class LevelTwoPage extends StatefulWidget { class LevelTwoPage extends StatefulWidget {
final String PAGE_NAME = "level_two_plan_deatil";
LevelTwoPage(Map<String, dynamic> params) {} LevelTwoPage(Map<String, dynamic> params) {}
@override @override
...@@ -171,7 +173,7 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -171,7 +173,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
for (int i = 0; i < _model.tabsList.length; i++) { for (int i = 0; i < _model.tabsList.length; i++) {
list.add(extend.NestedScrollViewInnerScrollPositionKeyWidget( list.add(extend.NestedScrollViewInnerScrollPositionKeyWidget(
Key("Tab${i}"), Key("Tab${i}"),
LevelOneList( LevelOneList(1,widget.PAGE_NAME,
planId, _model.tabsList[i].tabType, kToolbarHeight + d))); planId, _model.tabsList[i].tabType, kToolbarHeight + d)));
} }
final double statusBarHeight = MediaQuery.of(context).padding.top; final double statusBarHeight = MediaQuery.of(context).padding.top;
...@@ -339,14 +341,11 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -339,14 +341,11 @@ class LevelTwoState extends BaseState<LevelTwoPage>
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
//TODO // RouterCenterImpl().findMainRouter().jumpPage(
// context,
Map<String, dynamic> map = {}; // "level_one_plan_instruction",
map["page_name"] = "plan_home"; // {"planId": widget.planId},
map["referrer_link"] = []; // false);
RouterCenterImpl()
.findMainRouter()
.buriedEvent("on_click_navbar_search", map);
}, },
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: baseText("了解更多", 12, Color(0xff3FB5AF)), child: baseText("了解更多", 12, Color(0xff3FB5AF)),
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
class DiscussLowPriceModelBean { class DiscussLowPriceModelBean {
int error; int error;
String message; String message;
Null extra; Map extra;
Null errorExtra; Map errorExtra;
UserType userType; UserType userType;
Data data; Data data;
......
...@@ -41,6 +41,8 @@ class JumpManager { ...@@ -41,6 +41,8 @@ class JumpManager {
RouterCenterImpl().findClueRouter().getLevelTwoPage(params), RouterCenterImpl().findClueRouter().getLevelTwoPage(params),
"flutter://level_one_plan_instruction": "flutter://level_one_plan_instruction":
RouterCenterImpl().findClueRouter().getProjectDetailsPage(params), RouterCenterImpl().findClueRouter().getProjectDetailsPage(params),
"flutter://level_two_plan_instruction":
RouterCenterImpl().findClueRouter().getProjectDetailsPage(params),
"flutter://level_one_plan_compare": "flutter://level_one_plan_compare":
RouterCenterImpl().findClueRouter().getPlansCompareFeed(params), RouterCenterImpl().findClueRouter().getPlansCompareFeed(params),
"flutter://level_two_plan_compare": "flutter://level_two_plan_compare":
......
...@@ -485,9 +485,11 @@ Widget baseSliverBack(VoidCallback tap) { ...@@ -485,9 +485,11 @@ Widget baseSliverBack(VoidCallback tap) {
decoration: decoration:
BoxDecoration(color: Color(0x99FFFFFF), shape: BoxShape.circle), BoxDecoration(color: Color(0x99FFFFFF), shape: BoxShape.circle),
alignment: Alignment.center, alignment: Alignment.center,
child: Container( child: Hero(
child: Image.asset("assets/left_arrow.png"), tag: "left_arrow",
), child: Container(
child: Image.asset("assets/left_arrow.png"),
)),
)), )),
); );
} }
......
...@@ -70,6 +70,8 @@ class MyApp extends State<MyAppWidget> { ...@@ -70,6 +70,8 @@ class MyApp extends State<MyAppWidget> {
RouterCenterImpl().findClueRouter().getProjectDetailsPage(params), RouterCenterImpl().findClueRouter().getProjectDetailsPage(params),
'level_one_plan_compare': (pageName, params, _) => 'level_one_plan_compare': (pageName, params, _) =>
RouterCenterImpl().findClueRouter().getPlansCompareFeed(params), RouterCenterImpl().findClueRouter().getPlansCompareFeed(params),
'level_two_plan_compare': (pageName, params, _) =>
RouterCenterImpl().findClueRouter().getPlansCompareFeed(params),
'level_one_plan_compare_detail': (pageName, params, _) => 'level_one_plan_compare_detail': (pageName, params, _) =>
RouterCenterImpl().findClueRouter().getPlanCompareDetailPage(params), RouterCenterImpl().findClueRouter().getPlanCompareDetailPage(params),
'level_two_plan_compare_deatil': (pageName, params, _) => 'level_two_plan_compare_deatil': (pageName, params, _) =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment