|
|
|
@ -75,7 +75,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
Timer _timer; |
|
|
|
|
String testTime = "2021-12-30 10:00:00"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
void dispose() { |
|
|
|
|
super.dispose(); |
|
|
|
@ -96,7 +95,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
limitNumber = widget.arguments["limitNumber"]; |
|
|
|
|
limitTime = widget.arguments["limitTime"]; |
|
|
|
|
bannerImg = widget.arguments["bannerImg"]; |
|
|
|
|
productId =widget.arguments["productId"]; |
|
|
|
|
productId = widget.arguments["productId"]; |
|
|
|
|
|
|
|
|
|
startCountdownTimer(); |
|
|
|
|
debugPrint("store_param tenant:$tenant storeId:$storeId"); |
|
|
|
@ -183,8 +182,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
setState(() { |
|
|
|
|
miNiDetail = baseData.data; |
|
|
|
|
if(pageType != null) |
|
|
|
|
queryViewProduct(actProductId, pageType); |
|
|
|
|
if (pageType != null) queryViewProduct(actProductId, pageType); |
|
|
|
|
}); |
|
|
|
|
refreshController.refreshCompleted(); |
|
|
|
|
} else { |
|
|
|
@ -212,10 +210,11 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
setState(() { |
|
|
|
|
activityDetails = baseData.data; |
|
|
|
|
miNiDetail.productSkuVOList.forEach((element) { |
|
|
|
|
var sku = activityDetails.actProduct.skuJson.firstWhere((ele) => ele.skuId == element.id); |
|
|
|
|
if(sku == null ){ |
|
|
|
|
var sku = activityDetails.actProduct.skuJson |
|
|
|
|
.firstWhere((ele) => ele.skuId == element.id); |
|
|
|
|
if (sku == null) { |
|
|
|
|
miNiDetail.productSkuVOList.remove(sku); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
element.skuPrice = sku.skuPrice.toString(); |
|
|
|
|
element.skuStock = sku.skuStock.toInt(); |
|
|
|
|
} |
|
|
|
@ -289,7 +288,11 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///选规格添加购物车 |
|
|
|
|
Future _addShopCar(MiNiDetail miNiDetail, selectSkus, int count,) async { |
|
|
|
|
Future _addShopCar( |
|
|
|
|
MiNiDetail miNiDetail, |
|
|
|
|
selectSkus, |
|
|
|
|
int count, |
|
|
|
|
) async { |
|
|
|
|
if (selectSkus != null && selectSkus.length == 0) { |
|
|
|
|
productSku = miNiDetail.productSkuVOList.first; |
|
|
|
|
} else { |
|
|
|
@ -310,14 +313,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
.toString() |
|
|
|
|
.replaceAll("[", "") |
|
|
|
|
.replaceAll("]", "") |
|
|
|
|
.replaceAll(",", "") |
|
|
|
|
; |
|
|
|
|
.replaceAll(",", ""); |
|
|
|
|
setState(() { |
|
|
|
|
skuId1 = skuId; |
|
|
|
|
skuValue1 = skuValue; |
|
|
|
|
count1 = count; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///商品➕1 |
|
|
|
@ -355,7 +356,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_onRefresh(){ |
|
|
|
|
_onRefresh() { |
|
|
|
|
if (pageType == null) { |
|
|
|
|
queryMiNiDetail(id); |
|
|
|
|
} else { |
|
|
|
@ -370,10 +371,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
var callback = ((timer) { |
|
|
|
|
if (isDispose) return; |
|
|
|
|
setState(() { |
|
|
|
|
if((activityDetails?.actRecordAndJoinlDTOList) != null) |
|
|
|
|
if ((activityDetails?.actRecordAndJoinlDTOList) != null) |
|
|
|
|
activityDetails.actRecordAndJoinlDTOList.forEach((element) { |
|
|
|
|
var tempDateTime = |
|
|
|
|
DateTime.parse(element.actRecord.endTime).difference(DateTime.now()); |
|
|
|
|
var tempDateTime = DateTime.parse(element.actRecord.endTime) |
|
|
|
|
.difference(DateTime.now()); |
|
|
|
|
if (tempDateTime.inSeconds < 0) { |
|
|
|
|
element.actRecord.tempDay = 0; |
|
|
|
|
element.actRecord.tempHour = 0; |
|
|
|
@ -382,9 +383,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
element.actRecord.tempDay = tempDateTime.inDays; |
|
|
|
|
element.actRecord.tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24); |
|
|
|
|
element.actRecord.tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60); |
|
|
|
|
element.actRecord.tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); |
|
|
|
|
element.actRecord.tempHour = |
|
|
|
|
tempDateTime.inHours - (tempDateTime.inDays * 24); |
|
|
|
|
element.actRecord.tempM = |
|
|
|
|
tempDateTime.inMinutes - (tempDateTime.inHours * 60); |
|
|
|
|
element.actRecord.tempS = |
|
|
|
|
tempDateTime.inSeconds - (tempDateTime.inMinutes * 60); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
@ -404,12 +408,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
arguments: { |
|
|
|
|
"storeInfo": storeInfo, |
|
|
|
|
"tableId": tableId, |
|
|
|
|
// "parentCode": parentCode, |
|
|
|
|
// "parentId": parentId, |
|
|
|
|
"pName":pName, |
|
|
|
|
"pid":pid, |
|
|
|
|
"cName":cName, |
|
|
|
|
"cid":cid, |
|
|
|
|
"parentCode": parentCode, |
|
|
|
|
"parentId": parentId, |
|
|
|
|
"pName": pName, |
|
|
|
|
"pid": pid, |
|
|
|
|
"cName": cName, |
|
|
|
|
"cid": cid, |
|
|
|
|
"shoppingCartSkuItemList": [ |
|
|
|
|
{ |
|
|
|
|
"buyNum": count1, |
|
|
|
@ -426,7 +430,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
// "numberOfPeople": numberOfPeople, |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@ -465,12 +468,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
buildColumn(), |
|
|
|
|
|
|
|
|
|
///拼团 |
|
|
|
|
if (pageType == "1") |
|
|
|
|
groupOption(), |
|
|
|
|
if (pageType == "1") groupOption(), |
|
|
|
|
|
|
|
|
|
///拼团规则 |
|
|
|
|
if(pageType == "1") |
|
|
|
|
groupRule(), |
|
|
|
|
if (pageType == "1") groupRule(), |
|
|
|
|
goodsOption(), |
|
|
|
|
Padding( |
|
|
|
|
padding: EdgeInsets.only(top: 16.h, bottom: 12.h), |
|
|
|
@ -612,15 +613,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
///购买按钮 |
|
|
|
|
Widget payButton() { |
|
|
|
|
return Container( |
|
|
|
|
child:Row( |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
if(pageType == null) |
|
|
|
|
if (pageType == null) |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
if (productSku == null) |
|
|
|
|
SmartDialog.showToast("请选择規格!", alignment: Alignment.center); |
|
|
|
|
SmartDialog.showToast("请选择規格!", |
|
|
|
|
alignment: Alignment.center); |
|
|
|
|
addShoppingCar(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
@ -680,17 +682,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
///秒杀按钮 |
|
|
|
|
if(pageType == "2") |
|
|
|
|
if (pageType == "2") |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
width: 120.w, |
|
|
|
|
height:40.h, |
|
|
|
|
height: 40.h, |
|
|
|
|
margin: EdgeInsets.only(left: 6.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(16), |
|
|
|
@ -714,7 +716,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text:activityDetails?.actProduct?.productPrice ?? "", |
|
|
|
|
text: |
|
|
|
|
activityDetails?.actProduct?.productPrice ?? |
|
|
|
|
"", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
@ -724,8 +728,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded(child: |
|
|
|
|
Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"原价购买", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
@ -738,7 +742,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
@ -772,7 +776,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text: activityDetails?.actProduct?.promotionPrice ?? "", |
|
|
|
|
text: activityDetails |
|
|
|
|
?.actProduct?.promotionPrice ?? |
|
|
|
|
"", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
@ -782,15 +788,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded(child: |
|
|
|
|
Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"我要秒杀", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
),), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
@ -798,17 +805,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
///砍价 |
|
|
|
|
if(pageType == "3") |
|
|
|
|
if (pageType == "3") |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
width: 120.w, |
|
|
|
|
height:40.h, |
|
|
|
|
height: 40.h, |
|
|
|
|
margin: EdgeInsets.only(left: 6.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(16), |
|
|
|
@ -832,7 +839,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text:activityDetails?.actProduct?.productPrice ?? "", |
|
|
|
|
text: |
|
|
|
|
activityDetails?.actProduct?.productPrice ?? |
|
|
|
|
"", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
@ -842,8 +851,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded(child: |
|
|
|
|
Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"原价购买", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
@ -856,8 +865,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/bargain_details'); |
|
|
|
|
onTap: () { |
|
|
|
|
if (count1 == 0) { |
|
|
|
|
SmartDialog.showToast("请先选择您要购买的商品!~"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
Navigator.of(context) |
|
|
|
|
.popAndPushNamed('/router/bargain_details',arguments: { |
|
|
|
|
// "actRecordId": activityDetails.actRecordAndJoinlDTOList[0] |
|
|
|
|
// .actRecordJoinList[index].actRecordId, |
|
|
|
|
"actProduct":activityDetails.actProduct, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
@ -890,7 +908,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text:activityDetails?.actProduct?.promotionPrice ?? "", |
|
|
|
|
text: activityDetails |
|
|
|
|
?.actProduct?.promotionPrice ?? |
|
|
|
|
"", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
@ -900,34 +920,34 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded(child: |
|
|
|
|
Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"我要砍价", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
),), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///拼团按钮 |
|
|
|
|
if(pageType == "1") |
|
|
|
|
if (pageType == "1") |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
width: 120.w, |
|
|
|
|
height:40.h, |
|
|
|
|
height: 40.h, |
|
|
|
|
margin: EdgeInsets.only(left: 6.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(16), |
|
|
|
@ -951,7 +971,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text:activityDetails?.actProduct?.productPrice ?? "", |
|
|
|
|
text: |
|
|
|
|
activityDetails?.actProduct?.productPrice ?? |
|
|
|
|
"", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
@ -961,8 +983,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded(child: |
|
|
|
|
Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"单人购买", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
@ -975,7 +997,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
onTap: () { |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
@ -1009,7 +1031,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text:activityDetails?.actProduct?.promotionPrice ?? "", |
|
|
|
|
text: activityDetails |
|
|
|
|
?.actProduct?.promotionPrice ?? |
|
|
|
|
"", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
@ -1019,15 +1043,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded(child: |
|
|
|
|
Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"我要开团", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
),), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
@ -1342,7 +1367,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
height: 1.h, |
|
|
|
|
color: Color(0xFFF1F1F1), |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
if (pageType == null) { |
|
|
|
|
showStoreSelector(miNiDetail, id, 1); |
|
|
|
|
} else { |
|
|
|
|
showStoreSelector(miNiDetail, productId, 1); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
@ -1369,24 +1404,13 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
if(pageType == null){ |
|
|
|
|
showStoreSelector(miNiDetail, id, 1); |
|
|
|
|
}else { |
|
|
|
|
showStoreSelector(miNiDetail, productId, 1); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Icon( |
|
|
|
|
Icon( |
|
|
|
|
Icons.arrow_forward_ios, |
|
|
|
|
color: Colors.black, |
|
|
|
|
size: 16.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(left: 32.w, top: 8.h, bottom: 8.h), |
|
|
|
|
width: double.infinity, |
|
|
|
@ -1467,9 +1491,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
Navigator.of(context) |
|
|
|
|
.popAndPushNamed('/router/group_page_details', |
|
|
|
|
arguments: {"actRecordAndJoinlDTOList":json.encode(activityDetails.actRecordAndJoinlDTOList),}); |
|
|
|
|
Navigator.of(context).popAndPushNamed( |
|
|
|
|
'/router/group_page_details', |
|
|
|
|
arguments: { |
|
|
|
|
"actRecordAndJoinlDTOList": json |
|
|
|
|
.encode(activityDetails.actRecordAndJoinlDTOList), |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Text( |
|
|
|
@ -1491,7 +1518,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
SizedBox(height: 12.h), |
|
|
|
|
ListView.builder( |
|
|
|
|
padding: EdgeInsets.zero, |
|
|
|
|
itemCount:activityDetails?.actRecordAndJoinlDTOList?.length ?? 0, |
|
|
|
|
itemCount: activityDetails?.actRecordAndJoinlDTOList?.length ?? 0, |
|
|
|
|
scrollDirection: Axis.vertical, |
|
|
|
|
shrinkWrap: true, |
|
|
|
|
physics: NeverScrollableScrollPhysics(), |
|
|
|
@ -1500,7 +1527,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
onTap: () { |
|
|
|
|
setState(() {}); |
|
|
|
|
}, |
|
|
|
|
child: groupItem(activityDetails.actRecordAndJoinlDTOList[position],position), |
|
|
|
|
child: groupItem( |
|
|
|
|
activityDetails.actRecordAndJoinlDTOList[position], |
|
|
|
|
position), |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
@ -1509,7 +1538,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget groupItem(ActRecordAndJoinlDTOList actRecordAndJoinlDTOList,index) { |
|
|
|
|
Widget groupItem(ActRecordAndJoinlDTOList actRecordAndJoinlDTOList, index) { |
|
|
|
|
return Container( |
|
|
|
|
margin: EdgeInsets.only(top: 8.h, bottom: 8.h), |
|
|
|
|
child: Row( |
|
|
|
@ -1517,9 +1546,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
MImage( |
|
|
|
|
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ??"", |
|
|
|
|
width:30, |
|
|
|
|
height:30, |
|
|
|
|
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ?? "", |
|
|
|
|
width: 30, |
|
|
|
|
height: 30, |
|
|
|
|
fit: BoxFit.cover, |
|
|
|
|
isCircle: true, |
|
|
|
|
errorSrc: "assets/image/default_1.png", |
|
|
|
@ -1528,7 +1557,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
SizedBox(width: 4.w), |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberNickname ??"", |
|
|
|
|
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberNickname ?? |
|
|
|
|
"", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
@ -1551,7 +1581,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text:activityDetails.actRecordAndJoinlDTOList[0].actRecord.joinNum.toString(), |
|
|
|
|
text: (limitNumber - (activityDetails.actRecordAndJoinlDTOList[0].actRecord.joinNum)).toString(), |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
@ -1570,7 +1600,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"剩余${(actRecordAndJoinlDTOList?.actRecord?.tempDay != 0)?actRecordAndJoinlDTOList.actRecord.tempDay : ""}:${actRecordAndJoinlDTOList?.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempS ?? 0}", |
|
|
|
|
"剩余${(actRecordAndJoinlDTOList?.actRecord?.tempDay != 0) ? actRecordAndJoinlDTOList.actRecord.tempDay : ""}:${actRecordAndJoinlDTOList?.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempS ?? 0}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 10.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
@ -1580,9 +1610,14 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/group_details', |
|
|
|
|
arguments: {"actRecordId":activityDetails.actRecordAndJoinlDTOList[0].actRecordJoinList[index].actRecordId}); |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context) |
|
|
|
|
.popAndPushNamed('/router/group_details', arguments: { |
|
|
|
|
"actRecordId": activityDetails.actRecordAndJoinlDTOList[0] |
|
|
|
|
.actRecordJoinList[index].actRecordId, |
|
|
|
|
"actProduct":activityDetails.actProduct, |
|
|
|
|
"limitNumber":limitNumber, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
@ -1615,9 +1650,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) , |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|