Browse Source

拼团,直接购买流程,等后端更改,拼团页面_参与直接选规格结算,砍价选了規格跳转砍价详情,我的拼团/砍价跳转参与详情;

zyh
w-R 3 years ago
parent
commit
74d7a8c753
  1. 10
      lib/order/bargain_group_order.dart
  2. 2
      lib/order/order_history_page.dart
  3. 6
      lib/retrofit/data/activity_order_list.dart
  4. 148
      lib/retrofit/data/launch_join_act.dart
  5. 5
      lib/retrofit/min_api.dart
  6. 12
      lib/retrofit/min_api.g.dart
  7. 101
      lib/store/shopping/shopping_goods_details.dart
  8. 172
      lib/store/shopping/shopping_home/group_details.dart

10
lib/order/bargain_group_order.dart

@ -45,9 +45,6 @@ class _BargainGroupOrder extends State<BargainGroupOrder>
type = widget.arguments["type"]; type = widget.arguments["type"];
} }
///
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
@ -153,6 +150,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
}); });
} }
///
queryShowMyActList() async { queryShowMyActList() async {
BaseData<List<ActivityOrderList>> baseData = BaseData<List<ActivityOrderList>> baseData =
await minService.showMyActList({ await minService.showMyActList({
@ -193,6 +191,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
), ),
controller: _refreshController, controller: _refreshController,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
onLoading: _refresh,
onRefresh: _refresh, onRefresh: _refresh,
child: (activityOrderList != null && activityOrderList.length > 0) child: (activityOrderList != null && activityOrderList.length > 0)
? ?
@ -302,7 +301,6 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
// orderInfo.sendStatus, // orderInfo.sendStatus,
// orderInfo.isTakeOut) // orderInfo.isTakeOut)
// : "", // : "",
// "还差¥{activityOrderList?.howManyMoney ?? ""}砍价成功",
"还差${activityOrderList?.howManyMore ?? 0}人拼团成功", "还差${activityOrderList?.howManyMore ?? 0}人拼团成功",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
@ -444,10 +442,10 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context)
.popAndPushNamed('/router/group_details', arguments: { .pushNamed('/router/group_details', arguments: {
"actRecordId": activityOrderList.actRecordId, "actRecordId": activityOrderList.actRecordId,
"actProduct":activityOrderList, "actProduct":activityOrderList,
"limitNumber":activityOrderList.howManyMore, "limitNumber":activityOrderList.successNumber,
}); });
}, },
child: RoundButton( child: RoundButton(

2
lib/order/order_history_page.dart

@ -142,7 +142,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
}, },
), ),
onRefresh: _onRefresh, onRefresh: _onRefresh,
onLoading: queryOrder, // onLoading: queryOrder,
child: (orderInfos != null && orderInfos.length > 0) child: (orderInfos != null && orderInfos.length > 0)
? ListView.builder( ? ListView.builder(
itemCount: orderInfos != null ? orderInfos.length : 0, itemCount: orderInfos != null ? orderInfos.length : 0,

6
lib/retrofit/data/activity_order_list.dart

@ -22,6 +22,7 @@ class ActivityOrderList {
int actRecordState, int actRecordState,
bool actRecordJoinState, bool actRecordJoinState,
int howManyMore, int howManyMore,
int successNumber,
dynamic orderSum, dynamic orderSum,
dynamic bargainMoney, dynamic bargainMoney,
dynamic howManyMoney,}){ dynamic howManyMoney,}){
@ -34,6 +35,7 @@ class ActivityOrderList {
_actRecordState = actRecordState; _actRecordState = actRecordState;
_actRecordJoinState = actRecordJoinState; _actRecordJoinState = actRecordJoinState;
_howManyMore = howManyMore; _howManyMore = howManyMore;
_successNumber = successNumber;
_orderSum = orderSum; _orderSum = orderSum;
_bargainMoney = bargainMoney; _bargainMoney = bargainMoney;
_howManyMoney = howManyMoney; _howManyMoney = howManyMoney;
@ -49,6 +51,7 @@ class ActivityOrderList {
_actRecordState = json['actRecordState']; _actRecordState = json['actRecordState'];
_actRecordJoinState = json['actRecordJoinState']; _actRecordJoinState = json['actRecordJoinState'];
_howManyMore = json['howManyMore']; _howManyMore = json['howManyMore'];
_successNumber = json['successNumber'];
_orderSum = json['orderSum']; _orderSum = json['orderSum'];
_bargainMoney = json['bargainMoney']; _bargainMoney = json['bargainMoney'];
_howManyMoney = json['howManyMoney']; _howManyMoney = json['howManyMoney'];
@ -62,6 +65,7 @@ class ActivityOrderList {
int _actRecordState; int _actRecordState;
bool _actRecordJoinState; bool _actRecordJoinState;
int _howManyMore; int _howManyMore;
int _successNumber;
dynamic _orderSum; dynamic _orderSum;
dynamic _bargainMoney; dynamic _bargainMoney;
dynamic _howManyMoney; dynamic _howManyMoney;
@ -75,6 +79,7 @@ class ActivityOrderList {
int get actRecordState => _actRecordState; int get actRecordState => _actRecordState;
bool get actRecordJoinState => _actRecordJoinState; bool get actRecordJoinState => _actRecordJoinState;
int get howManyMore => _howManyMore; int get howManyMore => _howManyMore;
int get successNumber => _successNumber;
dynamic get orderSum => _orderSum; dynamic get orderSum => _orderSum;
dynamic get bargainMoney => _bargainMoney; dynamic get bargainMoney => _bargainMoney;
dynamic get howManyMoney => _howManyMoney; dynamic get howManyMoney => _howManyMoney;
@ -90,6 +95,7 @@ class ActivityOrderList {
map['actRecordState'] = _actRecordState; map['actRecordState'] = _actRecordState;
map['actRecordJoinState'] = _actRecordJoinState; map['actRecordJoinState'] = _actRecordJoinState;
map['howManyMore'] = _howManyMore; map['howManyMore'] = _howManyMore;
map ['successNumber'] = _successNumber;
map['orderSum'] = _orderSum; map['orderSum'] = _orderSum;
map['bargainMoney'] = _bargainMoney; map['bargainMoney'] = _bargainMoney;
map['howManyMoney'] = _howManyMoney; map['howManyMoney'] = _howManyMoney;

148
lib/retrofit/data/launch_join_act.dart

@ -0,0 +1,148 @@
/// id : "1491606527402835968"
/// createTime : "2022-02-10 10:54:43"
/// createUser : "1478548720785031168"
/// updateTime : "2022-02-10 10:54:43"
/// updateUser : "1478548720785031168"
/// storeId : "1460885296764682240"
/// type : 1
/// actTemplateId : "1490571620652154880"
/// actTimeId : "1490571620887035904"
/// actRecordId : "1491606526735941632"
/// mid : "1478548720785031168"
/// orderId : "1491606528052953088"
/// isLeader : true
/// memberAvatar : ""
/// memberNickname : "斯基"
/// productId : "1490571670107193344"
/// actPrice : "60"
/// state : false
/// isDelete : null
class LaunchJoinAct {
LaunchJoinAct({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
int type,
String actTemplateId,
String actTimeId,
String actRecordId,
String mid,
String orderId,
bool isLeader,
String memberAvatar,
String memberNickname,
String productId,
String actPrice,
bool state,
dynamic isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_type = type;
_actTemplateId = actTemplateId;
_actTimeId = actTimeId;
_actRecordId = actRecordId;
_mid = mid;
_orderId = orderId;
_isLeader = isLeader;
_memberAvatar = memberAvatar;
_memberNickname = memberNickname;
_productId = productId;
_actPrice = actPrice;
_state = state;
_isDelete = isDelete;
}
LaunchJoinAct.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_type = json['type'];
_actTemplateId = json['actTemplateId'];
_actTimeId = json['actTimeId'];
_actRecordId = json['actRecordId'];
_mid = json['mid'];
_orderId = json['orderId'];
_isLeader = json['isLeader'];
_memberAvatar = json['memberAvatar'];
_memberNickname = json['memberNickname'];
_productId = json['productId'];
_actPrice = json['actPrice'];
_state = json['state'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
int _type;
String _actTemplateId;
String _actTimeId;
String _actRecordId;
String _mid;
String _orderId;
bool _isLeader;
String _memberAvatar;
String _memberNickname;
String _productId;
String _actPrice;
bool _state;
dynamic _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
int get type => _type;
String get actTemplateId => _actTemplateId;
String get actTimeId => _actTimeId;
String get actRecordId => _actRecordId;
String get mid => _mid;
String get orderId => _orderId;
bool get isLeader => _isLeader;
String get memberAvatar => _memberAvatar;
String get memberNickname => _memberNickname;
String get productId => _productId;
String get actPrice => _actPrice;
bool get state => _state;
dynamic get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['type'] = _type;
map['actTemplateId'] = _actTemplateId;
map['actTimeId'] = _actTimeId;
map['actRecordId'] = _actRecordId;
map['mid'] = _mid;
map['orderId'] = _orderId;
map['isLeader'] = _isLeader;
map['memberAvatar'] = _memberAvatar;
map['memberNickname'] = _memberNickname;
map['productId'] = _productId;
map['actPrice'] = _actPrice;
map['state'] = _state;
map['isDelete'] = _isDelete;
return map;
}
}

5
lib/retrofit/min_api.dart

@ -20,6 +20,7 @@ import 'data/activity_details.dart';
import 'data/activity_order_list.dart'; import 'data/activity_order_list.dart';
import 'data/findMiNiGroupList.dart'; import 'data/findMiNiGroupList.dart';
import 'data/home_recommend_list.dart'; import 'data/home_recommend_list.dart';
import 'data/launch_join_act.dart';
import 'data/miNiDetail.dart'; import 'data/miNiDetail.dart';
import 'data/settleOrderInfo.dart'; import 'data/settleOrderInfo.dart';
import 'data/shoppingCart.dart'; import 'data/shoppingCart.dart';
@ -231,11 +232,11 @@ abstract class MinApiService {
/// ///
@POST("actTemplate/launchAct") @POST("actTemplate/launchAct")
Future<BaseData> launchAct(@Body() Map<String, dynamic> param); Future<BaseData<LaunchJoinAct>> launchAct(@Body() Map<String, dynamic> param);
/// ///
@POST("actTemplate/joinAct") @POST("actTemplate/joinAct")
Future<BaseData> joinAct(@Body() Map<String, dynamic> param); Future<BaseData<LaunchJoinAct>> joinAct(@Body() Map<String, dynamic> param);
/// ///
@POST("actTemplate/actPay") @POST("actTemplate/actPay")

12
lib/retrofit/min_api.g.dart

@ -491,7 +491,7 @@ class _MinApiService implements MinApiService {
} }
@override @override
Future<BaseData<dynamic>> launchAct(param) async { Future<BaseData<LaunchJoinAct>> launchAct(param) async {
ArgumentError.checkNotNull(param, 'param'); ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
@ -506,15 +506,15 @@ class _MinApiService implements MinApiService {
extra: _extra, extra: _extra,
baseUrl: baseUrl), baseUrl: baseUrl),
data: _data); data: _data);
final value = BaseData<dynamic>.fromJson( final value = BaseData<LaunchJoinAct>.fromJson(
_result.data, _result.data,
(json) => json as dynamic, (json) => LaunchJoinAct.fromJson(json),
); );
return value; return value;
} }
@override @override
Future<BaseData<dynamic>> joinAct(param) async { Future<BaseData<LaunchJoinAct>> joinAct(param) async {
ArgumentError.checkNotNull(param, 'param'); ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
@ -529,9 +529,9 @@ class _MinApiService implements MinApiService {
extra: _extra, extra: _extra,
baseUrl: baseUrl), baseUrl: baseUrl),
data: _data); data: _data);
final value = BaseData<dynamic>.fromJson( final value = BaseData<LaunchJoinAct>.fromJson(
_result.data, _result.data,
(json) => json as dynamic, (json) => LaunchJoinAct.fromJson(json),
); );
return value; return value;
} }

101
lib/store/shopping/shopping_goods_details.dart

@ -13,6 +13,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/activity_details.dart'; import 'package:huixiang/retrofit/data/activity_details.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/launch_join_act.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart'; import 'package:huixiang/retrofit/data/miNiDetail.dart';
import 'package:huixiang/retrofit/data/shoppingCart.dart'; import 'package:huixiang/retrofit/data/shoppingCart.dart';
import 'package:huixiang/retrofit/data/store_info.dart'; import 'package:huixiang/retrofit/data/store_info.dart';
@ -74,6 +75,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
bool isDispose = false; bool isDispose = false;
Timer _timer; Timer _timer;
String testTime = "2021-12-30 10:00:00"; String testTime = "2021-12-30 10:00:00";
LaunchJoinAct launchJoinAct;
@override @override
void dispose() { void dispose() {
@ -227,38 +229,62 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
} }
/// ///
// queryLaunchAct() async { queryLaunchAct() async {
// if (minService == null) if (minService == null)
// minService = MinApiService( minService = MinApiService(
// Dio(), Dio(),
// context: context, context: context,
// token: minToken, token: minToken,
// tenant: tenant, tenant: tenant,
// storeId: storeId, storeId: storeId,
// showLoading: false, showLoading: false,
// ); );
// BaseData baseData = await minService.launchAct({ BaseData baseData = await minService.launchAct({
// "actProductId":activityDetails.actProduct.id, "actProductId":activityDetails.actProduct.id,
// "actRecordId":0, "actRecordId":0,
// "actTemplateId":activityDetails.actProduct.templateId, "actTemplateId":activityDetails.actProduct.templateId,
// "actTimeId":activityDetails.actProduct.timeId, "actTimeId":activityDetails.actProduct.timeId,
// "getType":1, "getType":1,
// "productId":activityDetails.actProduct.productId, "productId":activityDetails.actProduct.productId,
// "skuId":activityDetails.actProduct.skuJson[0].skuId, "skuId":activityDetails.actProduct.skuJson[0].skuId,
// "skuPrice":activityDetails.actProduct.skuJson[0].skuPrice, "skuPrice":activityDetails.actProduct.skuJson[0].skuPrice,
// "templateType":pageType "templateType":pageType
// }).catchError((error) { }).catchError((error) {
// refreshController.refreshFailed(); refreshController.refreshFailed();
// }); });
// if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
// setState(() { setState(() {
// launchJoinAct = baseData.data;
// refreshController.refreshCompleted(); refreshController.refreshCompleted();
// }); });
// } else { } else {
// refreshController.refreshFailed(); refreshController.refreshFailed();
// } }
// } }
///
queryJoinAct() async {
BaseData baseData = await minService.joinAct({
"actProductId": "",
"actRecordId": "",
"actTemplateId": "",
"actTimeId":"",
"getType":1,
"productId":"",
"skuId":"",
"skuPrice":"",
"templateType":1
}).catchError((error) {
refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
launchJoinAct = baseData.data;
refreshController.refreshCompleted();
}else {
refreshController.refreshFailed();
}
}
/// ///
showStoreSelector(MiNiDetail miNiDetail, String id, int count) async { showStoreSelector(MiNiDetail miNiDetail, String id, int count) async {
@ -397,8 +423,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
/// ///
toDownOrder() async { toDownOrder() async {
// int num = count();
if (count1 == 0) { if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~"); SmartDialog.showToast("请先选择您要购买的商品!~");
return; return;
@ -427,7 +451,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
"tableId": tableId, "tableId": tableId,
}, },
], ],
// "numberOfPeople": numberOfPeople,
}, },
); );
} }
@ -1611,13 +1634,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
), ),
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.of(context)
.popAndPushNamed('/router/group_details', arguments: {
"actRecordId": activityDetails.actRecordAndJoinlDTOList[0]
.actRecordJoinList[index].actRecordId,
"actProduct":activityDetails.actProduct,
"limitNumber":limitNumber,
});
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,

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

