Commit 8c7389ed authored by 林生雨's avatar 林生雨

co

parent ae142f80
...@@ -51,6 +51,7 @@ class DiscussLowPriceModel extends BaseModel { ...@@ -51,6 +51,7 @@ class DiscussLowPriceModel extends BaseModel {
.givePhoneAuth(DioUtil.getInstance().getDio(), leadPhoneRequestId) .givePhoneAuth(DioUtil.getInstance().getDio(), leadPhoneRequestId)
.listen((event) { .listen((event) {
if (event.error == 0) { if (event.error == 0) {
NativeToast.showNativeToast("提交成功,请留意机构来电~");
} else { } else {
NativeToast.showNativeToast(event.message); NativeToast.showNativeToast(event.message);
} }
......
...@@ -119,12 +119,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> { ...@@ -119,12 +119,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Groups group = data.data.second[newIndex]; Groups group = data.data.second[newIndex];
Widget widget; Widget widget;
if (group.groupType == 'hot') { if (group.groupType == 'hot') {
widget = Container( widget = planPopularityView(group);
child: planPopularityView(group),
// height: 100, // height: 100,
// alignment: Alignment.center, // alignment: Alignment.center,
// child: baseText("第一个", 15, Colors.black), // child: baseText("第一个", 15, Colors.black),
);
} else if (group.groupType == 'normal_attrs') { } else if (group.groupType == 'normal_attrs') {
widget = Container( widget = Container(
child: planNormalEffectiveAttrsView(group), child: planNormalEffectiveAttrsView(group),
......
import 'package:cached_network_image/cached_network_image.dart';
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/toast/NativeToast.dart'; import 'package:flutter_common/commonModel/toast/NativeToast.dart';
import 'package:gm_flutter/ClueModel/server/entity/PlansCompareFeed.dart'; import 'package:gm_flutter/ClueModel/server/entity/PlansCompareFeed.dart';
import 'package:gm_flutter/commonModel/base/BaseComponent.dart'; import 'package:gm_flutter/commonModel/base/BaseComponent.dart';
import 'package:gm_flutter/commonModel/base/BaseState.dart'; import 'package:gm_flutter/commonModel/base/BaseState.dart';
import 'package:gm_flutter/commonModel/util/DartUtil.dart';
import 'CallBackCompareItem.dart'; import 'CallBackCompareItem.dart';
...@@ -49,31 +51,26 @@ class _PlansCompareFeedItemViewState ...@@ -49,31 +51,26 @@ class _PlansCompareFeedItemViewState
width: double.maxFinite, width: double.maxFinite,
height: 90, height: 90,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: EdgeInsets.only(top: 20, bottom: 20), padding: EdgeInsets.only(top: 15, bottom: 15),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
GestureDetector( Container(
behavior: HitTestBehavior.opaque, alignment: Alignment.center,
onTap: () => onClickCheckBox(_icon), child: Image.asset(
child: Container( _icon,
alignment: Alignment.center, width: 17,
child: ClipRRect( height: 17,
child: Image.asset( ),
_icon, ),
width: 17,
height: 17,
fit: BoxFit.fill,
)),
)),
Container( Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(4.0), borderRadius: BorderRadius.circular(4.0),
child: Image.network( child: CachedNetworkImage(
widget.plan.projectImage, imageUrl: widget.plan.projectImage,
width: 50, width: 50,
height: 50, height: 50,
fit: BoxFit.fill, fit: BoxFit.cover,
), ),
), ),
), ),
...@@ -94,10 +91,17 @@ class _PlansCompareFeedItemViewState ...@@ -94,10 +91,17 @@ class _PlansCompareFeedItemViewState
style: TextStyle( style: TextStyle(
fontSize: 11, color: Color(0xFF282828))), fontSize: 11, color: Color(0xFF282828))),
TextSpan( TextSpan(
text: widget.plan.positiveRate, text:
"${(widget.plan.positiveRate.contains(".") ? widget.plan.positiveRate.split(".")[0] : widget.plan.positiveRate).replaceAll("%", "")}",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Color(0xFFFF5963), color: Color(0xFFFF5963),
fontWeight: FontWeight.w500)),
TextSpan(
text: "%",
style: TextStyle(
fontSize: 11,
color: Color(0xFFFF5963),
fontWeight: FontWeight.w500)) fontWeight: FontWeight.w500))
])), ])),
], ],
...@@ -117,7 +121,9 @@ class _PlansCompareFeedItemViewState ...@@ -117,7 +121,9 @@ class _PlansCompareFeedItemViewState
) )
], ],
), ),
); ).gestureDetector(() {
onClickCheckBox(_icon);
});
} }
getSecondLevelItem() { getSecondLevelItem() {
...@@ -133,13 +139,11 @@ class _PlansCompareFeedItemViewState ...@@ -133,13 +139,11 @@ class _PlansCompareFeedItemViewState
onTap: () => onClickCheckBox(_icon), onTap: () => onClickCheckBox(_icon),
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
child: ClipRRect( child: Image.asset(
child: Image.asset(
_icon, _icon,
width: 17, width: 17,
height: 17, height: 17,
fit: BoxFit.fill, ),
)),
)), )),
), ),
Expanded( Expanded(
......
...@@ -175,8 +175,8 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -175,8 +175,8 @@ class LevelOneState extends BaseState<LevelOnePage>
}, },
child: newHome(), child: newHome(),
)), )),
baseSliverTitle( baseSliverTitle("${widget.title}", MediaQuery.of(context).size.width,
"${widget.title}", MediaQuery.of(context).size.width, _model.textLive), _model.textLive),
baseSliverBack(() { baseSliverBack(() {
if (RouterCenterImpl().findMainRouter().isWithNative()) { if (RouterCenterImpl().findMainRouter().isWithNative()) {
FlutterBoost.singleton.closeCurrent(); FlutterBoost.singleton.closeCurrent();
...@@ -280,8 +280,11 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -280,8 +280,11 @@ class LevelOneState extends BaseState<LevelOnePage>
Positioned( Positioned(
bottom: 8, bottom: 8,
left: 15, left: 15,
child: baseText( child: Container(
_model.planoverItem.planDescription, 12, Color(0xff999999)), width: MediaQuery.of(context).size.width - 30 - 100,
child: baseText("${_model.planoverItem.planDescription}", 12,
Color(0xff999999)),
),
), ),
Positioned( Positioned(
right: 0, right: 0,
...@@ -307,11 +310,11 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -307,11 +310,11 @@ class LevelOneState extends BaseState<LevelOnePage>
Container( Container(
margin: EdgeInsets.only(left: 4), margin: EdgeInsets.only(left: 4),
child: baseText( child: baseText(
"${_model.planoverItem.positiveRate.contains(".") ? _model.planoverItem.positiveRate.split(".")[0] : _model.planoverItem.positiveRate}", "${(_model.planoverItem.positiveRate.contains(".") ? _model.planoverItem.positiveRate.split(".")[0] : _model.planoverItem.positiveRate).replaceAll("%", "")}",
20, 20,
Color(0xffFF5963)), Color(0xffFF5963)),
), ),
// baseText("%", 11, Color(0xffFF5963)), baseText("%", 11, Color(0xffFF5963)),
], ],
), ),
), ),
...@@ -345,7 +348,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -345,7 +348,7 @@ class LevelOneState extends BaseState<LevelOnePage>
Container( Container(
margin: EdgeInsets.only(left: 2, right: 2), margin: EdgeInsets.only(left: 2, right: 2),
child: Text( child: Text(
element.attrName, element.attrValue,
textScaleFactor: 1.0, textScaleFactor: 1.0,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
...@@ -360,7 +363,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -360,7 +363,7 @@ class LevelOneState extends BaseState<LevelOnePage>
Container( Container(
margin: EdgeInsets.only(left: 2, right: 2), margin: EdgeInsets.only(left: 2, right: 2),
child: Text( child: Text(
element.attrValue, element.attrName,
textScaleFactor: 1.0, textScaleFactor: 1.0,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
......
...@@ -32,6 +32,7 @@ class PlanItem extends StatelessWidget { ...@@ -32,6 +32,7 @@ class PlanItem extends StatelessWidget {
if (rate != null && rate.contains(".")) { if (rate != null && rate.contains(".")) {
rate = rate.split(".")[0]; rate = rate.split(".")[0];
} }
rate = rate.replaceAll("%", "");
return Container( return Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Container( child: Container(
...@@ -88,7 +89,8 @@ class PlanItem extends StatelessWidget { ...@@ -88,7 +89,8 @@ class PlanItem extends StatelessWidget {
Container( Container(
width: 4, width: 4,
), ),
baseText("${rate}%", 14, Color(0xffFF5963)) baseText("${rate}", 14, Color(0xffFF5963)),
baseText("%", 11, Color(0xffFF5963)),
], ],
), ),
), ),
......
...@@ -62,7 +62,7 @@ class TestState extends BaseState<TestPage> { ...@@ -62,7 +62,7 @@ class TestState extends BaseState<TestPage> {
context, context,
RouterCenterImpl() RouterCenterImpl()
.findClueRouter() .findClueRouter()
.getPlansCompareFeed({"planId": 1, "planType": 1})); .getPlansCompareFeed({"planId": 1, "planType": 2}));
})); }));
list.add(listItem("榜单", () { list.add(listItem("榜单", () {
JumpUtil.jumpToPageRight(context, JumpUtil.jumpToPageRight(context,
......
...@@ -159,10 +159,11 @@ class NestedScrollViewRefreshIndicatorState ...@@ -159,10 +159,11 @@ class NestedScrollViewRefreshIndicatorState
Animation<Color> _valueColor; Animation<Color> _valueColor;
Future<void> _pendingRefreshFuture; Future<void> _pendingRefreshFuture;
bool _isIndicatorAtTop=false; bool _isIndicatorAtTop;
double _dragOffset=0.0;
_RefreshIndicatorMode _mode=_RefreshIndicatorMode.drag;
double _dragOffset;
_RefreshIndicatorMode _mode;
static final Animatable<double> _threeQuarterTween = static final Animatable<double> _threeQuarterTween =
Tween<double>(begin: 0.0, end: 0.75); Tween<double>(begin: 0.0, end: 0.75);
...@@ -177,6 +178,9 @@ class NestedScrollViewRefreshIndicatorState ...@@ -177,6 +178,9 @@ class NestedScrollViewRefreshIndicatorState
func = (str) { func = (str) {
if (str == "refresh") { if (str == "refresh") {
if (mounted) { if (mounted) {
_isIndicatorAtTop = false;
_dragOffset = 0.0;
_mode = _RefreshIndicatorMode.drag;
_show(); _show();
} }
} }
...@@ -451,8 +455,7 @@ class NestedScrollViewRefreshIndicatorState ...@@ -451,8 +455,7 @@ class NestedScrollViewRefreshIndicatorState
final bool showIndeterminateIndicator = final bool showIndeterminateIndicator =
_mode == _RefreshIndicatorMode.refresh || _mode == _RefreshIndicatorMode.refresh ||
_mode == _RefreshIndicatorMode.done; _mode == _RefreshIndicatorMode.done;
return return Column(
Column(
children: <Widget>[ children: <Widget>[
Container( Container(
color: Color(0xffF7F6FA), color: Color(0xffF7F6FA),
......
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