diff --git a/lib/retrofit/data/activity_details.dart b/lib/retrofit/data/activity_details.dart index b8b1c3ec..499f0195 100644 --- a/lib/retrofit/data/activity_details.dart +++ b/lib/retrofit/data/activity_details.dart @@ -461,6 +461,7 @@ class ActProduct { String shortName, String supplierName, String detail, + String rightImg, }) { _id = id; _createTime = createTime; @@ -482,6 +483,7 @@ class ActProduct { _shortName = shortName; _supplierName =supplierName; _detail = detail; + _rightImg = rightImg; } ActProduct.fromJson(dynamic json) { @@ -510,6 +512,7 @@ class ActProduct { _shortName = json['shortName']; _supplierName = json['supplierName']; _detail = json['detail']; + _rightImg = json['rightImg']; } String _id; @@ -532,6 +535,7 @@ class ActProduct { String _shortName; String _supplierName; String _detail; + String _rightImg; String get id => _id; @@ -573,6 +577,8 @@ class ActProduct { String get detail => _detail; + String get rightImg => _rightImg; + Map toJson() { final map = {}; map['id'] = _id; @@ -597,6 +603,7 @@ class ActProduct { map['shortName'] = _shortName; map['supplierName'] = _supplierName; map['detail'] = _detail; + map['rightImg'] = _rightImg; return map; } } diff --git a/lib/store/shopping/activity_prefecture_details.dart b/lib/store/shopping/activity_prefecture_details.dart index 6df5c1fe..8ccdbbbd 100644 --- a/lib/store/shopping/activity_prefecture_details.dart +++ b/lib/store/shopping/activity_prefecture_details.dart @@ -638,7 +638,7 @@ class _ActivityPrefectureDetails extends State { "tenant": tenant, "limitNumber":actTemplate.limitNumber, "limitTime":actTemplate.limitTime, - "bannerImg":actTemplate.bannerImg + "bannerImg":actTemplate.bannerImg, }, ); }); diff --git a/lib/store/shopping/shopping_goods_details.dart b/lib/store/shopping/shopping_goods_details.dart index 2d858bca..3d9412e4 100644 --- a/lib/store/shopping/shopping_goods_details.dart +++ b/lib/store/shopping/shopping_goods_details.dart @@ -1219,7 +1219,8 @@ class _ShoppingGoodsDetails extends State { Color(0xFF32A057), Color(0xFF61CE6B) ])), - child: Row( + child: + Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -1238,7 +1239,7 @@ class _ShoppingGoodsDetails extends State { text: pageType == null ? (miNiDetail?.price ?? "") : (activityDetails?.actProduct?.promotionPrice ?? - ""), + ""), style: TextStyle( fontSize: 28.sp, fontWeight: MyFontWeight.semi_bold, @@ -1249,6 +1250,7 @@ class _ShoppingGoodsDetails extends State { ), ), SizedBox(width: 4.w), + Expanded(child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, @@ -1267,87 +1269,250 @@ class _ShoppingGoodsDetails extends State { ), pageType == null ? Text( - "已售${miNiDetail?.sellCount ?? 0}件", + "已售${miNiDetail?.sellCount ?? 0}件", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 10.sp, + color: Colors.white, + ), + ) + : (pageType == "1" + ? Row( + children: [ + Container( + margin: EdgeInsets.only(right: 2), + padding: EdgeInsets.only(left: 2, right: 2), + height: 15.h, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(2), + color: Color(0xFFFFFFFF), + ), + child: Text( + "${limitNumber ?? 0}人团", + style: TextStyle( + fontSize: 9.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF45B35F), + ), + ), + ), + Text( + "已团${(activityDetails?.actProduct?.sellCount ?? 0)}件", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 11.sp, + color: Colors.white, + ), + ), + ], + ) + : (pageType == "3" + ? Row( + children: [ + Container( + margin: EdgeInsets.only(right: 2), + padding: + EdgeInsets.only(left: 2, right: 2), + height: 15.h, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: + BorderRadius.circular(2), + color: Color(0xFFFFFFFF), + ), + child: Text( + "最高可砍${double.parse(activityDetails?.actProduct?.productPrice ?? "0") - double.parse(activityDetails?.actProduct?.promotionPrice ?? "0")}元", style: TextStyle( - fontWeight: MyFontWeight.medium, + fontSize: 9.sp, + fontWeight: MyFontWeight.semi_bold, + color: Color(0xFF45B35F), + ), + ), + ), + Text( + "已砍${(activityDetails?.actProduct?.sellCount ?? 0)}件", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 11.sp, + color: Colors.white, + ), + ), + ], + ) + : Text( + "已秒${activityDetails?.actProduct?.sellCount ?? 0}件", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 10.sp, + color: Colors.white, + ), + ))) + ], + )), + pageType != null ? + (pageType == "2" ? + Row( + children: [ + MImage( + activityDetails?.actProduct?.rightImg ?? "", + width:72, + height:30.h, + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.png", + fadeSrc: "assets/image/default_1.png", + ), + Container( + width:91, + height:50, + color: Color(0xFFB1F6CD), + margin: EdgeInsets.only(left: 15), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + "距离结束", + style: TextStyle( + fontWeight: MyFontWeight.semi_bold, fontSize: 10.sp, - color: Colors.white, + color: Color(0xFF32A060), ), - ) - : (pageType == "1" - ? Row( - children: [ - Container( - margin: EdgeInsets.only(right: 2), - padding: EdgeInsets.only(left: 2, right: 2), - height: 15.h, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2), - color: Color(0xFFFFFFFF), - ), - child: Text( - "${limitNumber ?? 0}人团", - style: TextStyle( - fontSize: 9.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF45B35F), - ), + ), + SizedBox(height: 3), + Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + InkWell( + onTap: () { + setState(() {}); + }, + child: Container( + width: 13, + height: 14, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(1)), + child: Text( + "5", + style: TextStyle( + color: Colors.white, + fontSize: 10.sp, + fontWeight: MyFontWeight.medium, ), ), - Text( - "已团${(activityDetails?.actProduct?.sellCount ?? 0)}件", + ), + ), + Padding( + padding: EdgeInsets.only(left: 2.w, right: 2.w), + child: Text( + ":", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 10.sp, + color: Color(0xFF32A060), + ), + ), + ), + InkWell( + onTap: () { + setState(() {}); + }, + child: Container( + width: 13, + height: 14, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(1)), + child: Text( + "5", style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 11.sp, color: Colors.white, + fontSize: 10.sp, + fontWeight: MyFontWeight.medium, ), ), - ], - ) - : (pageType == "3" - ? Row( - children: [ - Container( - margin: EdgeInsets.only(right: 2), - padding: - EdgeInsets.only(left: 2, right: 2), - height: 15.h, - alignment: Alignment.center, - decoration: BoxDecoration( - borderRadius: - BorderRadius.circular(2), - color: Color(0xFFFFFFFF), - ), - child: Text( - "最高可砍${double.parse(activityDetails?.actProduct?.productPrice ?? "0") - double.parse(activityDetails?.actProduct?.promotionPrice ?? "0")}元", - style: TextStyle( - fontSize: 9.sp, - fontWeight: MyFontWeight.semi_bold, - color: Color(0xFF45B35F), - ), - ), - ), - Text( - "已砍${(activityDetails?.actProduct?.sellCount ?? 0)}件", - style: TextStyle( - fontWeight: MyFontWeight.medium, - fontSize: 11.sp, - color: Colors.white, - ), - ), - ], - ) - : Text( - "已秒${activityDetails?.actProduct?.sellCount ?? 0}件", + ), + ), + Padding( + padding: EdgeInsets.only(left: 2.w, right: 2.w), + child: Text( + ":", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 10.sp, + color: Color(0xFF32A060), + ), + ), + ),InkWell( + onTap: () { + setState(() {}); + }, + child: Container( + width: 13, + height: 14, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(1)), + child: Text( + "5", style: TextStyle( - fontWeight: MyFontWeight.medium, + color: Colors.white, fontSize: 10.sp, + fontWeight: MyFontWeight.medium, + ), + ), + ), + ), + Padding( + padding: EdgeInsets.only(left: 2.w, right: 2.w), + child: Text( + ":", + style: TextStyle( + fontWeight: MyFontWeight.medium, + fontSize: 10.sp, + color: Color(0xFF32A060), + ), + ), + ), + InkWell( + onTap: () { + setState(() {}); + }, + child: Container( + width: 13, + height: 14, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFF32A060), + borderRadius: BorderRadius.circular(1)), + child: Text( + "5", + style: TextStyle( color: Colors.white, + fontSize: 10.sp, + fontWeight: MyFontWeight.medium, ), - ))) - ], - ) + ), + ), + ), + ],) + ],), + ) + ],):Padding(padding:EdgeInsets.only(right:16), + child: + MImage( + activityDetails?.actProduct?.rightImg ?? "", + width:72, + height:30.h, + fit: BoxFit.cover, + errorSrc: "assets/image/default_1.png", + fadeSrc: "assets/image/default_1.png", + ),)) : Container(), ], ), ),