Commit db521a6e authored by 杜欣's avatar 杜欣

Merge branch 'test' into featrue/duxin

parents 148509b6 a8635992
...@@ -51,13 +51,16 @@ class _PopView implements ICenterPicker { ...@@ -51,13 +51,16 @@ class _PopView implements ICenterPicker {
RouterCenterImpl() RouterCenterImpl()
.findMainRouter() .findMainRouter()
.buriedEvent("popup_view", phobosData()); .buriedEvent("popup_view", phobosData());
return Opacity( return Opacity(
opacity: alp / 255.0, opacity: alp / 255.0,
child: Container( child: Container(
color: Colors.red,
width: contentWidth, width: contentWidth,
height: _model.popViewLive.data.second.title.length > 13 height: _model.popViewLive.data.second.title.length > 13
? 357.5 ? 367.5
: 305.5, : 310.5,
child: Stack( child: Stack(
alignment: AlignmentDirectional.topCenter, alignment: AlignmentDirectional.topCenter,
children: <Widget>[ children: <Widget>[
...@@ -68,8 +71,8 @@ class _PopView implements ICenterPicker { ...@@ -68,8 +71,8 @@ class _PopView implements ICenterPicker {
Positioned( Positioned(
top: 62.5, top: 62.5,
right: 20, right: 20,
width: 13.5, width: 15,
height: 13.5, height: 14,
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
dismissCallback(); dismissCallback();
...@@ -83,7 +86,7 @@ class _PopView implements ICenterPicker { ...@@ -83,7 +86,7 @@ class _PopView implements ICenterPicker {
decoration: BoxDecoration(boxShadow: [ decoration: BoxDecoration(boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black12, color: Colors.black12,
offset: Offset(0.0, 3.0), offset: Offset(0.0, 1.0),
blurRadius: 15.0, blurRadius: 15.0,
spreadRadius: 1.0) spreadRadius: 1.0)
], shape: BoxShape.circle), ], shape: BoxShape.circle),
...@@ -110,7 +113,7 @@ class _PopView implements ICenterPicker { ...@@ -110,7 +113,7 @@ class _PopView implements ICenterPicker {
return Container( return Container(
width: contentWidth, width: contentWidth,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(10),
color: Colors.white, color: Colors.white,
), ),
child: Container( child: Container(
...@@ -152,8 +155,9 @@ class _PopView implements ICenterPicker { ...@@ -152,8 +155,9 @@ class _PopView implements ICenterPicker {
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 25), margin: EdgeInsets.only(bottom: 25),
child: baseText( child: baseText(
_model.popViewLive.data.second.title, 18, Color(0xff464646), "${_model.popViewLive.data.second.title}", 18, Color(0xff464646),
bold: true, textAlign: TextAlign.center)), bold: true, textAlign: TextAlign.center,
maxLines: 2)),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7), borderRadius: BorderRadius.circular(7),
......
...@@ -34,7 +34,7 @@ class _PlansCompareFeedItemViewState ...@@ -34,7 +34,7 @@ class _PlansCompareFeedItemViewState
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
getItem(), getItem(),
Divider(height: 0.5, color: Color(0x99979797)) Divider(height: 0.5, color: Color(0xFFE5E5E5))
], ],
)); ));
} }
...@@ -50,7 +50,7 @@ class _PlansCompareFeedItemViewState ...@@ -50,7 +50,7 @@ class _PlansCompareFeedItemViewState
getFirstLevelItem() { getFirstLevelItem() {
return Container( return Container(
width: double.maxFinite, width: double.maxFinite,
height: 90, height: 80,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: EdgeInsets.only(top: 15, bottom: 15), padding: EdgeInsets.only(top: 15, bottom: 15),
child: Row( child: Row(
...@@ -64,11 +64,11 @@ class _PlansCompareFeedItemViewState ...@@ -64,11 +64,11 @@ class _PlansCompareFeedItemViewState
), ),
), ),
Container( Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 12),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(4.0), borderRadius: BorderRadius.circular(4.0),
child: CachedNetworkImage( child: CachedNetworkImage(
imageUrl: widget.plan.projectImage, imageUrl: widget.plan.projectImage ?? "",
width: 50, width: 50,
height: 50, height: 50,
fit: BoxFit.cover, fit: BoxFit.cover,
...@@ -101,7 +101,7 @@ class _PlansCompareFeedItemViewState ...@@ -101,7 +101,7 @@ class _PlansCompareFeedItemViewState
TextSpan( TextSpan(
text: "%", text: "%",
style: TextStyle( style: TextStyle(
fontSize: 11, fontSize: 10,
color: Color(0xFFFF5963), color: Color(0xFFFF5963),
fontWeight: FontWeight.w500)) fontWeight: FontWeight.w500))
])), ])),
...@@ -114,7 +114,7 @@ class _PlansCompareFeedItemViewState ...@@ -114,7 +114,7 @@ class _PlansCompareFeedItemViewState
baseText('¥${widget.plan.minPrice}-${widget.plan.maxPrice}', baseText('¥${widget.plan.minPrice}-${widget.plan.maxPrice}',
13, Color(0xFFFF5963)), 13, Color(0xFFFF5963)),
baseText( baseText(
"销量${NumPlanUtil.getSale(widget.plan.salesCount)}", 11, Color(0xFF282828)) "销量${widget.plan.salesCount}", 11, Color(0xFF666666))
], ],
) )
], ],
...@@ -162,7 +162,7 @@ class _PlansCompareFeedItemViewState ...@@ -162,7 +162,7 @@ class _PlansCompareFeedItemViewState
baseText('¥${widget.plan.minPrice}-${widget.plan.maxPrice}', baseText('¥${widget.plan.minPrice}-${widget.plan.maxPrice}',
13, Color(0xFFFF5963)), 13, Color(0xFFFF5963)),
baseText("指导价:¥${widget.plan.guidePrice}", 11, baseText("指导价:¥${widget.plan.guidePrice}", 11,
Color(0xFF282828)), Color(0xFF666666)),
], ],
), ),
], ],
...@@ -178,7 +178,7 @@ class _PlansCompareFeedItemViewState ...@@ -178,7 +178,7 @@ class _PlansCompareFeedItemViewState
_icon = _unchecked; _icon = _unchecked;
} else { } else {
if (widget._setCompare.length == 2) { if (widget._setCompare.length == 2) {
NativeToast.showNativeToast("不许再选了两个够了!"); NativeToast.showNativeToast("请选择最多2个项目进行对比");
return; return;
} }
_icon = _checked; _icon = _checked;
......
...@@ -107,7 +107,7 @@ class _PlansCompareFeedState extends BaseState<PlansCompareFeedPage> ...@@ -107,7 +107,7 @@ class _PlansCompareFeedState extends BaseState<PlansCompareFeedPage>
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Divider(height: 0.5, color: Color(0x99979797)), Divider(height: 0.5, color: Color(0xFFE5E5E5)),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 15, right: 15, top: 7.5, bottom: 7.5), left: 15, right: 15, top: 7.5, bottom: 7.5),
......
...@@ -30,7 +30,7 @@ class ProjectDetailsItemView extends StatelessWidget { ...@@ -30,7 +30,7 @@ class ProjectDetailsItemView extends StatelessWidget {
padding: EdgeInsets.only(left: 15.0), padding: EdgeInsets.only(left: 15.0),
margin: EdgeInsets.only(bottom: 16.0), margin: EdgeInsets.only(bottom: 16.0),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
height: 55, height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage("assets/bg_project_detail_item.png"), image: AssetImage("assets/bg_project_detail_item.png"),
...@@ -47,29 +47,25 @@ class ProjectDetailsItemView extends StatelessWidget { ...@@ -47,29 +47,25 @@ class ProjectDetailsItemView extends StatelessWidget {
} }
getAttrItem(Attrs attrs) { getAttrItem(Attrs attrs) {
return Container( return Row(
width: double.maxFinite, crossAxisAlignment: CrossAxisAlignment.start,
margin: EdgeInsets.only(bottom: 25, left: 15, right: 15), children: <Widget>[
child: Row( Container(
children: <Widget>[ margin: EdgeInsets.only(right: 25.0, left: 15, bottom: 25),
Container( width: 78,
margin: EdgeInsets.only(right: 25.0), child: baseText(attrs.attrName, 13, Color(0xFF999999),
alignment: Alignment.centerLeft, textAlign: TextAlign.start,
width: 78, maxLines: 2,
child: baseText(attrs.attrName, 13, Color(0xFF999999), overflow: TextOverflow.ellipsis)),
textAlign: TextAlign.left, Expanded(
child: Container(
margin: EdgeInsets.only(right: 15, bottom: 25),
child: baseText(attrs.attrValue, 14, Color(0xFF282828),
textAlign: TextAlign.start,
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis)), overflow: TextOverflow.ellipsis)),
Expanded( ),
child: Container( ],
alignment: Alignment.centerLeft,
child: baseText(attrs.attrValue, 14, Color(0xFF282828),
textAlign: TextAlign.left,
maxLines: 2,
overflow: TextOverflow.ellipsis)),
),
],
),
); );
} }
} }
...@@ -16,11 +16,17 @@ class LevelOneItem extends StatelessWidget { ...@@ -16,11 +16,17 @@ class LevelOneItem extends StatelessWidget {
final Cards cards; final Cards cards;
VoidCallback lowPrice; VoidCallback lowPrice;
VoidCallback ask; VoidCallback ask;
VoidCallback compare; Function(int planId) compare;
Function(int planId) gotoPlan; Function(int planId) gotoPlan;
int position;
String tabName;
LevelOneItem(this.cards, LevelOneItem(this.cards,
{this.lowPrice, this.ask, this.compare, this.gotoPlan}); {this.lowPrice,
this.ask,
this.compare,
this.gotoPlan,
this.position,
this.tabName});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -61,6 +67,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -61,6 +67,8 @@ class LevelOneItem extends StatelessWidget {
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
buried_on_click_card(
position, tabName, "doctor", cards.doctor.doctor_id);
Map<String, dynamic> map = { Map<String, dynamic> map = {
"business_id": "${cards.doctor.doctor_id}", "business_id": "${cards.doctor.doctor_id}",
}; };
...@@ -96,7 +104,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -96,7 +104,7 @@ class LevelOneItem extends StatelessWidget {
top: 18, top: 18,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
baseText(cards.doctor.name, 15, Color(0xff333333), baseText(cards.doctor.name, 15, Color(0xff333333),
bold: true), bold: true),
...@@ -178,6 +186,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -178,6 +186,8 @@ class LevelOneItem extends StatelessWidget {
return GestureDetector( return GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
buried_on_click_card(
position, tabName, "hospital", cards.hospital.hosiptalId);
Map<String, dynamic> map = { Map<String, dynamic> map = {
"business_id": "${cards.hospital.hosiptalId}", "business_id": "${cards.hospital.hosiptalId}",
}; };
...@@ -309,8 +319,11 @@ class LevelOneItem extends StatelessWidget { ...@@ -309,8 +319,11 @@ class LevelOneItem extends StatelessWidget {
Positioned( Positioned(
left: 0, left: 0,
top: 15, top: 15,
child: baseText(cards.plan.planName, 15, Color(0xff282828), child: Container(
bold: true), width: 210,
child: baseText(cards.plan.planName, 15, Color(0xff282828),
bold: true),
),
), ),
Positioned( Positioned(
right: 0, right: 0,
...@@ -326,7 +339,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -326,7 +339,8 @@ class LevelOneItem extends StatelessWidget {
) )
: baseText("¥", 12, Color(0xffFF5963)), : baseText("¥", 12, Color(0xffFF5963)),
baseText(price, price == "暂无报价" ? 13 : 15, baseText(price, price == "暂无报价" ? 13 : 15,
price == "暂无报价" ? Color(0xff999999) : Color(0xffFF5963)) price == "暂无报价" ? Color(0xff999999) : Color(0xffFF5963),
bold: price != "暂无报价")
], ],
), ),
), ),
...@@ -359,6 +373,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -359,6 +373,8 @@ class LevelOneItem extends StatelessWidget {
], ],
), ),
).gestureDetector(() { ).gestureDetector(() {
buried_on_click_card(
position, tabName, "level_two_plan", "${cards.plan.plan_id}");
Map<String, dynamic> map = { Map<String, dynamic> map = {
"business_id": "${cards.plan.plan_id}", "business_id": "${cards.plan.plan_id}",
"planId": cards.plan.plan_id "planId": cards.plan.plan_id
...@@ -416,7 +432,9 @@ class LevelOneItem extends StatelessWidget { ...@@ -416,7 +432,9 @@ class LevelOneItem extends StatelessWidget {
child: baseText("去比较", 13, Color(0xff282828), bold: true), child: baseText("去比较", 13, Color(0xff282828), bold: true),
) )
], ],
).gestureDetector(compare); ).gestureDetector(() {
compare(cards.plan.plan_id);
});
} }
Widget DiaryItem(BuildContext context) { Widget DiaryItem(BuildContext context) {
...@@ -599,4 +617,19 @@ class LevelOneItem extends StatelessWidget { ...@@ -599,4 +617,19 @@ class LevelOneItem extends StatelessWidget {
"gengmei://diary?diary_id=${cards.diary.diaryId}", null, true); "gengmei://diary?diary_id=${cards.diary.diaryId}", null, true);
}); });
} }
buried_on_click_card(
int position, String btnName, String cardContentType, String cardId) {
Map<String, dynamic> buriedMap;
buriedMap = {
"tab_name": tabName,
"position": position,
"card_id": cardId,
"card_name": "card",
"card_type": "card",
"transaction_type": "",
"card_content_type": cardContentType
};
RouterCenterImpl().findMainRouter().buriedEvent("on_click_card", buriedMap);
}
} }
...@@ -114,6 +114,18 @@ class LevelOneListState extends State<LevelOneList> ...@@ -114,6 +114,18 @@ class LevelOneListState extends State<LevelOneList>
.jumpPage(context, "show_login", null, true); .jumpPage(context, "show_login", null, true);
return; return;
} }
var data2 = _model.data[index];
if (data2.cardType == "doctor") {
buried_on_click_button(index, "bargain", "doctor",
data2.doctor.doctor_id);
} else if (data2.cardType == "hospital") {
buried_on_click_button(index, "bargain", "hospital",
data2.hospital.hosiptalId);
} else if (data2.cardType == "plan") {
buried_on_click_button(index, "bargain",
"level_two_plan", "${data2.plan.plan_id}");
}
DiscussLowPricePopView.showPopView( DiscussLowPricePopView.showPopView(
context, context,
widget.pageName, widget.pageName,
...@@ -128,31 +140,51 @@ class LevelOneListState extends State<LevelOneList> ...@@ -128,31 +140,51 @@ class LevelOneListState extends State<LevelOneList>
ask: () { ask: () {
var data2 = _model.data[index]; var data2 = _model.data[index];
if (data2.cardType == "doctor") { if (data2.cardType == "doctor") {
buried_on_click_button(index, "consult", "doctor",
data2.doctor.doctor_id);
RouterCenterImpl().findMainRouter().jumpPage( RouterCenterImpl().findMainRouter().jumpPage(
context, data2.doctor.messageUrl, null, true); context, data2.doctor.messageUrl, null, true);
} else if (data2.cardType == "hospital") { } else if (data2.cardType == "hospital") {
buried_on_click_button(index, "consult", "hospital",
data2.hospital.hosiptalId);
RouterCenterImpl().findMainRouter().jumpPage( RouterCenterImpl().findMainRouter().jumpPage(
context, data2.hospital.messageUrl, null, true); context, data2.hospital.messageUrl, null, true);
} else if (data2.cardType == "plan") { } else if (data2.cardType == "plan") {
buried_on_click_button(index, "consult",
"level_two_plan", "${data2.plan.plan_id}");
BaseBottomPicker() BaseBottomPicker()
..setPicker(MechanismBox(data2.plan.plan_id)) ..setPicker(MechanismBox(data2.plan.plan_id))
..show(context); ..show(context);
} }
}, },
compare: () { compare: (int planId) {
var data2 = _model.data[index];
if (data2.cardType == "doctor") {
buried_on_click_button(index, "compare", "doctor",
data2.doctor.doctor_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": widget.planId, "planId": planId,
"planType": widget.index == 0 ? 1 : 2 "planType": 2
}; };
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, {"planId": planId, "planType": 2},
false); false);
}, },
tabName: _model.tab_type,
position: index,
); );
}, },
childCount: _model.data.length + 1, childCount: _model.data.length + 1,
...@@ -189,6 +221,23 @@ class LevelOneListState extends State<LevelOneList> ...@@ -189,6 +221,23 @@ class LevelOneListState extends State<LevelOneList>
}, pullDown: false, pullUp: true, loadMoreColor: Color(0xffF7F6FA)); }, pullDown: false, pullUp: true, loadMoreColor: Color(0xffF7F6FA));
} }
buried_on_click_button(
int position, String btnName, String cardContentType, String cardId) {
Map<String, dynamic> buriedMap;
buriedMap = {
"tab_name": _model.tab_type,
"position": position,
"card_id": cardId,
"button_name": btnName,
"card_type": "card",
"transaction_type": "",
"card_content_type": cardContentType
};
RouterCenterImpl()
.findMainRouter()
.buriedEvent("on_click_button", buriedMap);
}
@override @override
bool get wantKeepAlive => true; bool get wantKeepAlive => true;
} }
...@@ -15,6 +15,7 @@ import 'package:gm_flutter/commonModel/bean/Pair.dart'; ...@@ -15,6 +15,7 @@ import 'package:gm_flutter/commonModel/bean/Pair.dart';
import 'package:gm_flutter/commonModel/rx/RxDispose.dart'; import 'package:gm_flutter/commonModel/rx/RxDispose.dart';
import 'package:gm_flutter/commonModel/util/PrintUtil.dart'; import 'package:gm_flutter/commonModel/util/PrintUtil.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:gm_flutter/main.mark.dart';
class LevelOneModel extends BaseModel { class LevelOneModel extends BaseModel {
LiveData<int> stateLive = LiveData(); LiveData<int> stateLive = LiveData();
...@@ -59,5 +60,19 @@ class LevelOneModel extends BaseModel { ...@@ -59,5 +60,19 @@ class LevelOneModel extends BaseModel {
textLive.dispost(); textLive.dispost();
} }
void selectTab(int index) {} void selectTab(int index, String tab_name, String from_tab_name) {
buried_on_click_tab(index, tab_name, from_tab_name);
}
buried_on_click_tab(int position, String tab_name, String from_tab_name) {
Map<String, dynamic> buriedMap;
buriedMap = {
"tab_name": tab_name,
"position": position,
"from_tab_name": from_tab_name,
};
RouterCenterImpl()
.findMainRouter()
.buriedEvent("on_click_button", buriedMap);
}
} }
...@@ -18,6 +18,7 @@ import 'package:gm_flutter/ClueModel/page/common/StickyTabBarDelegate.dart'; ...@@ -18,6 +18,7 @@ import 'package:gm_flutter/ClueModel/page/common/StickyTabBarDelegate.dart';
import 'package:gm_flutter/ClueModel/page/levelOne/LevelOneList.dart'; import 'package:gm_flutter/ClueModel/page/levelOne/LevelOneList.dart';
import 'package:gm_flutter/ClueModel/page/levelOne/LevelOneModel.dart'; import 'package:gm_flutter/ClueModel/page/levelOne/LevelOneModel.dart';
import 'package:gm_flutter/ClueModel/page/mechanismBox/MechanismBoxPage.dart'; import 'package:gm_flutter/ClueModel/page/mechanismBox/MechanismBoxPage.dart';
import 'package:gm_flutter/ClueModel/server/entity/PlanBarBean.dart';
import 'package:gm_flutter/ClueModel/util/NumPlanUtil.dart'; import 'package:gm_flutter/ClueModel/util/NumPlanUtil.dart';
import 'package:gm_flutter/commonModel/App.dart'; import 'package:gm_flutter/commonModel/App.dart';
import 'package:gm_flutter/commonModel/GMBase.dart'; import 'package:gm_flutter/commonModel/GMBase.dart';
...@@ -232,7 +233,9 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -232,7 +233,9 @@ class LevelOneState extends BaseState<LevelOnePage>
height: 40, height: 40,
color: Colors.white, color: Colors.white,
child: baseTabBar(tabController, getTabs(), (index) { child: baseTabBar(tabController, getTabs(), (index) {
_model.selectTab(index); _model.selectTab(index, _model.tabsList[index].name,
_model.tabsList[_model.currentIndex].name);
_model.currentIndex = index;
}, scroll: false), }, scroll: false),
)), )),
), ),
...@@ -329,9 +332,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -329,9 +332,7 @@ class LevelOneState extends BaseState<LevelOnePage>
right: 15, right: 15,
bottom: 8, bottom: 8,
child: baseText( child: baseText(
"销量${NumPlanUtil.getSale(_model.planoverItem.salesCount)}", "销量${_model.planoverItem.salesCount}", 11, Color(0xff666666)),
11,
Color(0xff666666)),
) )
], ],
), ),
......
...@@ -235,18 +235,9 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -235,18 +235,9 @@ class LevelTwoState extends BaseState<LevelTwoPage>
height: 40, height: 40,
color: Colors.white, color: Colors.white,
child: baseTabBar(tabController, getTabs(), (index) { child: baseTabBar(tabController, getTabs(), (index) {
Map<String, dynamic> map = {}; _model.selectTab(index, _model.tabsList[index].name,
map["page_name"] = "level_two_plan_deatil"; _model.tabsList[_model.currentIndex].name);
map["referrer"] = ""; _model.currentIndex = index;
map["referrer_id"] = "";
map["referrer_link"] = ["plan_home"];
map["from_tab_name"] = "全部";
map["tab_name"] = index == 0 ? '机构' : '医生';
map["position"] = 1;
RouterCenterImpl()
.findMainRouter()
.buriedEvent("on_click_tab", map);
_model.selectTab(index);
}, scroll: false), }, scroll: false),
)), )),
), ),
......
...@@ -78,37 +78,47 @@ class PlanItem extends StatelessWidget { ...@@ -78,37 +78,47 @@ class PlanItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
baseText(plans.name, 14, Color(0xff282828), bold: true),
Container( Container(
margin: EdgeInsets.only(left: 4), constraints: BoxConstraints(maxWidth: 110),
child: Container( child: baseText(plans.name, 14, Color(0xff282828),
width: 28, bold: true),
height: 15, ),
decoration: BoxDecoration( plans.operation_type.empty()
borderRadius: BorderRadius.circular(2), ? Container(
color: Color(0xffF0F9F7)), width: 0,
alignment: Alignment.center, height: 0,
child: )
baseText("??", 11, Color(0xff3FB5AF), bold: true), : Container(
), constraints: BoxConstraints(maxWidth: 60),
) margin: EdgeInsets.only(left: 4),
child: Container(
padding: EdgeInsets.only(
top: 2, bottom: 2, left: 3, right: 3),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: Color(0xffF0F9F7)),
alignment: Alignment.center,
child: baseText("${plans.operation_type}", 11,
Color(0xff3FB5AF),
bold: true),
),
)
], ],
), ),
), ),
Positioned( Positioned(
top: 14, top: 15,
right: 10, right: 10,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
// crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
verticalDirection: VerticalDirection.down, verticalDirection: VerticalDirection.down,
children: <Widget>[ children: <Widget>[
baseText("好评率", 11, Color(0xff282828)), baseText("好评率", 11, Color(0xff282828)),
Container( Container(
width: 4, width: 4,
), ),
baseText("${rate}", 14, Color(0xffFF5963)), baseText("${rate}", 14, Color(0xffFF5963), bold: true),
baseText("%", 10, Color(0xffFF5963)), baseText("%", 10, Color(0xffFF5963)),
], ],
), ),
...@@ -116,8 +126,8 @@ class PlanItem extends StatelessWidget { ...@@ -116,8 +126,8 @@ class PlanItem extends StatelessWidget {
Positioned( Positioned(
bottom: 14, bottom: 14,
right: 10, right: 10,
child: baseText("销量${NumPlanUtil.getSale(plans.salesCount)}", child:
11, Color(0xff282828)), baseText("销量${plans.salesCount}", 11, Color(0xff282828)),
), ),
Positioned( Positioned(
left: 91, left: 91,
...@@ -147,21 +157,14 @@ class PlanItem extends StatelessWidget { ...@@ -147,21 +157,14 @@ class PlanItem extends StatelessWidget {
), ),
).gestureDetector(() { ).gestureDetector(() {
Map<String, dynamic> map; Map<String, dynamic> map;
if (isPlanPage) { map = {
map = { "tab_name": isPlanPage ? "plan_home" : "",
"page_name": "plan_home", "position": pos,
"tab_name": "plan_home", "card_id": plans.id,
"referrer_id": "", "card_type": "card",
"referrer": "", "transaction_type": "",
"position": pos, "card_content_type": "level_one_plan"
"business_id": "", };
"card_id": plans.id,
"card_type": "card",
"transaction_type": "",
"card_content_type": "level_one_plan"
};
}
RouterCenterImpl().findMainRouter().buriedEvent("on_click_card", map); RouterCenterImpl().findMainRouter().buriedEvent("on_click_card", map);
Map<String, dynamic> buriedMap = { Map<String, dynamic> buriedMap = {
"business_id": "${plans.id}", "business_id": "${plans.id}",
......
...@@ -64,7 +64,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -64,7 +64,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override @override
void initState() { void initState() {
print("LSY PLAN INIT "); print("LSY PLAN INIT ");
// DioUtil.getInstance().setProxy("172.30.9.128"); DioUtil.getInstance().setProxy("172.30.9.128");
_model.init(needCache: true); _model.init(needCache: true);
super.initState(); super.initState();
planBarView = planBarView =
...@@ -497,9 +497,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -497,9 +497,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black12, color: Colors.black12,
offset: Offset(0.0, 1.0), //阴影xy轴偏移量 blurRadius: 0.5,
blurRadius: 1.0, //阴影模糊程度 spreadRadius: 0.5
spreadRadius: 1.0 //阴影扩散程度
) )
], ],
color: Colors.white, color: Colors.white,
......
...@@ -41,11 +41,7 @@ class TopModel extends BaseModel { ...@@ -41,11 +41,7 @@ class TopModel extends BaseModel {
return; return;
} }
Map<String, dynamic> map = { Map<String, dynamic> map = {
"page_name": "favor_plan", "position": index,
"referrer": "plan_home",
"referrer": "plan_home",
"referrer_id": "",
"referrer_link": ["plan_home"],
"from_tab_name": tabs[tabIndex].name, "from_tab_name": tabs[tabIndex].name,
"tab_name": tabs[index].name, "tab_name": tabs[index].name,
}; };
......
...@@ -102,6 +102,7 @@ class Plans { ...@@ -102,6 +102,7 @@ class Plans {
String minPrice; String minPrice;
String maxPrice; String maxPrice;
String projectImage; String projectImage;
String operation_type;
Plans( Plans(
{this.id, {this.id,
...@@ -119,6 +120,7 @@ class Plans { ...@@ -119,6 +120,7 @@ class Plans {
cardType = json['card_type']; cardType = json['card_type'];
name = json['name']; name = json['name'];
positiveRate = json['positive_rate']; positiveRate = json['positive_rate'];
operation_type = json['operation_type'];
salesCount = json['sales_count']; salesCount = json['sales_count'];
baseAttrs = json['base_attrs'].cast<String>(); baseAttrs = json['base_attrs'].cast<String>();
minPrice = minPrice =
...@@ -132,6 +134,7 @@ class Plans { ...@@ -132,6 +134,7 @@ class Plans {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id; data['id'] = this.id;
data['card_type'] = this.cardType; data['card_type'] = this.cardType;
data['operation_type'] = this.operation_type;
data['name'] = this.name; data['name'] = this.name;
data['positive_rate'] = this.positiveRate; data['positive_rate'] = this.positiveRate;
data['sales_count'] = this.salesCount; data['sales_count'] = this.salesCount;
......
...@@ -432,9 +432,8 @@ Widget baseTabBar( ...@@ -432,9 +432,8 @@ Widget baseTabBar(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black12, color: Colors.black12,
offset: Offset(0.0, 1.0), //阴影xy轴偏移量 blurRadius: 0.5,
blurRadius: 1.0, //阴影模糊程度 spreadRadius: 0.5
spreadRadius: 1.0 //阴影扩散程度
) )
], ],
), ),
......
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