Browse Source

详情增加,普通购买待更改

zyh
w-R 3 years ago
parent
commit
4263e4ecaf
  1. 7
      lib/retrofit/data/activity_details.dart
  2. 2
      lib/store/shopping/activity_prefecture_details.dart
  3. 167
      lib/store/shopping/shopping_goods_details.dart

7
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<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
@ -597,6 +603,7 @@ class ActProduct {
map['shortName'] = _shortName;
map['supplierName'] = _supplierName;
map['detail'] = _detail;
map['rightImg'] = _rightImg;
return map;
}
}

2
lib/store/shopping/activity_prefecture_details.dart

@ -638,7 +638,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
"tenant": tenant,
"limitNumber":actTemplate.limitNumber,
"limitTime":actTemplate.limitTime,
"bannerImg":actTemplate.bannerImg
"bannerImg":actTemplate.bannerImg,
},
);
});

167
lib/store/shopping/shopping_goods_details.dart

@ -1219,7 +1219,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
Color(0xFF32A057),
Color(0xFF61CE6B)
])),
child: Row(
child:
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@ -1249,6 +1250,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
SizedBox(width: 4.w),
Expanded(child:
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
@ -1347,7 +1349,170 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
)))
],
)),
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: Color(0xFF32A060),
),
),
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,
),
),
),
),
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(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(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(),
],
),
),

Loading…
Cancel
Save