@ -8,6 +8,8 @@ import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/retrofit/data/activity_actRecord_details.dart'; import 'package:huixiang/retrofit/data/activity_actRecord_details.dart';
import 'package:huixiang/retrofit/data/activity_details.dart'; import 'package:huixiang/retrofit/data/activity_details.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/launch_join_act.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
@ -31,7 +33,6 @@ class GroupDetails extends StatefulWidget {
class _GroupDetails extends State<GroupDetails> { class _GroupDetails extends State<GroupDetails> {
MinApiService minService; MinApiService minService;
String actRecordId; String actRecordId;
// ActProduct actProduct;
ActivityActRecordDetails activityActRecordDetails; ActivityActRecordDetails activityActRecordDetails;
bool isDispose = false; bool isDispose = false;
Timer _timer; Timer _timer;
@ -57,7 +58,6 @@ class _GroupDetails extends State<GroupDetails> {
void initState() { void initState() {
super.initState(); super.initState();
actRecordId = widget.arguments["actRecordId"]; actRecordId = widget.arguments["actRecordId"];
// actProduct = widget.arguments["actProduct"];
limitNumber = widget.arguments["limitNumber"]; limitNumber = widget.arguments["limitNumber"];
startCountdownTimer(); startCountdownTimer();
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
@ -166,11 +166,9 @@ class _GroupDetails extends State<GroupDetails> {
child: SingleChildScrollView( child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
child: FutureBuilder( child: FutureBuilder(
// future: queryHome(),
builder: (context, snapshot) { builder: (context, snapshot) {
return Column( return Column(
children: [ children: [
goodsInfo(),
inviteGroup(), inviteGroup(),
groupRule(), groupRule(),
], ],
@ -189,102 +187,6 @@ class _GroupDetails extends State<GroupDetails> {
); );
} }
///
Widget goodsInfo() {
return Container(
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
color: Colors.white),
margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 24.h),
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ClipRRect(
borderRadius: BorderRadius.circular(2),
child: Image.asset(
"assets/image/icon_story_td.png",
width: 85,
height: 85,
fit: BoxFit.cover,
),
),
// MImage(
// actProduct?.productImg??"",
// width: double.infinity,
// height: 166,
// fit: BoxFit.cover,
// errorSrc: "assets/image/default_1.png",
// fadeSrc: "assets/image/default_1.png",
// ),
SizedBox(
width: 10,
),
Expanded(
child: Container(
height: 85,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"[生态小农]山林放养鸡蛋30枚/盒备份 2",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
),
Text(
"套盒装",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF727272),
),
),
Text.rich(
TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
TextSpan(
text: "284.00",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF32A060),
),
),
],
),
),
],
),
))
],
),
);
}
/// ///
Widget inviteGroup() { Widget inviteGroup() {
return Container( return Container(
@ -418,7 +320,8 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E), color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0))
? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)), borderRadius: BorderRadius.circular(4)),
child: Text( child: Text(
tempHour.toString(), tempHour.toString(),
@ -438,7 +341,7 @@ class _GroupDetails extends State<GroupDetails> {
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E), color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E),
), ),
)), )),
InkWell( InkWell(
@ -449,7 +352,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E), color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)), borderRadius: BorderRadius.circular(4)),
child: Text( child: Text(
tempM.toString(), tempM.toString(),
@ -469,7 +372,7 @@ class _GroupDetails extends State<GroupDetails> {
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E), color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E),
), ),
)), )),
InkWell( InkWell(
@ -480,7 +383,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
// color: Color(0xFFD2D2D2), // color: Color(0xFFD2D2D2),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E), color:(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)) ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)), borderRadius: BorderRadius.circular(4)),
child: Text( child: Text(
tempS.toString(), tempS.toString(),
@ -506,7 +409,7 @@ class _GroupDetails extends State<GroupDetails> {
color: Colors.black, color: Colors.black,
), ),
), ),
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber) if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber && tempDay != 0 && tempHour!=0 && tempM !=0 && tempS !=0)
Text.rich( Text.rich(
TextSpan( TextSpan(
children: [ children: [
@ -537,6 +440,15 @@ class _GroupDetails extends State<GroupDetails> {
], ],
), ),
), ),
if(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0)
Text(
"很遗憾,拼团失败",
style: TextStyle(
fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold,
color: Colors.black,
),
),
SizedBox( SizedBox(
height: 32, height: 32,
), ),
@ -565,6 +477,7 @@ class _GroupDetails extends State<GroupDetails> {
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
}); });
}, },
child:Container( child:Container(
@ -584,7 +497,7 @@ class _GroupDetails extends State<GroupDetails> {
), ),
)), )),
), ),
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber) if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber && tempDay != 0 && tempHour!=0 && tempM != 0 && tempS != 0)
InkWell( InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
@ -622,28 +535,29 @@ class _GroupDetails extends State<GroupDetails> {
], ],
)), )),
), ),
// InkWell( if(((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) ||(tempDay == 0 && tempHour==0 && tempM ==0 && tempS ==0))
// onTap: () { InkWell(
// setState(() { onTap: () {
// }); setState(() {
// }, });
// child:Container( },
// width:double.infinity, child:Container(
// height:54.h, width:double.infinity,
// margin: EdgeInsets.only(bottom: 28), height:54.h,
// alignment: Alignment.center, margin: EdgeInsets.only(bottom: 28),
// decoration: BoxDecoration( alignment: Alignment.center,
// color: Color(0xFF00A359), decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(27)), color: Color(0xFF00A359),
// child: Text( borderRadius: BorderRadius.circular(27)),
// "联系客服退款", child: Text(
// style: TextStyle( "联系客服退款",
// fontSize: 16.sp, style: TextStyle(
// fontWeight: MyFontWeight.medium, fontSize: 16.sp,
// color: Colors.white, fontWeight: MyFontWeight.medium,
// ), color: Colors.white,
// )), ),
// ), )),
),
], ],
), ),
); );

Loading…
Cancel
Save