|
|
|
@ -141,7 +141,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
queryMiNiDetail(id); |
|
|
|
|
} else { |
|
|
|
|
queryMiNiDetail(productId); |
|
|
|
|
queryViewProduct(actProductId, pageType); |
|
|
|
|
} |
|
|
|
|
EasyLoading.dismiss(); |
|
|
|
|
} |
|
|
|
@ -184,6 +183,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
setState(() { |
|
|
|
|
miNiDetail = baseData.data; |
|
|
|
|
if(pageType != null) |
|
|
|
|
queryViewProduct(actProductId, pageType); |
|
|
|
|
}); |
|
|
|
|
refreshController.refreshCompleted(); |
|
|
|
|
} else { |
|
|
|
@ -210,6 +211,15 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
setState(() { |
|
|
|
|
activityDetails = baseData.data; |
|
|
|
|
miNiDetail.productSkuVOList.forEach((element) { |
|
|
|
|
var sku = activityDetails.actProduct.skuJson.firstWhere((ele) => ele.skuId == element.id); |
|
|
|
|
if(sku == null ){ |
|
|
|
|
miNiDetail.productSkuVOList.remove(sku); |
|
|
|
|
}else{ |
|
|
|
|
element.skuPrice = sku.skuPrice.toString(); |
|
|
|
|
element.skuStock = sku.skuStock.toInt(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
refreshController.refreshCompleted(); |
|
|
|
|
} else { |
|
|
|
@ -279,7 +289,7 @@ 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 { |
|
|
|
@ -300,12 +310,14 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
.toString() |
|
|
|
|
.replaceAll("[", "") |
|
|
|
|
.replaceAll("]", "") |
|
|
|
|
.replaceAll(",", ""); |
|
|
|
|
.replaceAll(",", "") |
|
|
|
|
; |
|
|
|
|
setState(() { |
|
|
|
|
skuId1 = skuId; |
|
|
|
|
skuValue1 = skuValue; |
|
|
|
|
count1 = count; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
///商品➕1 |
|
|
|
@ -673,7 +685,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/group_details'); |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
@ -727,7 +739,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/bargain_details'); |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
@ -791,7 +803,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/group_details'); |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
@ -910,7 +922,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/group_details'); |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
@ -964,6 +976,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
|
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
toDownOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|