Browse Source

拼团砍价,修改

zyh
w-R 3 years ago
parent
commit
7509662de2
  1. BIN
      assets/image/2x/di_zhi.png
  2. BIN
      assets/image/2x/ding_dan.png
  3. BIN
      assets/image/2x/dong_tai.png
  4. BIN
      assets/image/2x/fen_si.png
  5. BIN
      assets/image/2x/guan_zhu.png
  6. BIN
      assets/image/2x/ka.png
  7. BIN
      assets/image/2x/xiao_fei.png
  8. BIN
      assets/image/3x/di_zhi.png
  9. BIN
      assets/image/3x/ding_dan.png
  10. BIN
      assets/image/3x/dong_tai.png
  11. BIN
      assets/image/3x/fen_si.png
  12. BIN
      assets/image/3x/guan_zhu.png
  13. BIN
      assets/image/3x/ka.png
  14. BIN
      assets/image/3x/xiao_fei.png
  15. BIN
      assets/image/di_zhi.png
  16. BIN
      assets/image/ding_dan.png
  17. BIN
      assets/image/dong_tai.png
  18. BIN
      assets/image/fen_si.png
  19. BIN
      assets/image/guan_zhu.png
  20. BIN
      assets/image/ka.png
  21. BIN
      assets/image/xiao_fei.png
  22. 9
      lib/community/community_list.dart
  23. 5
      lib/message/system_details.dart
  24. 1
      lib/message/system_message.dart
  25. 5
      lib/mine/coupons_page.dart
  26. 106
      lib/mine/fans_page.dart
  27. 17
      lib/mine/follow_page.dart
  28. 3
      lib/mine/manage_address_page.dart
  29. 3
      lib/mine/mine_wallet_page.dart
  30. 2
      lib/mine/release_page.dart
  31. 1
      lib/mine/roll_center_page.dart
  32. 1
      lib/mine/vip_balance_page.dart
  33. 1
      lib/mine/vip_card_page.dart
  34. 26
      lib/order/bargain_group_order.dart
  35. 5
      lib/order/exchange_history_page.dart
  36. 1
      lib/order/logistics_information_page.dart
  37. 33
      lib/order/order_history_page.dart
  38. 4
      lib/retrofit/min_api.dart
  39. 207
      lib/retrofit/min_api.g.dart
  40. 4
      lib/retrofit/retrofit_api.dart
  41. 132
      lib/retrofit/retrofit_api.g.dart
  42. 5
      lib/store/shopping/activity_prefecture_details.dart
  43. 29
      lib/store/shopping/shopping_cart/shopping_cart_page.dart
  44. 342
      lib/store/shopping/shopping_goods_details.dart
  45. 143
      lib/store/shopping/shopping_home/group_details.dart
  46. 1
      lib/store/shopping/shopping_home/recommend_goods_list_view.dart
  47. 2
      lib/store/shopping/shopping_mall_home.dart
  48. 1
      lib/store/store_view/store_activity.dart
  49. 6
      lib/view_widget/no_data_view.dart
  50. 2
      pubspec.lock

BIN
assets/image/2x/di_zhi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
assets/image/2x/ding_dan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
assets/image/2x/dong_tai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
assets/image/2x/fen_si.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
assets/image/2x/guan_zhu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
assets/image/2x/ka.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
assets/image/2x/xiao_fei.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/3x/di_zhi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
assets/image/3x/ding_dan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
assets/image/3x/dong_tai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

BIN
assets/image/3x/fen_si.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
assets/image/3x/guan_zhu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
assets/image/3x/ka.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
assets/image/3x/xiao_fei.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
assets/image/di_zhi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
assets/image/ding_dan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/dong_tai.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
assets/image/fen_si.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/guan_zhu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/image/ka.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
assets/image/xiao_fei.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

9
lib/community/community_list.dart

