diff --git a/lib/login/new_login_page.dart b/lib/login/new_login_page.dart index ff90b763..a584b3eb 100644 --- a/lib/login/new_login_page.dart +++ b/lib/login/new_login_page.dart @@ -284,6 +284,7 @@ class _NewLoginPage extends State { @override Widget build(BuildContext context) { return Scaffold( + resizeToAvoidBottomInset: false, body: GestureDetector( behavior: HitTestBehavior.translucent, onTap: () { diff --git a/lib/settlement/settlement_view/activity_coupon_remarks.dart b/lib/settlement/settlement_view/activity_coupon_remarks.dart index 534434c1..1b4fe348 100644 --- a/lib/settlement/settlement_view/activity_coupon_remarks.dart +++ b/lib/settlement/settlement_view/activity_coupon_remarks.dart @@ -8,6 +8,9 @@ import 'package:huixiang/retrofit/data/min_order_info.dart'; import 'package:huixiang/retrofit/data/settleOrderInfo.dart'; import 'package:huixiang/utils/font_weight.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:intl/intl.dart'; + +import '../../view_widget/cupertino_date_picker.dart'; class ActivityCouponRemarks extends StatefulWidget { final Function() couponCart; @@ -290,6 +293,7 @@ class _ActivityCouponRemarks extends State { ), InkWell( onTap: () { + showDateSelector(); }, child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -329,6 +333,20 @@ class _ActivityCouponRemarks extends State { ); } + ///立即预约时间选择 + showDateSelector() async { + DateTime dateTime = await showModalBottomSheet( + backgroundColor: Colors.transparent, + context: context, + builder: (_) { + return CupertinoDatePickerWidget(); + }); + if (dateTime != null) { + String time = DateFormat("yyyy-MM-dd").format(dateTime) ; + setState(() {}); + } + } + String activityText() { String promotion = ""; if (widget.promotions == null || widget.promotions == "") { diff --git a/lib/store/store_order.dart b/lib/store/store_order.dart index 11a20298..d305b7a7 100644 --- a/lib/store/store_order.dart +++ b/lib/store/store_order.dart @@ -515,12 +515,12 @@ class _StoreOrderPage extends State Spacer(), GestureDetector( onTap: () { - // if(AppUtils.compareTime(storeInfo.openStartTime,DateFormat('HH:mm:ss').format(DateTime.now())) - // &&(!AppUtils.compareTime(storeInfo.openEndTime,DateFormat('HH:mm:ss').format(DateTime.now())))){ + if(AppUtils.compareTime(storeInfo.openStartTime,DateFormat('HH:mm:ss').format(DateTime.now())) + &&(!AppUtils.compareTime(storeInfo.openEndTime,DateFormat('HH:mm:ss').format(DateTime.now())))){ toDownOrder(); - // } - // else - // SmartDialog.showToast("营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", alignment: Alignment.center); + } + else + SmartDialog.showToast("营业时间:${storeInfo.openStartTime}-${storeInfo.openEndTime}", alignment: Alignment.center); }, child: RoundButton( width: 103.w,