Browse Source

进度条更改

zyh
w-R 3 years ago
parent
commit
8f2458a54d
  1. 28
      lib/store/shopping/shopping_goods_details.dart
  2. 74
      lib/store/shopping/shopping_home/bargain_details.dart

28
lib/store/shopping/shopping_goods_details.dart

@ -524,20 +524,20 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
],
),
),
Container(
color: Colors.white,
margin: EdgeInsets.only(bottom: 72.h),
child: Html(
data: miNiDetail?.detail ?? "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
// Container(
// color: Colors.white,
// margin: EdgeInsets.only(bottom: 72.h),
// child: Html(
// data: miNiDetail?.detail ?? "",
// customImageRenders: {
// networkSourceMatcher(): networkImageRender(
// loadingWidget: () {
// return Container();
// },
// ),
// },
// ),
// ),
],
),
),

74
lib/store/shopping/shopping_home/bargain_details.dart

@ -40,6 +40,7 @@ class _BargainDetails extends State<BargainDetails> {
final SwiperController controller = SwiperController();
final RefreshController refreshController = RefreshController();
int limitNumber = 0;
double bargainNum = 0;
@override
void dispose() {
@ -106,10 +107,15 @@ class _BargainDetails extends State<BargainDetails> {
});
if (baseData != null && baseData.isSuccess) {
setState(() {
bargainNum = 0;
activityActRecordDetails = baseData.data;
activityActRecordDetails.actRecordJoinList.forEach((element) {
bargainNum += double.tryParse(element.actPrice);
});
});
refreshController.refreshCompleted();
} else {
refreshController.refreshFailed();
refreshController.loadFailed();
}
}
@ -152,7 +158,9 @@ class _BargainDetails extends State<BargainDetails> {
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
setState(() {});
setState(() {
queryShowOneAct(actRecordId);
});
},
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
@ -304,8 +312,8 @@ class _BargainDetails extends State<BargainDetails> {
borderRadius: BorderRadius.circular(4),
color: Color(0xFF9476F7),
),
child: Text(
"砍价成功",
child:Text(
(limitNumber != (activityActRecordDetails?.actRecord?.joinNum ?? 0)) ? "已砍${bargainNum.toStringAsFixed(2)}":"砍价成功",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
@ -333,12 +341,13 @@ class _BargainDetails extends State<BargainDetails> {
child: Stack(
children: [
Container(
width: double.infinity,
width:double.infinity,
height: 8.h,
color: Color(0xFFF5F5F5),
),
Container(
width:double.tryParse(activityActRecordDetails?.actProduct?.productPrice ?? ""),
width:(bargainNum/(double.tryParse(activityActRecordDetails?.actProduct?.productPrice ?? "0") -
double.tryParse(activityActRecordDetails?.actProduct?.promotionPrice ?? "0")))*MediaQuery.of(context).size.width,
height: 8.h,
decoration: BoxDecoration(
gradient: LinearGradient(
@ -474,24 +483,44 @@ class _BargainDetails extends State<BargainDetails> {
),
],
),
SizedBox(height: 11.h),
Text(
"剩余时间 ${((tempDay == 0) ? "" : (tempDay.toString() + ":")).toString()} ${tempHour.toString()} : ${tempM.toString()} : ${tempS.toString()}",
if(limitNumber == (activityActRecordDetails?.actRecord?.joinNum ?? 0))
GestureDetector(
child: Container(
alignment: Alignment.center,
width:double.infinity,
height:54.h,
margin: EdgeInsets.only(left:6.w),
decoration: BoxDecoration(
color: Color(0xFF9476F7),
borderRadius: BorderRadius.circular(27),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Text(
"立即购买",
style: TextStyle(
fontSize: 10.sp,
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
color: Colors.white,
),
),
// Container(
// alignment: Alignment.center,
)
),
// GestureDetector(
// child:Container(
// width:double.infinity,
// height:54.h,
// margin: EdgeInsets.only(left:6.w),
// margin: EdgeInsets.only(bottom: 28),
// alignment: Alignment.center,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(27),
// color: Color(0xFF9476F7),
// ),
// borderRadius: BorderRadius.circular(27)),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
@ -506,7 +535,7 @@ class _BargainDetails extends State<BargainDetails> {
// width:8,
// ),
// Text(
// "邀请微信好友一起拼团",
// "邀请微信好友帮忙砍价",
// style: TextStyle(
// fontSize: 16.sp,
// fontWeight: MyFontWeight.medium,
@ -514,8 +543,17 @@ class _BargainDetails extends State<BargainDetails> {
// ),
// )
// ],
// )
// )
// ))
// ),
SizedBox(height: 11.h),
Text(
"剩余时间 ${((tempDay == 0) ? "" : (tempDay.toString() + ":")).toString()} ${tempHour.toString()} : ${tempM.toString()} : ${tempS.toString()}",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
),
],
),
);

Loading…
Cancel
Save