Browse Source

砍价支付更改

zyh
w-R 3 years ago
parent
commit
1a91322ef1
  1. 2
      lib/settlement/settlement.dart
  2. 6
      lib/store/shopping/shopping_goods_details.dart
  3. 38
      lib/store/shopping/shopping_home/bargain_details.dart
  4. 1102
      lib/store/shopping/shopping_home/group_details.dart
  5. 10
      lib/store/shopping/shopping_home/group_page_details.dart

2
lib/settlement/settlement.dart

@ -335,7 +335,7 @@ class _Settlement extends State<Settlement> {
baseData?.isSuccess ?? false
? SmartDialog.showToast("下单失败:订单实付金额不能为0",
alignment: Alignment.center)
: SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
: SmartDialog.showToast(baseData?.msg ?? "", alignment: Alignment.center);
}
} else {
///

6
lib/store/shopping/shopping_goods_details.dart

@ -497,7 +497,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
"actProductId":actProductId,
"actProductSkuId":skuId1,
},
);
).then((value) {
_onRefresh();
setState(() {});
});
}
///
@ -507,7 +510,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
"actRecordId": launchJoinAct.actRecordId,
"limitNumber":limitNumber,
"storeInfo":storeInfo,
"skuId":skuId1
});
}

38
lib/store/shopping/shopping_home/bargain_details.dart

@ -64,7 +64,7 @@ class _BargainDetails extends State<BargainDetails> {
actRecordId = widget.arguments["actRecordId"];
limitNumber = widget.arguments["limitNumber"];
storeInfo = widget.arguments["storeInfo"];
skuId = widget.arguments["skuId"];
// skuId = widget.arguments["skuId"];
startCountdownTimer();
SharedPreferences.getInstance().then((value) {
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 {
await Navigator.of(context).pushNamed(
'/router/settlement',
arguments: {
"storeInfo": storeInfo,
"pageType": 3,
"pageType": "3",
"isDirectBuy":true,
"productId": activityActRecordDetails.actProduct.productId,
"skuId":skuId,
"buyNum": 1,
"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))
GestureDetector(
onTap: (){
queryLaunchAct();
toOrder();
},
child: Container(
alignment: Alignment.center,

1102
lib/store/shopping/shopping_home/group_details.dart

File diff suppressed because it is too large Load Diff

10
lib/store/shopping/shopping_home/group_page_details.dart

@ -8,6 +8,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -137,7 +138,14 @@ class _GroupPageDetails extends State<GroupPageDetails> {
62.h -
MediaQuery.of(context).padding.top,
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
child: ListView.builder(
child: (actRecordAndJoinlDTOList == null || actRecordAndJoinlDTOList?.length == 0)
? NoDataView(
src:"assets/image/ding_dan.png",
isShowBtn: false,
text:"目前暂无参团列表,可下单发起拼团哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
):ListView.builder(
padding: EdgeInsets.zero,
itemCount: actRecordAndJoinlDTOList?.length ?? 0,
scrollDirection: Axis.vertical,

Loading…
Cancel
Save