@ -10,6 +10,7 @@ import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -84,6 +85,14 @@ class _CommunityList extends State<CommunityList> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
(widget.comments == null || widget.comments.length == 0)
? NoDataView(
src: widget.commentType == 1 ? "assets/image/dong_tai.png" :"assets/image/guan_zhu.png",
isShowBtn: false,
text:widget.commentType == 1 ? "目前暂无发布动态,要把开心的事讲出来哦~" :"目前暂无添加关注,可在推荐中关注自己喜欢的人哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
):
ListView.builder(
padding: EdgeInsets.zero,
itemCount: widget.comments.length,

5
lib/message/system_details.dart

@ -198,6 +198,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [
(messages == null || messages.length == 0)
? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp,
@ -322,6 +323,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [
(messages == null || messages.length == 0)
? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp,
@ -457,6 +459,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [
(messages == null || messages.length == 0)
? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp,
@ -603,6 +606,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [
(messages == null || messages.length == 0)
? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp,
@ -846,6 +850,7 @@ class _SystemDetails extends State<SystemDetails> {
children: [
(messages == null || messages.length == 0)
? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp,

1
lib/message/system_message.dart

@ -403,6 +403,7 @@ class _SystemMessagePage extends State<SystemMessagePage> {
),
(messages == null || messages.length == 0)
? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp,

5
lib/mine/coupons_page.dart

@ -196,10 +196,11 @@ class _CouponsPage extends State<CouponsPage> {
itemCount: coupons != null ? coupons.length : 0,
)
: NoDataView(
src: "assets/image/ka.png",
isShowBtn: false,
text: "你还没有券",
text: "目前暂无优惠券,请到领劵中心领取哦",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
margin: EdgeInsets.only(top: 120.h,left:60,right:60),
),
),
),

106
lib/mine/fans_page.dart

@ -10,6 +10,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_footer.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -18,9 +19,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class FansPage extends StatefulWidget {
final Function refresh;
FansPage(
this.refresh
);
FansPage(this.refresh);
@override
State<StatefulWidget> createState() {
@ -81,12 +80,13 @@ class _FansPage extends State<FansPage> {
}
///
_vipFollow(followId,isFollow) async {
_vipFollow(followId, isFollow) async {
BaseData baseData = await apiService.follow(followId);
if (baseData != null && baseData.isSuccess) {
widget.refresh();
_queryFollowList();
SmartDialog.showToast(isFollow?"取关成功":"关注成功", alignment: Alignment.center);
SmartDialog.showToast(isFollow ? "取关成功" : "关注成功",
alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
@ -94,42 +94,44 @@ class _FansPage extends State<FansPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
margin: EdgeInsets.only(top: 2),
color: Colors.white,
child: SmartRefresher(
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
controller: _refreshController,
onRefresh: (){_queryFollowList();},
physics: BouncingScrollPhysics(),
child: ListView.builder(
itemCount: list == null ? 0 : list.length,
padding: EdgeInsets.symmetric(vertical: 8.h),
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: fansItem(list[position]),
);
},
)
// NoDataView(
// isShowBtn: false,
// text: "共关注0人",
// fontSize: 16.sp,
// margin: EdgeInsets.only(top: 120.h),
// ),
),
return Container(
margin: EdgeInsets.only(top: 2),
color: Colors.white,
child: SmartRefresher(
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
controller: _refreshController,
onRefresh: () {
_queryFollowList();
},
physics: BouncingScrollPhysics(),
child: (list == null || list.length == 0)
? NoDataView(
src: "assets/image/fen_si.png",
isShowBtn: false,
text: "目前暂无粉丝,听说多发动态可以涨粉哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
)
: ListView.builder(
itemCount: list == null ? 0 : list.length,
padding: EdgeInsets.symmetric(vertical: 8.h),
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
scrollDirection: Axis.vertical,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: fansItem(list[position]),
);
},
),
),
);
}
@ -154,15 +156,15 @@ class _FansPage extends State<FansPage> {
width: 8,
),
Expanded(
flex: 1,
flex: 1,
child: Text(
list != null ? (list.nickname ?? "") : "",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
)),
list != null ? (list.nickname ?? "") : "",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
)),
Container(
width: 56.w,
height: 25.h,
@ -173,7 +175,7 @@ class _FansPage extends State<FansPage> {
child: GestureDetector(
onTap: () {
setState(() {
_vipFollow(list.mid,list?.isFollow ?? false);
_vipFollow(list.mid, list?.isFollow ?? false);
});
},
child: RoundButton(
@ -186,9 +188,7 @@ class _FansPage extends State<FansPage> {
text: (list?.isFollow ?? false) ? "已关注" : "关注",
radius: 20,
icons: Icon(
(list?.isFollow ?? false)
? Icons.check
: Icons.add,
(list?.isFollow ?? false) ? Icons.check : Icons.add,
color: (list?.isFollow ?? false)
? Color(0xFF808080)
: Colors.white,

17
lib/mine/follow_page.dart

@ -112,7 +112,15 @@ class _FollowPage extends State<FollowPage> {
controller: _refreshController,
onRefresh: (){_queryFollowList();},
physics: BouncingScrollPhysics(),
child: ListView.builder(
child: (list == null || list.length == 0)
? NoDataView(
src: "assets/image/guan_zhu.png",
isShowBtn: false,
text: "目前暂无添加关注,可在推荐中关注自己喜欢的人哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h,left: 60.w,right: 60.w),
)
: ListView.builder(
itemCount: list == null ? 0 : list.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
@ -124,14 +132,7 @@ class _FollowPage extends State<FollowPage> {
);
},
),
// NoDataView(
// isShowBtn: false,
// text: "共关注0人",
// fontSize: 16.sp,
// margin: EdgeInsets.only(top: 120.h),
// ),
),
),
);
}

3
lib/mine/manage_address_page.dart

@ -66,8 +66,9 @@ class _ManageAddressPage extends State<ManageAddressPage> {
Expanded(
child: (addressList == null || addressList.length == 0)
? NoDataView(
src: "assets/image/di_zhi.png",
isShowBtn: false,
text: "目前暂无送货地址,请添加",
text: "目前暂无收货地址,请添加~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
)

3
lib/mine/mine_wallet_page.dart

@ -172,8 +172,9 @@ class _MineWalletPage extends State<MineWalletPage> {
margin: EdgeInsets.only(top: 14.h),
child: (userBills == null || userBills.length == 0)
? NoDataView(
src: "assets/image/ding_dan.png",
isShowBtn: false,
text: "目前暂未记录哦",
text: "目前暂无记录哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
)

2
lib/mine/release_page.dart

@ -103,7 +103,7 @@ class _ReleasePage extends State<ReleasePage> {
enablePullUp: true,
physics: BouncingScrollPhysics(),
header: MyHeader(),
footer: CustomFooter(
footer:CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},

1
lib/mine/roll_center_page.dart

@ -152,6 +152,7 @@ class _RollCenterPage extends State<RollCenterPage> {
itemCount: (coupons != null && coupons.length > 0) ? coupons.length : 0,
)
: NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: S.of(context).haimeiyouyouhuiquankeyilingqu,
fontSize: 16.sp,

1
lib/mine/vip_balance_page.dart

@ -92,6 +92,7 @@ class _VipBalancePage extends State<VipBalancePage> {
body: Container(
child: (userBills == null || userBills.length == 0)
? NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: S.of(context).nihaimeiyouchongzhihuoxiaofeijilu,
fontSize: 16.sp,

1
lib/mine/vip_card_page.dart

@ -88,6 +88,7 @@ class _VipCardPage extends State<VipCardPage> {
itemCount: coupons != null ? coupons.length : 0,
)
: NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: "还没有会员卡~",
fontSize: 16.sp,

26
lib/order/bargain_group_order.dart

@ -192,15 +192,10 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
},
),
controller: _refreshController,
physics: BouncingScrollPhysics(),
onRefresh: _refresh,
child: (activityOrderList?.length ?? 0) < 0
? NoDataView(
isShowBtn: false,
text: "还没有订单,快去下一单吧~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
)
:
child: (activityOrderList != null && activityOrderList.length > 0)
?
ListView.builder(
itemCount: activityOrderList?.length ?? 0,
shrinkWrap: true,
@ -208,6 +203,12 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
itemBuilder: (context, position) {
return bargainOrder(activityOrderList[position]);
},
):NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: "还没有订单,快去下一单吧~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
),
),
);
@ -441,7 +442,14 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
child: Row(
children: [
GestureDetector(
onTap: () {},
onTap: () {
Navigator.of(context)
.popAndPushNamed('/router/group_details', arguments: {
"actRecordId": activityOrderList.actRecordId,
"actProduct":activityOrderList,
"limitNumber":activityOrderList.howManyMore,
});
},
child: RoundButton(
height: 25.h,
text: "查看详情",

5
lib/order/exchange_history_page.dart

@ -191,10 +191,11 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
onLoading: queryHistory,
child: orders == null || orders.length == 0
? NoDataView(
src: "assets/image/ding_dan.png",
isShowBtn: false,
text: "暂无已完成的订单",
text: "目前暂无记录,手上那么多积分要赶紧用掉哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
margin: EdgeInsets.only(top: 120.h,left: 72,right: 72),
)
: ListView.builder(
itemCount: orders == null ? 0 : orders.length,

1
lib/order/logistics_information_page.dart

@ -153,6 +153,7 @@ class _LogisticsInformationPage extends State<LogisticsInformationPage> {
position, logistics.length);
})
: NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: "暂无物流信息~",
fontSize: 16.sp,

33
lib/order/order_history_page.dart

@ -156,8 +156,9 @@ class _OrderHistoryList extends State<OrderHistoryList>
);
})
: NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: "还没有订单,快去下一单吧~",
text: "目前暂无订单,快去下一单吧~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120),
),
@ -253,8 +254,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
width: 1,
color: Color(0xFF32A060),
style: BorderStyle.solid,
)
),
)),
child: Text(
"",
style: TextStyle(
@ -266,8 +266,8 @@ class _OrderHistoryList extends State<OrderHistoryList>
),
Container(
width: 19,
height:21,
margin: EdgeInsets.only(left:7.w,top: 12.h),
height: 21,
margin: EdgeInsets.only(left: 7.w, top: 12.h),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xff32A060),
@ -542,18 +542,21 @@ class _OrderHistoryList extends State<OrderHistoryList>
},
);
if (payChannel != null && payChannel > 0) {
OrderUtils.carryOnPay(payChannel, minService, orderInfo, () {
SmartDialog.showToast("订单支付成功");
Future.delayed(Duration(seconds: 1), () {
_onRefresh();
});
},);
OrderUtils.carryOnPay(
payChannel,
minService,
orderInfo,
() {
SmartDialog.showToast("订单支付成功");
Future.delayed(Duration(seconds: 1), () {
_onRefresh();
});
},
);
}
}
payResult(BaseData baseData) {
}
payResult(BaseData baseData) {}
orderCancel(String orderId) async {
BaseData baseData = await apiService.orderCancel(orderId);
@ -573,7 +576,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
// ? (orderInfo.storeVO.id ?? "")
// : "";
if(orderInfo.storeVO.posType.code == "NORMALSTORE") {
if (orderInfo.storeVO.posType.code == "NORMALSTORE") {
Scan.toScan(
context,
orderInfo.storeVO.id,

4
lib/retrofit/min_api.dart

@ -34,8 +34,8 @@ part 'min_api.g.dart';
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8765/app/";///
const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "http://192.168.10.236:8765/app/";///
// const baseUrl = "http://192.168.10.236:8765/app/";///
const base_url = "http://192.168.10.88:8765/app/";///

207
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/';
baseUrl ??= 'http://192.168.10.88:8765/app/';
}
final Dio _dio;
@ -400,4 +400,209 @@ class _MinApiService implements MinApiService {
);
return value;
}
@override
Future<BaseData<List<HomeRecommendList>>> recommendList() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'product/recommendList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<HomeRecommendList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<HomeRecommendList>(
(i) => HomeRecommendList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<ShoppingHomeConfig>> homeConfig() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('store/homeConfig',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ShoppingHomeConfig>.fromJson(
_result.data,
(json) => ShoppingHomeConfig.fromJson(json),
);
return value;
}
@override
Future<BaseData<ActivityAreaList>> findActListByType(allDay, type) async {
ArgumentError.checkNotNull(allDay, 'allDay');
ArgumentError.checkNotNull(type, 'type');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/findActListByType?allDay=$allDay&type=$type',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ActivityAreaList>.fromJson(
_result.data,
(json) => ActivityAreaList.fromJson(json),
);
return value;
}
@override
Future<BaseData<ActivityDetails>> viewProduct(actProductId, type) async {
ArgumentError.checkNotNull(actProductId, 'actProductId');
ArgumentError.checkNotNull(type, 'type');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/viewProduct?actProductId=$actProductId&type=$type',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ActivityDetails>.fromJson(
_result.data,
(json) => ActivityDetails.fromJson(json),
);
return value;
}
@override
Future<BaseData<dynamic>> launchAct(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/launchAct',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<dynamic>> joinAct(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/joinAct',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<dynamic>> actPay(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/actPay',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<List<ActivityOrderList>>> showMyActList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/showMyActList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<ActivityOrderList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<ActivityOrderList>(
(i) => ActivityOrderList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<ActivityActRecordDetails>> showOneAct(actRecordId) async {
ArgumentError.checkNotNull(actRecordId, 'actRecordId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/showOneAct?actRecordId=$actRecordId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ActivityActRecordDetails>.fromJson(
_result.data,
(json) => ActivityActRecordDetails.fromJson(json),
);
return value;
}
}

4
lib/retrofit/retrofit_api.dart

@ -61,8 +61,8 @@ part 'retrofit_api.g.dart';
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.236:8766/app/"; ///
// const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/";

132
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8766/app/';
baseUrl ??= 'http://192.168.10.88:8766/app/';
}
final Dio _dio;
@ -17,22 +17,17 @@ class _ApiService implements ApiService {
String baseUrl;
@override
Future<BaseData<UploadResult>> upload(data, folderId,bool isVideo) async {
Future<BaseData<UploadResult>> upload(data, folderId, isVideo) async {
ArgumentError.checkNotNull(data, 'data');
ArgumentError.checkNotNull(folderId, 'folderId');
ArgumentError.checkNotNull(isVideo, 'isVideo');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = FormData();
String fileName = data.path.split(Platform.pathSeparator).last;
if(!isVideo && !fileName.contains(".jpeg") && !fileName.contains(".png"))
fileName += ".jpeg";
else if(isVideo && !fileName.contains(".mp4"))
fileName += ".mp4";
_data.files.add(MapEntry(
'file',
MultipartFile.fromFileSync(data.path,
filename: fileName)));
print("filename:$fileName");
filename: data.path.split(Platform.pathSeparator).last)));
if (folderId != null) {
_data.fields.add(MapEntry('folderId', folderId.toString()));
}
@ -74,28 +69,6 @@ class _ApiService implements ApiService {
return value;
}
// @override
// Future<BaseData<dynamic>> memberLogin(param) async {
// ArgumentError.checkNotNull(param, 'param');
// const _extra = <String, dynamic>{};
// final queryParameters = <String, dynamic>{};
// final _data = <String, dynamic>{};
// _data.addAll(param ?? <String, dynamic>{});
// final _result = await _dio.request<Map<String, dynamic>>(
// '/auth/platform/memberLogin',
// queryParameters: queryParameters,
// options: RequestOptions(
// method: 'POST',
// headers: <String, dynamic>{},
// extra: _extra,
// baseUrl: baseUrl),
// data: _data);
// final value = BaseData<dynamic>.fromJson(
// _result.data,
// (json) => json as dynamic,
// );
// return value;
// }
@override
Future<BaseData<LoginInfo>> memberLogin(param) async {
ArgumentError.checkNotNull(param, 'param');
@ -114,7 +87,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<LoginInfo>.fromJson(
_result.data,
(json) => LoginInfo.fromJson(json),
(json) => LoginInfo.fromJson(json),
);
return value;
}
@ -315,7 +288,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
(json) => json as dynamic,
);
return value;
}
@ -374,15 +347,13 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _headers = <String, dynamic>{};
_headers.addAll({"Environment":"app"});
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/create',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: _headers,
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
@ -1037,8 +1008,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/app-msg/stats',
final _result = await _dio.request<Map<String, dynamic>>('/app-msg/stats',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
@ -1048,7 +1018,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<MsgStats>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
(json) => (json as List<dynamic>)
.map<MsgStats>((i) => MsgStats.fromJson(i as Map<String, dynamic>))
.toList());
return value;
@ -1414,8 +1384,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<CategorySelectList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<CategorySelectList>((i) => CategorySelectList.fromJson(i as Map<String, dynamic>))
(json) => (json as List<dynamic>)
.map<CategorySelectList>(
(i) => CategorySelectList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@ -1437,7 +1408,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<Chapter>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
(json) => (json as List<dynamic>)
.map<Chapter>((i) => Chapter.fromJson(i as Map<String, dynamic>))
.toList());
return value;
@ -1450,8 +1421,7 @@ class _ApiService implements ApiService {
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(map ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/course/list',
final _result = await _dio.request<Map<String, dynamic>>('/course/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
@ -1461,9 +1431,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<PageInfo<CourseList>>.fromJson(
_result.data,
(json) => PageInfo<CourseList>.fromJson(
(json) => PageInfo<CourseList>.fromJson(
json,
(json) => CourseList.fromJson(json),
(json) => CourseList.fromJson(json),
),
);
return value;
@ -1485,8 +1455,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<CollectClassList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<CollectClassList>((i) => CollectClassList.fromJson(i as Map<String, dynamic>))
(json) => (json as List<dynamic>)
.map<CollectClassList>(
(i) => CollectClassList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@ -1508,8 +1479,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<CourseList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<CourseList>((i) => CourseList.fromJson(i as Map<String, dynamic>))
(json) => (json as List<dynamic>)
.map<CourseList>(
(i) => CourseList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@ -1520,8 +1492,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/course/$id',
final _result = await _dio.request<Map<String, dynamic>>('/course/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
@ -1531,7 +1502,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<CourseDetails>.fromJson(
_result.data,
(json) => CourseDetails.fromJson(json),
(json) => CourseDetails.fromJson(json),
);
return value;
}
@ -1553,19 +1524,20 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<List<VipBadgesList>>> findBadges(param) async {
ArgumentError.checkNotNull(param, 'param');
Future<BaseData<List<VipBadgesList>>> findBadges(map) async {
ArgumentError.checkNotNull(map, 'map');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/app-memberAchievement/findBadges',
_data.addAll(map ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/app-memberAchievement/findBadges',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
@ -1575,14 +1547,16 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<VipBadgesList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<VipBadgesList>((i) => VipBadgesList.fromJson(i as Map<String, dynamic>))
(json) => (json as List<dynamic>)
.map<VipBadgesList>(
(i) => VipBadgesList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<List<AchievementDetailList>>> getAchievementDetail(achievementCategoryId) async {
Future<BaseData<List<AchievementDetailList>>> getAchievementDetail(
achievementCategoryId) async {
ArgumentError.checkNotNull(achievementCategoryId, 'achievementCategoryId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
@ -1598,8 +1572,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<AchievementDetailList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<AchievementDetailList>((i) => AchievementDetailList.fromJson(i as Map<String, dynamic>))
(json) => (json as List<dynamic>)
.map<AchievementDetailList>((i) =>
AchievementDetailList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@ -1620,8 +1595,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<VipBenefitList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<VipBenefitList>((i) => VipBenefitList.fromJson(i as Map<String, dynamic>))
(json) => (json as List<dynamic>)
.map<VipBenefitList>(
(i) => VipBenefitList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@ -1631,8 +1607,7 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/home/vipBenefit',
final _result = await _dio.request<Map<String, dynamic>>('/home/vipBenefit',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
@ -1642,7 +1617,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<VipRuleDetails>.fromJson(
_result.data,
(json) => VipRuleDetails.fromJson(json),
(json) => VipRuleDetails.fromJson(json),
);
return value;
}
@ -1663,8 +1638,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<SecondCardList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<SecondCardList>((i) => SecondCardList.fromJson(i as Map<String, dynamic>))
(json) => (json as List<dynamic>)
.map<SecondCardList>(
(i) => SecondCardList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@ -1686,7 +1662,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
(json) => json as dynamic,
);
return value;
}
@ -1708,7 +1684,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
(json) => json as dynamic,
);
return value;
}
@ -1730,7 +1706,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<Logistics>.fromJson(
_result.data,
(json) => Logistics.fromJson(json),
(json) => Logistics.fromJson(json),
);
return value;
}
@ -1752,7 +1728,7 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
(json) => json as dynamic,
);
return value;
}
@ -1773,8 +1749,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<HeadlinesList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<HeadlinesList>((i) => HeadlinesList.fromJson(i as Map<String, dynamic>))
(json) => (json as List<dynamic>)
.map<HeadlinesList>(
(i) => HeadlinesList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@ -1796,9 +1773,8 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<HeadlinesListDetails>.fromJson(
_result.data,
(json) => HeadlinesListDetails.fromJson(json),
(json) => HeadlinesListDetails.fromJson(json),
);
return value;
}
}

5
lib/store/shopping/activity_prefecture_details.dart

@ -176,7 +176,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
refreshController.refreshCompleted();
});
} else {
refreshController.refreshFailed();
refreshController.refreshCompleted();
}
}
@ -217,7 +217,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
physics: BouncingScrollPhysics(),
onRefresh: () {
setState(() {
queryFindActListByType(pageType == "2" ? false : true);
queryFindActListByType((pageType == "2" && seckillIndex == 0) ? false : true);
});
},
child:SingleChildScrollView(
@ -916,6 +916,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
],
),
),
SizedBox(width:2.w,),
Expanded(
child: Text(
productList.productPrice,

29
lib/store/shopping/shopping_cart/shopping_cart_page.dart

@ -13,6 +13,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';
import 'package:shared_preferences/shared_preferences.dart';
@ -388,26 +389,14 @@ class _ShoppingCartPage extends State<ShoppingCartPage>
}
Widget cartGoodsList(){
return
// ((shopCarGoods?.length ?? 0) > 0) ?Container(
// // width: double.infinity,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 47.h,left: 66.w,right: 59.w),
// child:Column(children: [
// Image.asset(
// "assets/image/shopping_k.png",
// width:double.infinity,
// height: 250.h,
// ),
// Text(
// "目前暂无商品,要快去买点好吃的哦~",
// style: TextStyle(
// fontSize: 16.sp,
// fontWeight: MyFontWeight.regular,
// color: Color(0xFF353535),
// ),
// ),
// ],)):
return (shopCarGoods == null || shopCarGoods.length == 0)
? NoDataView(
src: "assets/image/shopping_k.png",
isShowBtn: false,
text:"目前暂无商品,要快去买点好吃的哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 150.h),
):
Container(
margin: EdgeInsets.only(bottom: 50.h),
child: ListView.builder(

342
lib/store/shopping/shopping_goods_details.dart

@ -75,7 +75,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
Timer _timer;
String testTime = "2021-12-30 10:00:00";
@override
void dispose() {
super.dispose();
@ -96,7 +95,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
limitNumber = widget.arguments["limitNumber"];
limitTime = widget.arguments["limitTime"];
bannerImg = widget.arguments["bannerImg"];
productId =widget.arguments["productId"];
productId = widget.arguments["productId"];
startCountdownTimer();
debugPrint("store_param tenant:$tenant storeId:$storeId");
@ -183,8 +182,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
if (baseData != null && baseData.isSuccess) {
setState(() {
miNiDetail = baseData.data;
if(pageType != null)
queryViewProduct(actProductId, pageType);
if (pageType != null) queryViewProduct(actProductId, pageType);
});
refreshController.refreshCompleted();
} else {
@ -212,10 +210,11 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
setState(() {
activityDetails = baseData.data;
miNiDetail.productSkuVOList.forEach((element) {
var sku = activityDetails.actProduct.skuJson.firstWhere((ele) => ele.skuId == element.id);
if(sku == null ){
var sku = activityDetails.actProduct.skuJson
.firstWhere((ele) => ele.skuId == element.id);
if (sku == null) {
miNiDetail.productSkuVOList.remove(sku);
}else{
} else {
element.skuPrice = sku.skuPrice.toString();
element.skuStock = sku.skuStock.toInt();
}
@ -289,7 +288,11 @@ 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 {
@ -310,14 +313,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
.toString()
.replaceAll("[", "")
.replaceAll("]", "")
.replaceAll(",", "")
;
.replaceAll(",", "");
setState(() {
skuId1 = skuId;
skuValue1 = skuValue;
count1 = count;
});
}
///1
@ -355,7 +356,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
}
}
_onRefresh(){
_onRefresh() {
if (pageType == null) {
queryMiNiDetail(id);
} else {
@ -370,22 +371,25 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
var callback = ((timer) {
if (isDispose) return;
setState(() {
if((activityDetails?.actRecordAndJoinlDTOList) != null)
activityDetails.actRecordAndJoinlDTOList.forEach((element) {
var tempDateTime =
DateTime.parse(element.actRecord.endTime).difference(DateTime.now());
if (tempDateTime.inSeconds < 0) {
element.actRecord.tempDay = 0;
element.actRecord.tempHour = 0;
element.actRecord.tempM = 0;
element.actRecord.tempS = 0;
return;
}
element.actRecord.tempDay = tempDateTime.inDays;
element.actRecord.tempHour = tempDateTime.inHours - (tempDateTime.inDays * 24);
element.actRecord.tempM = tempDateTime.inMinutes - (tempDateTime.inHours * 60);
element.actRecord.tempS = tempDateTime.inSeconds - (tempDateTime.inMinutes * 60);
});
if ((activityDetails?.actRecordAndJoinlDTOList) != null)
activityDetails.actRecordAndJoinlDTOList.forEach((element) {
var tempDateTime = DateTime.parse(element.actRecord.endTime)
.difference(DateTime.now());
if (tempDateTime.inSeconds < 0) {
element.actRecord.tempDay = 0;
element.actRecord.tempHour = 0;
element.actRecord.tempM = 0;
element.actRecord.tempS = 0;
return;
}
element.actRecord.tempDay = tempDateTime.inDays;
element.actRecord.tempHour =
tempDateTime.inHours - (tempDateTime.inDays * 24);
element.actRecord.tempM =
tempDateTime.inMinutes - (tempDateTime.inHours * 60);
element.actRecord.tempS =
tempDateTime.inSeconds - (tempDateTime.inMinutes * 60);
});
});
});
_timer = Timer.periodic(oneSec, callback);
@ -404,12 +408,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
arguments: {
"storeInfo": storeInfo,
"tableId": tableId,
// "parentCode": parentCode,
// "parentId": parentId,
"pName":pName,
"pid":pid,
"cName":cName,
"cid":cid,
"parentCode": parentCode,
"parentId": parentId,
"pName": pName,
"pid": pid,
"cName": cName,
"cid": cid,
"shoppingCartSkuItemList": [
{
"buyNum": count1,
@ -426,7 +430,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
// "numberOfPeople": numberOfPeople,
},
);
}
@override
@ -465,12 +468,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
buildColumn(),
///
if (pageType == "1")
groupOption(),
if (pageType == "1") groupOption(),
///
if(pageType == "1")
groupRule(),
if (pageType == "1") groupRule(),
goodsOption(),
Padding(
padding: EdgeInsets.only(top: 16.h, bottom: 12.h),
@ -612,15 +613,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
///
Widget payButton() {
return Container(
child:Row(
child: Row(
children: [
if(pageType == null)
if (pageType == null)
Row(
children: [
GestureDetector(
onTap: () {
if (productSku == null)
SmartDialog.showToast("请选择規格!", alignment: Alignment.center);
SmartDialog.showToast("请选择規格!",
alignment: Alignment.center);
addShoppingCar();
},
child: Container(
@ -680,17 +682,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
///
if(pageType == "2")
if (pageType == "2")
Row(
children: [
GestureDetector(
onTap: (){
onTap: () {
toDownOrder();
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height:40.h,
height: 40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
@ -714,7 +716,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "",
text:
activityDetails?.actProduct?.productPrice ??
"",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
@ -724,8 +728,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"原价购买",
style: TextStyle(
fontSize: 12.sp,
@ -738,7 +742,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
GestureDetector(
onTap: (){
onTap: () {
toDownOrder();
},
child: Container(
@ -772,7 +776,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text: activityDetails?.actProduct?.promotionPrice ?? "",
text: activityDetails
?.actProduct?.promotionPrice ??
"",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
@ -782,15 +788,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
],
),
),
Expanded(child:
Text(
"我要秒杀",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
Expanded(
child: Text(
"我要秒杀",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
),),
),
],
),
)),
@ -798,17 +805,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
///
if(pageType == "3")
if (pageType == "3")
Row(
children: [
GestureDetector(
onTap: (){
onTap: () {
toDownOrder();
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height:40.h,
height: 40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
@ -832,7 +839,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "",
text:
activityDetails?.actProduct?.productPrice ??
"",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
@ -842,8 +851,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"原价购买",
style: TextStyle(
fontSize: 12.sp,
@ -856,8 +865,17 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/bargain_details');
onTap: () {
if (count1 == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
}
Navigator.of(context)
.popAndPushNamed('/router/bargain_details',arguments: {
// "actRecordId": activityDetails.actRecordAndJoinlDTOList[0]
// .actRecordJoinList[index].actRecordId,
"actProduct":activityDetails.actProduct,
});
},
child: Container(
alignment: Alignment.center,
@ -890,7 +908,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text:activityDetails?.actProduct?.promotionPrice ?? "",
text: activityDetails
?.actProduct?.promotionPrice ??
"",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
@ -900,34 +920,34 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
],
),
),
Expanded(child:
Text(
"我要砍价",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
Expanded(
child: Text(
"我要砍价",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
),),
),
],
),
)),
],
),
///
if(pageType == "1")
if (pageType == "1")
Row(
children: [
GestureDetector(
onTap: (){
onTap: () {
toDownOrder();
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height:40.h,
height: 40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
@ -951,7 +971,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "",
text:
activityDetails?.actProduct?.productPrice ??
"",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
@ -961,8 +983,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
],
),
),
Expanded(child:
Text(
Expanded(
child: Text(
"单人购买",
style: TextStyle(
fontSize: 12.sp,
@ -975,7 +997,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
GestureDetector(
onTap: (){
onTap: () {
toDownOrder();
},
child: Container(
@ -1009,7 +1031,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text:activityDetails?.actProduct?.promotionPrice ?? "",
text: activityDetails
?.actProduct?.promotionPrice ??
"",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
@ -1019,15 +1043,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
],
),
),
Expanded(child:
Text(
"我要开团",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
Expanded(
child: Text(
"我要开团",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
),),
),
],
),
)),
@ -1342,51 +1367,50 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
height: 1.h,
color: Color(0xFFF1F1F1),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"规格",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFA2A2A2),
),
),
SizedBox(
width: 8.w,
),
Expanded(
child: Text(
(skuValue1 ?? "请选择規格") + (count1 > 0 ? "x${count1}" : ""),
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF353535),
GestureDetector(
onTap: () {
setState(() {
if (pageType == null) {
showStoreSelector(miNiDetail, id, 1);
} else {
showStoreSelector(miNiDetail, productId, 1);
}
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"规格",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFA2A2A2),
),
),
),
),
GestureDetector(
onTap: () {
setState(() {
if(pageType == null){
showStoreSelector(miNiDetail, id, 1);
}else {
showStoreSelector(miNiDetail, productId, 1);
}
});
},
child: Icon(
Icons.arrow_forward_ios,
color: Colors.black,
size: 16.sp,
),
),
],
),
SizedBox(
width: 8.w,
),
Expanded(
child: Text(
(skuValue1 ?? "请选择規格") + (count1 > 0 ? "x${count1}" : ""),
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF353535),
),
),
),
Icon(
Icons.arrow_forward_ios,
color: Colors.black,
size: 16.sp,
),
],
)),
Container(
margin: EdgeInsets.only(left: 32.w, top: 8.h, bottom: 8.h),
width: double.infinity,
@ -1467,9 +1491,12 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
GestureDetector(
onTap: () {
setState(() {
Navigator.of(context)
.popAndPushNamed('/router/group_page_details',
arguments: {"actRecordAndJoinlDTOList":json.encode(activityDetails.actRecordAndJoinlDTOList),});
Navigator.of(context).popAndPushNamed(
'/router/group_page_details',
arguments: {
"actRecordAndJoinlDTOList": json
.encode(activityDetails.actRecordAndJoinlDTOList),
});
});
},
child: Text(
@ -1491,7 +1518,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
SizedBox(height: 12.h),
ListView.builder(
padding: EdgeInsets.zero,
itemCount:activityDetails?.actRecordAndJoinlDTOList?.length ?? 0,
itemCount: activityDetails?.actRecordAndJoinlDTOList?.length ?? 0,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
@ -1500,7 +1527,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
onTap: () {
setState(() {});
},
child: groupItem(activityDetails.actRecordAndJoinlDTOList[position],position),
child: groupItem(
activityDetails.actRecordAndJoinlDTOList[position],
position),
);
},
),
@ -1509,7 +1538,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
);
}
Widget groupItem(ActRecordAndJoinlDTOList actRecordAndJoinlDTOList,index) {
Widget groupItem(ActRecordAndJoinlDTOList actRecordAndJoinlDTOList, index) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
@ -1517,18 +1546,19 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
MImage(
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ??"",
width:30,
height:30,
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ?? "",
width: 30,
height: 30,
fit: BoxFit.cover,
isCircle: true,
isCircle: true,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
SizedBox(width: 4.w),
Expanded(
child: Text(
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberNickname ??"",
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberNickname ??
"",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
@ -1551,7 +1581,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text:activityDetails.actRecordAndJoinlDTOList[0].actRecord.joinNum.toString(),
text: (limitNumber - (activityDetails.actRecordAndJoinlDTOList[0].actRecord.joinNum)).toString(),
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
@ -1570,7 +1600,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
Text(
"剩余${(actRecordAndJoinlDTOList?.actRecord?.tempDay != 0)?actRecordAndJoinlDTOList.actRecord.tempDay : ""}:${actRecordAndJoinlDTOList?.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempS ?? 0}",
"剩余${(actRecordAndJoinlDTOList?.actRecord?.tempDay != 0) ? actRecordAndJoinlDTOList.actRecord.tempDay : ""}:${actRecordAndJoinlDTOList?.actRecord?.tempHour ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempM ?? 0}:${actRecordAndJoinlDTOList?.actRecord?.tempS ?? 0}",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
@ -1580,9 +1610,14 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
],
),
GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/group_details',
arguments: {"actRecordId":activityDetails.actRecordAndJoinlDTOList[0].actRecordJoinList[index].actRecordId});
onTap: () {
Navigator.of(context)
.popAndPushNamed('/router/group_details', arguments: {
"actRecordId": activityDetails.actRecordAndJoinlDTOList[0]
.actRecordJoinList[index].actRecordId,
"actProduct":activityDetails.actProduct,
"limitNumber":limitNumber,
});
},
child: Container(
alignment: Alignment.center,
@ -1615,9 +1650,8 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
color: Colors.white,
),
),
) ,
),
),
],
),
);

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

@ -6,6 +6,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/retrofit/data/activity_actRecord_details.dart';
import 'package:huixiang/retrofit/data/activity_details.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/utils/font_weight.dart';
@ -30,6 +31,7 @@ class GroupDetails extends StatefulWidget {
class _GroupDetails extends State<GroupDetails> {
MinApiService minService;
String actRecordId;
// ActProduct actProduct;
ActivityActRecordDetails activityActRecordDetails;
bool isDispose = false;
Timer _timer;
@ -38,6 +40,7 @@ class _GroupDetails extends State<GroupDetails> {
int tempHour = 0;
int tempM = 0;
int tempS = 0;
int limitNumber = 0;
@override
void dispose() {
@ -54,7 +57,8 @@ class _GroupDetails extends State<GroupDetails> {
void initState() {
super.initState();
actRecordId = widget.arguments["actRecordId"];
// actProduct = widget.arguments["actProduct"];
limitNumber = widget.arguments["limitNumber"];
startCountdownTimer();
SharedPreferences.getInstance().then((value) {
String minToken = value.getString("minToken");
@ -216,7 +220,7 @@ class _GroupDetails extends State<GroupDetails> {
),
),
// MImage(
// "",
// actProduct?.productImg??"",
// width: double.infinity,
// height: 166,
// fit: BoxFit.cover,
@ -381,7 +385,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center,
decoration: BoxDecoration(
// color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E),
color: (((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber) || tempDay == 0) ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)),
child: Text(
tempDay.toString(),
@ -401,7 +405,7 @@ class _GroupDetails extends State<GroupDetails> {
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
// color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
),
)),
],
@ -414,7 +418,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center,
decoration: BoxDecoration(
// color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)),
child: Text(
tempHour.toString(),
@ -434,7 +438,7 @@ class _GroupDetails extends State<GroupDetails> {
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
// color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
),
)),
InkWell(
@ -445,7 +449,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center,
decoration: BoxDecoration(
// color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)),
child: Text(
tempM.toString(),
@ -465,7 +469,7 @@ class _GroupDetails extends State<GroupDetails> {
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
// color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
),
)),
InkWell(
@ -476,7 +480,7 @@ class _GroupDetails extends State<GroupDetails> {
alignment: Alignment.center,
decoration: BoxDecoration(
// color: Color(0xFFD2D2D2),
color: Color(0xFFF8961E),
color: (activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber ? Color(0xFFD2D2D2):Color(0xFFF8961E),
borderRadius: BorderRadius.circular(4)),
child: Text(
tempS.toString(),
@ -493,14 +497,16 @@ class _GroupDetails extends State<GroupDetails> {
SizedBox(
height: 24,
),
// Text(
// "恭喜您拼团成功",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Colors.black,
// ),
// ),
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber)
Text(
"恭喜您拼团成功",
style: TextStyle(
fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold,
color: Colors.black,
),
),
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber)
Text.rich(
TextSpan(
children: [
@ -513,7 +519,7 @@ class _GroupDetails extends State<GroupDetails> {
),
),
TextSpan(
text:(activityActRecordDetails?.actRecord?.joinNum ?? 0).toString(),
text:(limitNumber - (activityActRecordDetails?.actRecord?.joinNum ?? 0)).toString(),
style: TextStyle(
fontSize: 18.sp,
fontWeight: MyFontWeight.semi_bold,
@ -531,14 +537,6 @@ class _GroupDetails extends State<GroupDetails> {
],
),
),
// Text(
// "很遗憾,拼团失败",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Colors.black,
// ),
// ),
SizedBox(
height: 32,
),
@ -551,11 +549,11 @@ class _GroupDetails extends State<GroupDetails> {
padding: EdgeInsets.zero,
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
itemCount:activityActRecordDetails?.actRecord?.joinNum ?? 0,
itemCount:limitNumber,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: groupItem(activityActRecordDetails.actRecordJoinList[position]),
child: groupItem(position),
);
},
),
@ -563,6 +561,7 @@ class _GroupDetails extends State<GroupDetails> {
SizedBox(
height:54.h,
),
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) == limitNumber)
InkWell(
onTap: () {
setState(() {
@ -585,44 +584,44 @@ class _GroupDetails extends State<GroupDetails> {
),
)),
),
// InkWell(
// onTap: () {
// setState(() {
// });
// },
// child:Container(
// width:double.infinity,
// height:54.h,
// margin: EdgeInsets.only(bottom: 28),
// alignment: Alignment.center,
// decoration: BoxDecoration(
// color: Color(0xFF00A359),
// borderRadius: BorderRadius.circular(27)),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Image.asset(
// "assets/image/wx.png",
// width:24,
// height:24,
// fit: BoxFit.cover,
// ),
// SizedBox(
// width:8,
// ),
// Text(
// "邀请微信好友一起拼团",
// style: TextStyle(
// fontSize: 16.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// )
// ],
// )),
// ),
//
if((activityActRecordDetails?.actRecord?.joinNum ?? 0) < limitNumber)
InkWell(
onTap: () {
setState(() {
});
},
child:Container(
width:double.infinity,
height:54.h,
margin: EdgeInsets.only(bottom: 28),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFF00A359),
borderRadius: BorderRadius.circular(27)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/image/wx.png",
width:24,
height:24,
fit: BoxFit.cover,
),
SizedBox(
width:8,
),
Text(
"邀请微信好友一起拼团",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
)
],
)),
),
// InkWell(
// onTap: () {
// setState(() {
@ -650,16 +649,19 @@ class _GroupDetails extends State<GroupDetails> {
);
}
Widget groupItem(ActRecordJoinList actRecordJoinList) {
Widget groupItem(position) {
return Container(
margin: EdgeInsets.only(right:25),
child:Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
if(position < (activityActRecordDetails?.actRecord?.joinNum ?? 0))
Stack(
children: [
Container(
width:70,
height:70,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(60),
@ -670,7 +672,7 @@ class _GroupDetails extends State<GroupDetails> {
),
),
child:MImage(
actRecordJoinList?.memberAvatar ?? "",
activityActRecordDetails.actRecordJoinList[position]?.memberAvatar ?? "",
width:60,
height:60,
fit: BoxFit.cover,
@ -679,7 +681,7 @@ class _GroupDetails extends State<GroupDetails> {
fadeSrc: "assets/image/default_1.png",
),
),
actRecordJoinList.isLeader ?
activityActRecordDetails.actRecordJoinList[position].isLeader ?
Align(
alignment: Alignment.bottomCenter,
child:Container(
@ -705,8 +707,7 @@ class _GroupDetails extends State<GroupDetails> {
):Container(),
],
),
if(
activityActRecordDetails.actRecord.joinNum != 0)
if(position >= (activityActRecordDetails?.actRecord?.joinNum ?? 0))
Container(
width: 60,
height: 67,

1
lib/store/shopping/shopping_home/recommend_goods_list_view.dart

@ -42,6 +42,7 @@ class _RecommendGoodsListView extends State<RecommendGoodsListView> {
),
),
Container(
margin: EdgeInsets.only(top:5.h),
color: Color(0xFF32A060),
width: 35.w,
height: 5.h,

2
lib/store/shopping/shopping_mall_home.dart

@ -121,7 +121,7 @@ class _ShoppingMallHome extends State<ShoppingMallHome>
children: [
Container(
// padding: EdgeInsets.only(top: 40.h),
height: 260.h,
height: 230.h,
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.centerRight,

1
lib/store/store_view/store_activity.dart

@ -30,6 +30,7 @@ class _StoreActivity extends State<StoreActivity> {
),
color: Colors.white,
child: NoDataView(
src: "assets/image/icon_empty.png",
isShowBtn: false,
text: "还没有活动~",
iconWidth: 220,

6
lib/view_widget/no_data_view.dart

@ -3,6 +3,7 @@ import 'package:huixiang/view_widget/round_button.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class NoDataView extends StatelessWidget {
final String src;
final bool isShowBtn;
final String text;
final double fontSize;
@ -11,6 +12,7 @@ class NoDataView extends StatelessWidget {
final EdgeInsets margin;
NoDataView({
this.src,
this.isShowBtn = true,
this.text,
this.fontSize,
@ -27,7 +29,7 @@ class NoDataView extends StatelessWidget {
child: Column(
children: [
Image(
image: AssetImage("assets/image/icon_empty.png"),
image: AssetImage(src),
width: iconWidth,
height: iconHeight,
),
@ -36,8 +38,10 @@ class NoDataView extends StatelessWidget {
),
Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: fontSize,
height: 1.5,
color: Color(0xFF353535),
),
),

2
pubspec.lock

@ -867,7 +867,7 @@ packages:
name: xdg_directories
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.0"
version: "0.2.0+1"
xml:
dependency: transitive
description:

Loading…
Cancel
Save