|
|
@ -64,7 +64,7 @@ class _BargainDetails extends State<BargainDetails> { |
|
|
|
actRecordId = widget.arguments["actRecordId"]; |
|
|
|
actRecordId = widget.arguments["actRecordId"]; |
|
|
|
limitNumber = widget.arguments["limitNumber"]; |
|
|
|
limitNumber = widget.arguments["limitNumber"]; |
|
|
|
storeInfo = widget.arguments["storeInfo"]; |
|
|
|
storeInfo = widget.arguments["storeInfo"]; |
|
|
|
skuId = widget.arguments["skuId"]; |
|
|
|
// skuId = widget.arguments["skuId"]; |
|
|
|
startCountdownTimer(); |
|
|
|
startCountdownTimer(); |
|
|
|
SharedPreferences.getInstance().then((value) { |
|
|
|
SharedPreferences.getInstance().then((value) { |
|
|
|
String minToken = value.getString("minToken"); |
|
|
|
String minToken = value.getString("minToken"); |
|
|
@ -128,47 +128,21 @@ class _BargainDetails extends State<BargainDetails> { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///发起活动 |
|
|
|
|
|
|
|
queryLaunchAct() async { |
|
|
|
|
|
|
|
BaseData baseData = await minService.launchAct({ |
|
|
|
|
|
|
|
"actProductId": activityActRecordDetails.actRecord.actProductId, |
|
|
|
|
|
|
|
"actRecordId": 0, |
|
|
|
|
|
|
|
"actTemplateId": activityActRecordDetails.actRecord.actTemplateId, |
|
|
|
|
|
|
|
"actTimeId": activityActRecordDetails.actRecord.actTimeId, |
|
|
|
|
|
|
|
"addressId":"", |
|
|
|
|
|
|
|
"isDirectBuy":true, |
|
|
|
|
|
|
|
"getType": 1, |
|
|
|
|
|
|
|
"productId":activityActRecordDetails.actProduct.productId, |
|
|
|
|
|
|
|
"skuId": skuId, |
|
|
|
|
|
|
|
"skuPrice": activityActRecordDetails.actProduct.promotionPrice, |
|
|
|
|
|
|
|
"templateType": 3 |
|
|
|
|
|
|
|
}).catchError((error) { |
|
|
|
|
|
|
|
refreshController.refreshFailed(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
launchJoinAct = baseData.data; |
|
|
|
|
|
|
|
toOrder(); |
|
|
|
|
|
|
|
refreshController.refreshCompleted(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
refreshController.refreshFailed(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///直接购买去下单结算页面 |
|
|
|
///直接购买去下单结算页面 |
|
|
|
toOrder() async { |
|
|
|
toOrder() async { |
|
|
|
await Navigator.of(context).pushNamed( |
|
|
|
await Navigator.of(context).pushNamed( |
|
|
|
'/router/settlement', |
|
|
|
'/router/settlement', |
|
|
|
arguments: { |
|
|
|
arguments: { |
|
|
|
"storeInfo": storeInfo, |
|
|
|
"storeInfo": storeInfo, |
|
|
|
"pageType": 3, |
|
|
|
"pageType": "3", |
|
|
|
"isDirectBuy":true, |
|
|
|
"isDirectBuy":true, |
|
|
|
"productId": activityActRecordDetails.actProduct.productId, |
|
|
|
"productId": activityActRecordDetails.actProduct.productId, |
|
|
|
"skuId":skuId, |
|
|
|
"skuId":skuId, |
|
|
|
"buyNum": 1, |
|
|
|
"buyNum": 1, |
|
|
|
"skuValue1":activityActRecordDetails.skuName, |
|
|
|
"skuValue1":activityActRecordDetails.skuName, |
|
|
|
"orderId":launchJoinAct.orderId |
|
|
|
"orderId":launchJoinAct.orderId, |
|
|
|
|
|
|
|
"actProductId":activityActRecordDetails.actProduct.id, |
|
|
|
|
|
|
|
"actProductSkuId":activityActRecordDetails.actProduct.skuJson, |
|
|
|
}, |
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
@ -566,7 +540,7 @@ class _BargainDetails extends State<BargainDetails> { |
|
|
|
(activityActRecordDetails?.actRecord?.joinNum ?? 0)) |
|
|
|
(activityActRecordDetails?.actRecord?.joinNum ?? 0)) |
|
|
|
GestureDetector( |
|
|
|
GestureDetector( |
|
|
|
onTap: (){ |
|
|
|
onTap: (){ |
|
|
|
queryLaunchAct(); |
|
|
|
toOrder(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Container( |
|
|
|
child: Container( |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|