Commit 31b86426 authored by 林生雨's avatar 林生雨

fix bug

parent 28d22877
......@@ -14,6 +14,7 @@ import 'package:gm_flutter/commonModel/rx/RxDispose.dart';
import 'package:gm_flutter/commonModel/bean/Pair.dart';
import 'package:gm_flutter/ClueModel/server/entity/DiscussLowPriceModelBean.dart';
import 'package:gm_flutter/commonModel/util/NativeToast.dart';
import 'package:gm_flutter/commonModel/util/PrintUtil.dart';
class DiscussLowPriceModel extends BaseModel {
LiveData<Pair<int, DiscussLowPriceModelBean>> popViewLive = LiveData();
......@@ -26,8 +27,10 @@ class DiscussLowPriceModel extends BaseModel {
DioUtil.getInstance().getDio(), planId, hospitalId, doctorId)
.listen((event) {
if (event.error == 0) {
if (event.data == null) {
popViewLive.notifyView(Pair(ENDLOADING, null));
if (event.data == null || event.data.title == null) {
PrintUtil.printBug("");
fail();
// popViewLive.notifyView(Pair(ENDLOADING, null));
} else {
popViewLive.notifyView(Pair(ENDLOADING, event.data));
}
......
......@@ -12,6 +12,7 @@ import 'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPriceModel.d
import 'package:gm_flutter/commonModel/bean/Pair.dart';
import 'package:gm_flutter/commonModel/util/DartUtil.dart';
import 'package:gm_flutter/commonModel/base/BaseUtil.dart';
import 'package:gm_flutter/commonModel/view/ImagesAnimation.dart';
import 'package:gm_flutter/main.mark.dart';
class DiscussLowPricePopView {
......@@ -43,7 +44,14 @@ class _PopView implements ICenterPicker {
initialData: _model.popViewLive.data ?? Pair(LOADING, null),
builder: (c, data) {
if (data.data.first == LOADING) {
return loadingItem();
return Center(
child: ImagesAnimation(
h: 100,
durationSeconds: 1500,
entry:
ImagesAnimationEntry(1, 16, "assets/ptr_header_loading")),
);
// loadingItem();
}
if (data.data.second == null || data.data.first == FAIL) {
return errorItem(contentWidth, 308.5, () {});
......
......@@ -283,7 +283,7 @@ class LevelOneState extends BaseState<LevelOnePage>
return Container(
width: MediaQuery.of(context).size.width,
height: 54,
margin: EdgeInsets.only(top: 10, bottom: 12),
margin: EdgeInsets.only(top: 4, bottom: 12),
child: Stack(
children: <Widget>[
Positioned(
......@@ -456,7 +456,7 @@ class LevelOneState extends BaseState<LevelOnePage>
children: <Widget>[
Container(
width: 55,
child: element.attrName.length < 4
child: element.attrName.length < 5
? Row(
children: textList,
)
......
......@@ -416,7 +416,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
children: <Widget>[
Container(
width: 55,
child: element.attrName.length < 4
child: element.attrName.length < 5
? Row(
children: textList,
)
......
......@@ -329,8 +329,12 @@ Widget baseRefreshView(RefreshController refreshController,
// body = Container();
// }
if (mode == LoadStatus.loading) {
body = Lottie.asset("assets/smart_refresh_header.json",
repeat: true, reverse: false);
body = ImagesAnimation(
h: 55,
durationSeconds: 1500,
entry: ImagesAnimationEntry(1, 16, "assets/ptr_header_loading"));
// body = Lottie.asset("assets/smart_refresh_header.json",
// repeat: true, reverse: false);
}
return Container(
color: loadMoreColor ?? Colors.white,
......
......@@ -474,18 +474,20 @@ class NestedScrollViewRefreshIndicatorState
child: AnimatedBuilder(
animation: _positionController,
builder: (BuildContext context, Widget child) {
return Container(
height: 80,
alignment: Alignment.center,
// child:Center(
// child: Lottie.asset("assets/smart_refresh_header.json",
// repeat: true, reverse: false, fit: BoxFit.fitHeight),
return SizedBox(
height: 80,
// child: ClipRRect(
// borderRadius:
// BorderRadius.only(bottomRight: Radius.circular(40)),
// child: Lottie.asset("assets/smart_refresh_header.json",
// repeat: true, reverse: false, fit: BoxFit.cover),
// ),
child: ImagesAnimation(
h: 80,
durationSeconds: 1500,
entry: ImagesAnimationEntry(
1, 16, "assets/ptr_header_loading")));
1, 16, "assets/ptr_header_loading"))
);
},
),
),
......
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