Browse Source

新版更新;

zyh
w-R 3 years ago
parent
commit
046be46c5e
  1. BIN
      assets/image/2x/discount.webp
  2. BIN
      assets/image/2x/fa_bu.webp
  3. BIN
      assets/image/2x/hot_list.webp
  4. BIN
      assets/image/2x/icon_mine_records_of_consumption.webp
  5. BIN
      assets/image/2x/jifen.webp
  6. BIN
      assets/image/2x/ming_xi.webp
  7. BIN
      assets/image/2x/welfare_zx.webp
  8. BIN
      assets/image/3x/discount.webp
  9. BIN
      assets/image/3x/fa_bu.webp
  10. BIN
      assets/image/3x/hot_list.webp
  11. BIN
      assets/image/3x/icon_mine_records_of_consumption.webp
  12. BIN
      assets/image/3x/jifen.webp
  13. BIN
      assets/image/3x/ming_xi.webp
  14. BIN
      assets/image/3x/welfare_zx.webp
  15. BIN
      assets/image/discount.webp
  16. BIN
      assets/image/fa_bu.webp
  17. BIN
      assets/image/hot_list.webp
  18. BIN
      assets/image/icon_mine_records_of_consumption.webp
  19. BIN
      assets/image/jifen.webp
  20. BIN
      assets/image/ming_xi.webp
  21. BIN
      assets/image/welfare_zx.webp
  22. 4
      lib/generated/intl/messages_en.dart
  23. 4
      lib/generated/intl/messages_zh_CN.dart
  24. 4
      lib/generated/intl/messages_zh_Hans_CN.dart
  25. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  26. 2
      lib/generated/intl/messages_zh_TW.dart
  27. 8
      lib/generated/l10n.dart
  28. 25
      lib/home/home_page.dart
  29. 113
      lib/home/home_view/discount_zone.dart
  30. 2
      lib/home/home_view/home_banner.dart
  31. 4
      lib/home/home_view/shortcut_operation.dart
  32. 5
      lib/home/home_view/top_selling_list.dart
  33. 25
      lib/home/home_view/welfare_core.dart
  34. 44
      lib/home/points_mall_view/points_goods_title.dart
  35. 31
      lib/home/points_mall_view/points_goods_view.dart
  36. 53
      lib/home/welfare_exchange.dart
  37. 149
      lib/home/welfare_page.dart
  38. 2
      lib/integral/integral_page.dart
  39. 4
      lib/integral/intergra_view/in_for_points.dart
  40. 59
      lib/integral_store/integral_store_details_page.dart
  41. 4
      lib/l10n/intl_en.arb
  42. 4
      lib/l10n/intl_zh_CN.arb
  43. 4
      lib/l10n/intl_zh_Hans_CN.arb
  44. 2
      lib/l10n/intl_zh_Hant_CN.arb
  45. 2
      lib/l10n/intl_zh_TW.arb
  46. 7
      lib/main_page.dart
  47. 114
      lib/mine/coupon_page.dart
  48. 17
      lib/mine/coupons_page.dart
  49. 205
      lib/mine/mine_shop_details.dart
  50. 1
      lib/mine/mine_view/calendar_page.dart
  51. 81
      lib/mine/mine_view/mine_item.dart
  52. 14
      lib/mine/mine_view/mine_view.dart
  53. 93
      lib/mine/recharge_page.dart
  54. 14
      lib/mine/roll_center_page.dart
  55. 2
      lib/mine/vip_balance_page.dart
  56. 1
      lib/order/exchange_history_page.dart
  57. 370
      lib/order/exchange_order_page.dart
  58. 6
      lib/order/order_view/order_commodity.dart
  59. 4
      lib/order/order_view/order_status.dart
  60. 4
      lib/order/store_selector_page.dart
  61. 78
      lib/qr/invite_friends.dart
  62. 1
      lib/qr/qr_share_image.dart
  63. 6
      lib/retrofit/data/coupon.dart
  64. 3
      lib/retrofit/data/settleOrderInfo.dart
  65. 2
      lib/retrofit/retrofit_api.dart
  66. 2
      lib/setting/logout_page.dart
  67. 141
      lib/setting/treaty_page.dart
  68. 273
      lib/settlement/settlement_view/coupon.dart
  69. 7
      lib/settlement/settlement_view/settlement_order_commodity.dart
  70. 4
      lib/store/store_order.dart
  71. 4
      lib/store/store_view/product_sku.dart
  72. 62
      lib/store/store_view/shop_goods.dart
  73. 0
      lib/union/un_page.dart
  74. 32
      lib/union/union_page.dart
  75. 94
      lib/view_widget/coupon_details_dialog.dart
  76. 2
      lib/view_widget/mine_vip_entry.dart
  77. 16
      lib/view_widget/my_appbar.dart
  78. 55
      lib/view_widget/new_coupon_widget.dart
  79. 106
      lib/view_widget/recharge_details_dialog.dart
  80. 14
      lib/view_widget/selector_store_dialog.dart

BIN
assets/image/2x/discount.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/2x/fa_bu.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/hot_list.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

BIN
assets/image/2x/icon_mine_records_of_consumption.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 B

BIN
assets/image/2x/jifen.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 44 KiB

BIN
assets/image/2x/ming_xi.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
assets/image/2x/welfare_zx.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 52 KiB

BIN
assets/image/3x/discount.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
assets/image/3x/fa_bu.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
assets/image/3x/hot_list.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 KiB

BIN
assets/image/3x/icon_mine_records_of_consumption.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/3x/jifen.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 96 KiB

BIN
assets/image/3x/ming_xi.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
assets/image/3x/welfare_zx.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

After

Width:  |  Height:  |  Size: 94 KiB

BIN
assets/image/discount.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/fa_bu.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 974 B

BIN
assets/image/hot_list.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
assets/image/icon_mine_records_of_consumption.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

BIN
assets/image/jifen.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/image/ming_xi.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/welfare_zx.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 21 KiB

4
lib/generated/intl/messages_en.dart

@ -218,8 +218,8 @@ class MessageLookup extends MessageLookupByLibrary {
"fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"),
"fasong" : MessageLookupByLibrary.simpleMessage("发送"),
"faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到卡包即可使用!"),
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉丝"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"),

4
lib/generated/intl/messages_zh_CN.dart

@ -218,8 +218,8 @@ class MessageLookup extends MessageLookupByLibrary {
"fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"),
"fasong" : MessageLookupByLibrary.simpleMessage("发送"),
"faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到卡包即可使用!"),
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉丝"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"),

4
lib/generated/intl/messages_zh_Hans_CN.dart

@ -218,8 +218,8 @@ class MessageLookup extends MessageLookupByLibrary {
"fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"),
"fasong" : MessageLookupByLibrary.simpleMessage("发送"),
"faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到卡包即可使用!"),
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉丝"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -217,7 +217,7 @@ class MessageLookup extends MessageLookupByLibrary {
"fasong" : MessageLookupByLibrary.simpleMessage("發送"),
"faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非實物兌換碼"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品!"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉絲"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"),

2
lib/generated/intl/messages_zh_TW.dart

@ -219,7 +219,7 @@ class MessageLookup extends MessageLookupByLibrary {
"fasong" : MessageLookupByLibrary.simpleMessage("發送"),
"faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非實物兌換碼"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品!"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉絲"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"),

8
lib/generated/l10n.dart

@ -1055,10 +1055,10 @@ class S {
);
}
/// ``
/// ``
String get feishiwuduihuanma {
return Intl.message(
'非实物兑换',
'非实物兑换',
name: 'feishiwuduihuanma',
desc: '',
args: [],
@ -2405,10 +2405,10 @@ class S {
);
}
/// `使`
/// `使`
String get feishiwushangpin {
return Intl.message(
'非实物商品兑换后领取到卡包即可使用!',
'非实物商品兑换后领取到优惠券即可使用!',
name: 'feishiwushangpin',
desc: '',
args: [],

25
lib/home/home_page.dart

@ -70,9 +70,8 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
setState(() {});
}
});
queryMsgStats();
queryActivity();
queryCoupon();
_onRefresh();
if ((widget.invite ?? "") != "" ||
widget.interviewCouponList != null &&
@ -126,6 +125,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
String categoryId;
int pageNum = 1;
int couponPageNum = 1;
bool showInvite = false;
bool showNew = false;
@ -285,11 +285,11 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
}
BaseData<List<MsgStats>> baseData = await apiService.stats().catchError((onError) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
// setState(() {
totalMsg = 0;
baseData.data.forEach((element) {
totalMsg += element.number;
});
// });
});
}
EasyLoading.dismiss();
@ -344,7 +344,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
}
BaseData<PageInfo<Coupon>> baseData = await apiService.queryCoupon({
"centre": true,
"pageNum": pageNum,
"pageNum": couponPageNum,
"pageSize": 10,
"searchKey": "",
"state": 0
@ -352,7 +352,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (pageNum == 1) coupons.clear();
if (couponPageNum == 1) coupons.clear();
if (baseData != null && baseData.isSuccess) {
coupons.addAll(baseData.data.list);
refreshController.refreshCompleted();
@ -360,10 +360,11 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
if (baseData.data.pageNum == baseData.data.pages) {
refreshController.loadNoData();
} else {
pageNum += 1;
couponPageNum += 1;
}
setState(() {});
} else {
}
else {
refreshController.refreshFailed();
refreshController.loadFailed();
}
@ -371,7 +372,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
_onRefresh(){
queryHome();
queryMsgStats();
// queryMsgStats();
queryCoupon();
}
@ -569,12 +570,12 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
Widget spread(){
return Container(
width: double.infinity,
height: 100.h,
height: 80.h,
margin: EdgeInsets.symmetric(horizontal: 14.w),
child: GestureDetector(
onTap: (){
// Navigator.of(context).pushNamed('/router/invite_friends');
Navigator.of(context).pushNamed('/router/mine_greenery');
Navigator.of(context).pushNamed('/router/invite_friends');
// Navigator.of(context).pushNamed('/router/mine_greenery');
},
child: ClipRRect(
child:Image.asset(

113
lib/home/home_view/discount_zone.dart

@ -50,7 +50,7 @@ class _DiscountZone extends State<DiscountZone> {
)),
if(widget.coupon.length != 0)
Container(
height: 91,
height: 100,
margin: EdgeInsets.only(top: 10),
child: ListView.builder(
scrollDirection: Axis.horizontal,
@ -74,55 +74,39 @@ class _DiscountZone extends State<DiscountZone> {
Widget discountItem(Coupon coupon) {
return Container(
width: 300.w,
height: 91.h,
width: 270.w,
height: 100.h,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
fit: BoxFit.fill,
image: AssetImage("assets/image/discount.webp"),
),
),
margin: EdgeInsets.only(right: 6.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
flex: 1,
child:Container(
margin: EdgeInsets.only(top: 12,bottom: 12),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Container(
child:discountWidget(coupon),
)),
],
),
)),
Expanded(
flex: 2,
child: Container(
margin: EdgeInsets.only(top: 12,left:35,bottom: 12),
margin: EdgeInsets.only(top: 12,bottom: 12,left: 20,right: 27),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child:
Text(
coupon != null ? coupon.couponName ?? "" : "",
maxLines: 1,
(coupon != null ? coupon.couponName ?? "" : ""),
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
height: 1.5,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF0D0D0D),
color: Color(0xFFFFA607),
),
),
),),
Spacer(),
SizedBox(height:5),
Expanded(child:
(coupon.useStartTime == null &&
coupon.useEndTime == null)?
Text(
@ -132,7 +116,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
color: Color(0xFFFFA607),
),
):Text(
"有效期至 ${coupon.useEndTime.substring(0, coupon.useEndTime.indexOf(" "))}",
@ -141,9 +125,23 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
color: Color(0xFFFFA607),
),
),
],
),
)),
Expanded(
flex: 1,
child:Container(
margin: EdgeInsets.only(top: 12,bottom: 12),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Container(
child:discountWidget(coupon),
)),
],
),
)),
@ -168,7 +166,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
SizedBox(
@ -182,8 +180,8 @@ class _DiscountZone extends State<DiscountZone> {
: "",
style: TextStyle(
fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
fontWeight: FontWeight.w900,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
],
@ -196,7 +194,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
],
@ -213,7 +211,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
),
@ -222,7 +220,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
],
@ -239,7 +237,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
),
@ -248,12 +246,47 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
],
);
} else {
} else if (coupon.bizType == 6) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
"¥",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
SizedBox(
height: 4.h,
),
Text(
coupon != null
? double.tryParse("${coupon.limitAmount}" ?? "0").toStringAsFixed(2)
: "",
style: TextStyle(
fontSize: 28.sp,
fontWeight: FontWeight.w900,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
],
),
],
);
}else{
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -271,7 +304,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
SizedBox(
@ -282,7 +315,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
),
),
],

2
lib/home/home_view/home_banner.dart

@ -23,7 +23,7 @@ class _HomeBanner extends State<HomeBanner> {
Widget build(BuildContext context) {
return Container(
child: AspectRatio(
aspectRatio: 1.4,
aspectRatio: 375/230,
child: Swiper(
pagination: SwiperPagination(
margin: EdgeInsets.only(bottom: 12.h),

4
lib/home/home_view/shortcut_operation.dart

@ -151,8 +151,8 @@ class _ShortcutOperation extends State<ShortcutOperation> {
), ),
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/roll_center_page');
// Navigator.of(context).pushNamed('/router/welfare_page');
// Navigator.of(context).pushNamed('/router/roll_center_page');
Navigator.of(context).pushNamed('/router/welfare_page');
},
child:Container(
width: double.infinity,

5
lib/home/home_view/top_selling_list.dart

@ -33,7 +33,10 @@ class _TopSellingList extends State<TopSellingList> {
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
color: Colors.blueGrey,
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/hot_list.webp"),
),
),
margin: EdgeInsets.only(left: 14.w,right: 14.w,top: 12.h,bottom: 23.h),
padding: EdgeInsets.only(left: 12.w,top: 16.h),

25
lib/home/home_view/welfare_core.dart

@ -65,7 +65,11 @@ class _WelfareCore extends State<WelfareCore> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: Container(
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page');
},
child:Container(
width: double.infinity,
height:60.h,
padding: EdgeInsets.only(left: 12.w),
@ -98,8 +102,13 @@ class _WelfareCore extends State<WelfareCore> {
),
],
),
),
)),
Expanded(child: Container(
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page');
},
child:Container(
width: double.infinity,
height:60.h,
padding: EdgeInsets.only(left: 12.w),
@ -132,8 +141,13 @@ class _WelfareCore extends State<WelfareCore> {
),
],
),
)),
Expanded(child: Container(
),
),),
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page');
},
child:Container(
width: double.infinity,
height:60.h,
padding: EdgeInsets.only(left: 12.w),
@ -148,7 +162,7 @@ class _WelfareCore extends State<WelfareCore> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"做任务得",
"积分换",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
@ -166,6 +180,7 @@ class _WelfareCore extends State<WelfareCore> {
),
],
),
),
)),
],
),

44
lib/home/points_mall_view/points_goods_title.dart

@ -46,28 +46,28 @@ class _PointsGoodsTitle extends State<PointsGoodsTitle> {
// text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.webp",
// ),
// ItemTitle(
// text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.webp",
// moreText: _itemText,
// moreType: 1,
// items: sortString
// .map(
// (e) => DropdownMenuItem(
// value: e,
// child: Text(
// e,
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xff353535),
// ),
// ),
// ),
// )
// .toList(),
// onChanged: _sortChange,
// ),
ItemTitle(
text: S.of(context).jifenshangcheng,
imgPath: "assets/image/icon_points_mall.webp",
moreText: _itemText,
moreType: 1,
items: sortString
.map(
(e) => DropdownMenuItem(
value: e,
child: Text(
e,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xff353535),
),
),
),
)
.toList(),
onChanged: _sortChange,
),
Container(
alignment: Alignment.centerLeft,
child: DefaultTabController(

31
lib/home/points_mall_view/points_goods_view.dart

@ -19,6 +19,18 @@ class PointGoods extends StatefulWidget {
}
class _PointGoods extends State<PointGoods> {
String pointPrice(Goods goods){
if(goods == null)
return "";
if(goods?.onePrice!=null && goods?.onePrice!="0"){
return S.of(context).jifen_(goods?.onePrice);
}else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${goods?.money}");
}else if(goods.oneMoney != null && goods.oneMoney != "0.00"){
return "${goods.oneMoney}";
}
}
@override
Widget build(BuildContext context) {
return GridView.builder(
@ -40,7 +52,7 @@ class _PointGoods extends State<PointGoods> {
mainAxisSpacing: 16.w,
//Widget宽高比例 0.59
childAspectRatio:
200 / (281 / 2 + (281 / 2) * AppUtils.textScale(context)),
200 / (295 / 2 + (295 / 2) * AppUtils.textScale(context)),
),
itemBuilder: (context, index) {
return GestureDetector(
@ -79,7 +91,7 @@ class _PointGoods extends State<PointGoods> {
children: [
MImage(
goods.mainImgPath,
aspectRatio: 1.1,
aspectRatio: 158/158,
radius: BorderRadius.only(
topLeft: Radius.circular(6),
topRight: Radius.circular(6),
@ -109,19 +121,20 @@ class _PointGoods extends State<PointGoods> {
fontSize: 15.sp,
),
),
Row(
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
(goods?.price == null || goods.price == "0"?"":S.of(context).jifen_(goods.price)) + (goods?.money == null|| goods.money == "0.00" ?"":" + ${goods.money}"),
pointPrice(goods),
style: TextStyle(
color: Color(0xFFE5600D),
fontSize: 16.sp,
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
Row(
children: [
Image.asset(
"assets/image/green_leaf.webp",
fit: BoxFit.cover,
@ -135,8 +148,10 @@ class _PointGoods extends State<PointGoods> {
style: TextStyle(
color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold,
fontSize: 16.sp,
fontSize: 15.sp,
),
),
],
),
],
),

53
lib/home/welfare_exchange.dart

@ -338,26 +338,59 @@ class _WelfareExchange extends State<WelfareExchange> {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/integral_detailed_page');
},
child: Row(
children: [
Text(
S.of(context).yiyoujifen,
"积分明细",
style: TextStyle(
fontSize: 12.sp,
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF4C4C4C),
),
),
Container(
width: 20,
height: 20,
margin: EdgeInsets.only(left: 4),
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(10),
),
child:Icon(
Icons.keyboard_arrow_right,
size: 20,
color: Colors.white,
),
),
],
),
),
SizedBox(
height: 4.h,
),
Row(
children: [
Text(
(userInfo != null) ? "${userInfo.points}" : "",
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFF32A060),
fontWeight: FontWeight.bold,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(width: 6,),
Image.asset(
"assets/image/icon_gold_coin.webp",
width: 18,
height: 18,
)
],
)
],
),
)
@ -471,7 +504,7 @@ class _WelfareExchange extends State<WelfareExchange> {
),
Spacer(),
Text(
(goods?.price == null || goods.price == "0"?"":S.of(context).jifen_(goods.price)) + (goods?.money == null|| goods.money == "0.00" ?"":" + ${goods.money}"),
pointPrice(goods),
style: TextStyle(
color: Color(0xFFE5600D),
fontSize: 16.sp,
@ -490,4 +523,16 @@ class _WelfareExchange extends State<WelfareExchange> {
);
}
String pointPrice(Goods goods){
if(goods == null)
return "";
if(goods?.onePrice!=null && goods?.onePrice!="0"){
return S.of(context).jifen_(goods?.onePrice);
}else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${goods?.money}");
}else if(goods.oneMoney != null && goods.oneMoney != "0.00"){
return "${goods.oneMoney}";
}
}
}

149
lib/home/welfare_page.dart

@ -34,6 +34,7 @@ class _WelfarePage extends State<WelfarePage> {
ApiService apiService;
final RefreshController refreshController = RefreshController();
List<Goods> goods = [];
Goods goodsPrice;
List<Coupon> coupons = [];
List<List<Coupon>> coupon=[];
String categoryId;
@ -116,6 +117,8 @@ class _WelfarePage extends State<WelfarePage> {
con = coupons.skip(i*3).take((i*3<coupons.length)?3:(coupons.length - (i*3))).toList();
coupon.add(con);
}
if(coupon.length > 0 && coupon[coupon.length - 1].isEmpty)
coupon.removeAt(coupon.length-1);
refreshController.refreshCompleted();
refreshController.loadComplete();
setState(() {});
@ -144,7 +147,7 @@ class _WelfarePage extends State<WelfarePage> {
),
),
width: double.infinity,
height: 385.h,
height: 236.h,
),
Scaffold(
backgroundColor: Colors.transparent,
@ -174,20 +177,27 @@ class _WelfarePage extends State<WelfarePage> {
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
margin: EdgeInsets.only(top: 45.h,left: 14,right: 14),
// margin: EdgeInsets.only(top:30.h,left: 14,right: 14),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
weekCoupons(),
Container(
color: Colors.white,
padding: EdgeInsets.only(left: 14,right: 14),
child:Column(
children: [
inviteFriends(),
benefitExchange(),
],
),
)
// activityTask(),
],
@ -202,10 +212,7 @@ class _WelfarePage extends State<WelfarePage> {
///
Widget weekCoupons() {
return Stack(
alignment: Alignment.topRight,
children: [
Container(
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 95),
decoration: BoxDecoration(
@ -241,7 +248,7 @@ class _WelfarePage extends State<WelfarePage> {
),
),
Text(
"每周上新 ",
"每周上新 ",
style: TextStyle(
color: Color(0xFF4D4D4D),
fontSize: 12.sp,
@ -282,44 +289,6 @@ class _WelfarePage extends State<WelfarePage> {
)
],
)
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(padding:EdgeInsets.only(top: 12),
child: Text(
"福利周周有,优惠享不停",
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFFFFFFFF),
),
)),
SizedBox(height: 8,),
Text(
"各种优惠全都有",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
),
],
)),
Image.asset(
"assets/image/welfare_zx_tu.webp",
width:120.w,
height:105.h,
fit: BoxFit.cover,
)
],
),
],
);
}
@ -364,10 +333,9 @@ class _WelfarePage extends State<WelfarePage> {
Expanded(child: Container(
margin: EdgeInsets.only(top: 12,bottom: 12),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(child:
Text(
cop != null ? cop.couponName ?? "" : "",
maxLines: 1,
@ -375,10 +343,10 @@ class _WelfarePage extends State<WelfarePage> {
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF353535),
color: Color(0xFF0D0D0D),
),
)),
Expanded(child:
),
SizedBox(height: 12,),
(cop.useStartTime == null &&
cop.useEndTime == null)?
Text(
@ -399,29 +367,6 @@ class _WelfarePage extends State<WelfarePage> {
fontWeight: MyFontWeight.regular,
color: cop.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D),
),
)),
GestureDetector(
onTap: (){
// showDeleteDialog();
},
child: Row(
children: [
Text(
"使用详情",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: cop.status == 3 ? Color(0xFFB3B3B3):Color(0xFF4D4D4D),
),
),
Icon(
Icons.keyboard_arrow_right,
color: cop.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D),
size: 20,
)
],
),
)
],
),
@ -555,7 +500,42 @@ class _WelfarePage extends State<WelfarePage> {
),
],
);
} else {
} else if (cop.bizType == 6) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
"¥",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: cop.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
),
),
SizedBox(
height: 4.h,
),
Text(
coupon != null
? double.tryParse("${cop.limitAmount}" ?? "0").toStringAsFixed(2)
: "",
style: TextStyle(
fontSize: 24.sp,
fontWeight: FontWeight.bold,
color: cop.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
),
),
],
),
],
);
}else{
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -741,7 +721,7 @@ class _WelfarePage extends State<WelfarePage> {
},
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:
Text(
@ -868,7 +848,7 @@ class _WelfarePage extends State<WelfarePage> {
),
Spacer(),
Text(
(goods?.price == null || goods.price == "0"?"":S.of(context).jifen_(goods.price)) + (goods?.money == null|| goods.money == "0.00" ?"":" + ${goods.money}"),
pointPrice(goods),
style: TextStyle(
color: Color(0xFFE5600D),
fontSize: 16.sp,
@ -887,6 +867,19 @@ class _WelfarePage extends State<WelfarePage> {
);
}
String pointPrice(Goods goodsPrice){
if(goodsPrice == null)
return "";
if(goodsPrice?.onePrice!=null && goodsPrice?.onePrice!="0"){
return S.of(context).jifen_(goodsPrice?.onePrice);
}else if((goodsPrice?.onePrice == null || goodsPrice?.onePrice == "0") && ((goodsPrice?.price != null && goodsPrice?.price != "0") || (goodsPrice?.money != null && goodsPrice?.money != "0.00"))){
return (goodsPrice?.price== "0"|| goodsPrice?.price == null ? "" : S.of(context).jifen_(goodsPrice?.price)) + (goodsPrice?.money== "0"|| goodsPrice?.money == null ? "" : " + ${goodsPrice?.money}");
}else if(goodsPrice.oneMoney != null && goodsPrice.oneMoney != "0.00"){
return "${goodsPrice.oneMoney}";
}
}
///
Widget activityTask() {
return Container(

2
lib/integral/integral_page.dart

@ -105,7 +105,7 @@ class _IntegralPage extends State<IntegralPage> {
),
),
width: double.infinity,
height: 409.h,
height: 215.h,
),
Scaffold(
backgroundColor: Colors.transparent,

4
lib/integral/intergra_view/in_for_points.dart

@ -104,7 +104,7 @@ class _InForPoints extends State<InForPoints> {
: Colors.white,
backgroup: (widget.signInfo != null && widget.signInfo.todayHasSignin)
? Color(0xFFF5F6FA)
: Color(0xFF00BF00),
: Color(0xFF32A060),
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h),
@ -185,7 +185,7 @@ class _InForPoints extends State<InForPoints> {
color: (widget.signInfo != null &&
widget.signInfo.signInList != null &&
widget.signInfo.signInList.length > position)
? Color(0xFF00BF00)
? Color(0xFF32A060)
: Color(0xFFF5F6FA),
borderRadius: BorderRadius.circular(4),
),

59
lib/integral_store/integral_store_details_page.dart

@ -64,11 +64,11 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
if(goods != null && points != null && double.tryParse(goods.onePrice)
!= 0 && double.tryParse(goods.onePrice) <= double.tryParse(points)){
payType = 1;
} else if (goods != null && points != null && double.tryParse(goods.price)
<= double.tryParse(points)){
} else if (goods != null && points != null && double.tryParse(goods.price) != 0 && double.tryParse(goods.price)
<= double.tryParse(points) && double.tryParse(goods.money) != 0.00){
payType = 2;
} else if (goods != null && points != null
&& double.tryParse(goods.oneMoney) != 0){
&& double.tryParse(goods.oneMoney) != 0.00){
payType = 3;
}
refreshController.refreshCompleted();
@ -78,6 +78,18 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
}
}
String pointPrice(){
if(goods == null)
return "";
if(goods?.onePrice!=null && goods?.onePrice!="0"){
return S.of(context).jifen_(goods?.onePrice);
}else if((goods?.onePrice == null || goods?.onePrice == "0") && ((goods?.price != null && goods?.price != "0") || (goods?.money != null && goods?.money != "0.00"))){
return (goods?.price== "0"|| goods?.price == null ? "" : S.of(context).jifen_(goods?.price)) + (goods?.money== "0"|| goods?.money == null ? "" : " + ${goods?.money}");
}else if(goods.oneMoney != null && goods.oneMoney != "0.00"){
return "${goods.oneMoney}";
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
@ -145,30 +157,29 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
),
GestureDetector(
onTap: () {
// if(payType > 0){
// toExchangeOrder();
// }else{
// SmartDialog.showToast("您的积分不足!", alignment: Alignment.center);
// return;
// }
if(payType > 0){
toExchangeOrder();
}else{
SmartDialog.showToast("您的积分不足!", alignment: Alignment.center);
return;
}
},
child: Container(
padding: EdgeInsets.only(top: 16.h, bottom: 16.h),
decoration: BoxDecoration(
color: Color(0xFFD8D8D8),
// (payType > 0)
// ? Color(0xFF32A060)
// : Color(0xFFD8D8D8),
color: (payType > 0)
? Color(0xFF32A060)
: Color(0xFFD8D8D8),
borderRadius: BorderRadius.vertical(
top: Radius.circular(4),
),
),
alignment: Alignment.center,
child: Text(
// (payType > 0)
// ? S.of(context).duihuan
// : S.of(context).jifenbuzu,
"兑换功能暂未开放",
(payType > 0)
? S.of(context).duihuan
: S.of(context).jifenbuzu,
// "兑换功能暂未开放",
style: TextStyle(
fontSize: 16.sp,
color: Color(0xFFFFFFFF),
@ -235,12 +246,12 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
(goods?.price == null || goods.price == "0"
? ""
: S.of(context).jifen_(goods.price)) +
(goods?.money == null || goods.money == "0.00"
? ""
: " + ${goods.money}"),
// goods?.onePrice == null || goods?.onePrice == "0"?
// ((goods?.price == null || goods?.price == "0"?"":S.of(context).jifen_(goods?.price)) +
// (goods?.money == null|| goods?.money == "0.00" ?"":" + ${goods.money}"))==""?
// (goods?.oneMoney == null || goods?.oneMoney == "0.00"?"":"${goods?.oneMoney}"):""
// :S.of(context).jifen_(goods?.onePrice),
pointPrice(),
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 18.sp,
@ -307,7 +318,7 @@ class _IntegralStoreDetailsPage extends State<IntegralStoreDetailsPage> {
Widget swiper() {
return Container(
child: AspectRatio(
aspectRatio: 1.3698,
aspectRatio:375/375,
child: Stack(
children: [
Swiper(

4
lib/l10n/intl_en.arb

@ -101,7 +101,7 @@
"yiduihuan": "已兑换",
"zitidizhi": "自提地址",
"zitishijian": "自提时间",
"feishiwuduihuanma": "非实物兑换",
"feishiwuduihuanma": "非实物兑换",
"shangpinjifen": "商品积分 {jifen}积分",
"shifujifen": "实付积分 {jifen}积分",
"shanchudingdan": "删除订单",
@ -236,7 +236,7 @@
"keyongquan": "可用券",
"xuni": "虚拟",
"qingxuanzeshouhuodizhi": "请选择收货地址",
"feishiwushangpin": "非实物商品兑换后领取到卡包即可使用!",
"feishiwushangpin": "非实物商品兑换后领取到优惠券即可使用!",
"duihuanhoufahuo": "兑换后五个工作日内发货",
"xianshangfafang": "线上发放",
"lingqushijian": "领取时间 {shijian}",

4
lib/l10n/intl_zh_CN.arb

@ -101,7 +101,7 @@
"yiduihuan": "已兑换",
"zitidizhi": "自提地址",
"zitishijian": "自提时间",
"feishiwuduihuanma": "非实物兑换",
"feishiwuduihuanma": "非实物兑换",
"shangpinjifen": "商品积分 {jifen}积分",
"shifujifen": "实付积分 {jifen}积分",
"shanchudingdan": "删除订单",
@ -236,7 +236,7 @@
"keyongquan": "可用券",
"xuni": "虚拟",
"qingxuanzeshouhuodizhi": "请选择收货地址",
"feishiwushangpin": "非实物商品兑换后领取到卡包即可使用!",
"feishiwushangpin": "非实物商品兑换后领取到优惠券即可使用!",
"duihuanhoufahuo": "兑换后五个工作日内发货",
"xianshangfafang": "线上发放",
"lingqushijian": "领取时间 {shijian}",

4
lib/l10n/intl_zh_Hans_CN.arb

@ -101,7 +101,7 @@
"yiduihuan": "已兑换",
"zitidizhi": "自提地址",
"zitishijian": "自提时间",
"feishiwuduihuanma": "非实物兑换",
"feishiwuduihuanma": "非实物兑换",
"shangpinjifen": "商品积分 {jifen}积分",
"shifujifen": "实付积分 {jifen}积分",
"shanchudingdan": "删除订单",
@ -236,7 +236,7 @@
"keyongquan": "可用券",
"xuni": "虚拟",
"qingxuanzeshouhuodizhi": "请选择收货地址",
"feishiwushangpin": "非实物商品兑换后领取到卡包即可使用!",
"feishiwushangpin": "非实物商品兑换后领取到优惠券即可使用!",
"duihuanhoufahuo": "兑换后五个工作日内发货",
"xianshangfafang": "线上发放",
"lingqushijian": "领取时间 {shijian}",

2
lib/l10n/intl_zh_Hant_CN.arb

@ -237,7 +237,7 @@
"qingxuanzeshouhuodizhi": "請選擇收貨地址",
"shouhuodizhi1": "收貨地址",
"wenzhangxiangqing": "文章詳情",
"feishiwushangpin": "非實物商品!",
"feishiwushangpin": "非實物商品兌換後領取到優惠券即可使用!",
"duihuanhoufahuo": "兌換物商品",
"xianshangfafang": "綫上發放",
"lingqushijian": "領取時間 {shijian}",

2
lib/l10n/intl_zh_TW.arb

@ -237,7 +237,7 @@
"qingxuanzeshouhuodizhi": "請選擇收貨地址",
"shouhuodizhi1": "收貨地址",
"wenzhangxiangqing": "文章詳情",
"feishiwushangpin": "非實物商品!",
"feishiwushangpin": "非實物商品兌換後領取到優惠券即可使用!",
"duihuanhoufahuo": "兌換物商品",
"xianshangfafang": "綫上發放",
"lingqushijian": "領取時間 {shijian}",

7
lib/main_page.dart

@ -204,7 +204,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
);
}
/// @typed: 1 2 3 4 5 6
/// @typed: 1 2 3 4 5 6 7 8/
xgFlutterPlugin.addEventHandler(xgPushClickAction: (event) async {
print("xgPushClickAction1: $event");
if (event["actionType"] == 2) return event;
@ -293,6 +293,11 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
routeName = "/router/community_details";
params["businessId"] = pushMap["info"];
break;
case 8:
routeName = "/router/mine_wallet";
params["id"] = pushMap["info"];
break;
}
sharedPreferences.setString("pushData", "");
print("xgPushClickAction: routeName: $routeName");

114
lib/mine/coupon_page.dart

@ -3,7 +3,6 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/coupon.dart';
@ -11,6 +10,7 @@ import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/coupon_details_dialog.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/new_coupon_widget.dart';
@ -94,7 +94,9 @@ class _CouponPage extends State<CouponPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: S.of(context).youhuiquan,
title: S
.of(context)
.youhuiquan,
titleColor: Colors.black,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
@ -128,14 +130,18 @@ class _CouponPage extends State<CouponPage> {
color: Color(0xFF32A060),
width: 1,
),
color: state == 1 ? Color(0xFF32A060) : Color(0xFFFFFFFF),
color: state == 1 ? Color(0xFF32A060) : Color(
0xFFFFFFFF),
),
child: Text(
S.of(context).keyongquan,
S
.of(context)
.keyongquan,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 15.sp,
color: state == 1 ? Color(0xFFFFFFFF) : Color(0xFF32A060),
color: state == 1 ? Color(0xFFFFFFFF) : Color(
0xFF32A060),
),
),
),
@ -160,14 +166,18 @@ class _CouponPage extends State<CouponPage> {
color: Color(0xFF32A060),
width: 1,
),
color: state == 3 ? Color(0xFF32A060) : Color(0xFFFFFFFF),
color: state == 3 ? Color(0xFF32A060) : Color(
0xFFFFFFFF),
),
child: Text(
S.of(context).shixiaoquan,
S
.of(context)
.shixiaoquan,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 15.sp,
color: state == 3 ? Color(0xFFFFFFFF) : Color(0xFF32A060),
color: state == 3 ? Color(0xFFFFFFFF) : Color(
0xFF32A060),
),
),
),
@ -212,20 +222,21 @@ class _CouponPage extends State<CouponPage> {
} else {
showStoreSelector(
coupons[position].storeList);
}
}
},
// (){
// setState(() {
// couponDialog();
// });
// },
() {
setState(() {
coupons[position].isEx =
!coupons[position].isEx;
});
},
(){
setState(() {
showCouponDetails(position);
});
},
type: 0,
),
);
@ -265,10 +276,6 @@ class _CouponPage extends State<CouponPage> {
});
}
couponDialog(){
showCouponDialog();
}
showAlertDialog() {
//
showDialog(
@ -279,75 +286,14 @@ class _CouponPage extends State<CouponPage> {
);
}
///
showCouponDialog() {
showDialog(
///使
showCouponDetails(index) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (context) {
return AlertDialog(
content: Container(
width: MediaQuery.of(context).size.width - 14,
height: 330.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:
Container(
alignment: Alignment.center,
child: Text(
"使用详情",
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 15.sp,
color: Color(0xFF353535),
),
),
)),
GestureDetector(
onTap: (){
setState(() {
Navigator.of(context).pop();
return CouponDetailsWidget(coupons[index]);
});
},
child: Icon(
Icons.clear,
color: Colors.black,
size: 18,
),
),
SizedBox(width: 14),
],
),
SizedBox(height: 12.h,),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xFFF2F2F2),
margin: EdgeInsets.only(bottom:11.h),
),
Container(
color: Colors.white,
child: Html(
data: "注意",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
],
),
),
);
},
);
}
}

17
lib/mine/coupons_page.dart

@ -9,6 +9,7 @@ import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/coupon_details_dialog.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/new_coupon_widget.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
@ -193,6 +194,11 @@ class _CouponsPage extends State<CouponsPage> {
coupons[position].isEx = !coupons[position].isEx;
});
},
(){
setState(() {
showCouponDetails(position);
});
},
type: 0,
),
);
@ -240,4 +246,15 @@ class _CouponsPage extends State<CouponsPage> {
},
);
}
///使
showCouponDetails(index) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (context) {
return CouponDetailsWidget(coupons[index]);
});
}
}

205
lib/mine/mine_shop_details.dart

@ -13,6 +13,7 @@ import 'package:huixiang/store/scan.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/location.dart';
import 'package:huixiang/utils/painter_bg.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/my_footer.dart';
@ -47,15 +48,14 @@ class _MineShopDetails extends State<MineShopDetails> {
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) {
apiService =
ApiService(Dio(), token: value.getString("token"), context: context);
vipDetail("", "");
// startLocation();
queryDetail("bill_cate_point_sub");
});
startLocation();
}
VipCard vipCard;
final RefreshController refreshController = RefreshController();
final RefreshController consumeRefreshController = RefreshController();
@ -63,8 +63,9 @@ class _MineShopDetails extends State<MineShopDetails> {
vipDetail(latitude, longitude) async {
SharedPreferences value = await SharedPreferences.getInstance();
if(apiService == null)
apiService = ApiService(Dio(), context: context, token: value.getString("token"));
if (apiService == null)
apiService =
ApiService(Dio(), context: context, token: value.getString("token"));
BaseData<VipCard> baseData = await apiService.vipDetail({
"id": widget.arguments["id"],
"latitude": "$latitude",
@ -80,42 +81,76 @@ class _MineShopDetails extends State<MineShopDetails> {
setState(() {});
}
queryDetail(category) async {
startLocation() async {
// EasyLoading.show(status: S.current.zhengzaijiazai);
Location.getInstance()
.aMapFlutterLocation
.onResultCallback()
.listen((event) {
if (event != null &&
event["latitude"] != null &&
event["longitude"] != null) {
vipDetail(event["latitude"], event["longitude"]);
} else {
EasyLoading.dismiss();
}
});
Location.getInstance().prepareLoc();
Location.getInstance().startLocation(context).then((value) {
if (!value) {
EasyLoading.dismiss();
refreshController.refreshFailed();
}
});
}
billInfo() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
if(apiService == null)
apiService = ApiService(Dio(), context: context, token: value.getString("token"));
apiService = ApiService(Dio(),
context: context, token: value.getString("token"), showLoading: true);
}
BaseData<PageInfo<UserBill>> baseData = await apiService.queryBillInfo({
"current": current,
"model": {"category": category, "title": "bill_title_point", "type": ""},
"model": {"category": "", "title": "bill_title_balance", "type": ""},
"order": "descending",
"size": 10,
"sort": "id"
}).catchError((onError) {
consumeRefreshController.loadFailed();
refreshController.refreshFailed();
refreshController.loadFailed();
consumeRefreshController.refreshFailed();
consumeRefreshController.loadFailed();
});
if (current == 1) userBill.clear();
if (baseData != null && baseData.isSuccess) {
if (current == 1) {
userBill.clear();
}
userBill.addAll(baseData.data.records);
consumeRefreshController.loadComplete();
refreshController.refreshCompleted();
refreshController.loadComplete();
consumeRefreshController.refreshCompleted();
consumeRefreshController.loadComplete();
if (current * 10 > int.tryParse(baseData.data.total)) {
refreshController.loadNoData();
consumeRefreshController.loadNoData();
} else {
current += 1;
}
setState(() {});
} else {
consumeRefreshController.loadFailed();
refreshController.refreshFailed();
refreshController.loadFailed();
consumeRefreshController.refreshFailed();
consumeRefreshController.loadFailed();
}
if (mounted) setState(() {});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: "余额详情",
title: "会员卡详情",
titleColor: Colors.black,
background: Colors.white,
brightness: Brightness.dark,
@ -126,13 +161,12 @@ class _MineShopDetails extends State<MineShopDetails> {
buildVipCard(),
Container(
margin: EdgeInsets.only(left: 14.w),
child:
Row(
child: Row(
children: [
GestureDetector(
onTap: (){
onTap: () {
setState(() {
selectType =0;
selectType = 0;
});
},
child: Column(
@ -140,40 +174,16 @@ class _MineShopDetails extends State<MineShopDetails> {
Text(
"适用门店",
style: TextStyle(
color: Color(selectType == 0 ? 0xFF000000 : 0xFF868686),
color:
Color(selectType == 0 ? 0xFF000000 : 0xFF868686),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(height:8.h,),
if(selectType == 0)
Container(
width: 52.w,
height: 2.h,
color: Color(0xFF32A060),
)
],
),
),
SizedBox(width: 20.w,),
GestureDetector(
onTap: (){
setState(() {
selectType = 1;
});
},
child: Column(
children: [
Text(
"余额明细",
style: TextStyle(
color:Color(selectType == 1 ? 0xFF000000 : 0xFF868686),
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
),
SizedBox(
height: 8.h,
),
SizedBox(height:8.h,),
if(selectType == 1)
if (selectType == 0)
Container(
width: 52.w,
height: 2.h,
@ -182,11 +192,44 @@ class _MineShopDetails extends State<MineShopDetails> {
],
),
),
SizedBox(
width: 20.w,
),
// GestureDetector(
// onTap: () {
// setState(() {
// selectType = 1;
// billInfo();
// });
// },
// child: Column(
// children: [
// Text(
// "余额明细",
// style: TextStyle(
// color:
// Color(selectType == 1 ? 0xFF000000 : 0xFF868686),
// fontSize: 15.sp,
// fontWeight: MyFontWeight.medium,
// ),
// ),
// SizedBox(
// height: 8.h,
// ),
// if (selectType == 1)
// Container(
// width: 52.w,
// height: 2.h,
// color: Color(0xFF32A060),
// )
// ],
// ),
// ),
],
),
),
selectType == 0 ?
Expanded(
selectType == 0
? Expanded(
child: SmartRefresher(
controller: refreshController,
enablePullDown: false,
@ -210,35 +253,37 @@ class _MineShopDetails extends State<MineShopDetails> {
: 0,
),
),
):
Expanded(
)
: Expanded(
child: SmartRefresher(
controller: consumeRefreshController,
enablePullDown: false,
enablePullUp: false,
enablePullDown: true,
enablePullUp: true,
physics: BouncingScrollPhysics(),
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
physics: BouncingScrollPhysics(),
child: Column(
children: [
Expanded(child: ListView.builder(
onRefresh: (){
current = 1;
billInfo();
},
onLoading: () {
billInfo();
},
child: ListView.builder(
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
},
onTap: () {},
child: consumeItem(userBill[position]),
);
},
shrinkWrap: true,
padding: EdgeInsets.symmetric(vertical: 1),
itemCount: userBill != null ? userBill.length : 0,
),),
],
)
),
)),
),
],
),
@ -259,9 +304,9 @@ class _MineShopDetails extends State<MineShopDetails> {
Widget buildVipCard() {
return Container(
width:double.infinity,
width: double.infinity,
// height:140.h,
margin: EdgeInsets.only(bottom:24.h,top: 14.h,left: 14.w,right: 14.w),
margin: EdgeInsets.only(bottom: 24.h, top: 14.h, left: 14.w, right: 14.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -289,7 +334,9 @@ class _MineShopDetails extends State<MineShopDetails> {
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
SizedBox(width: 6,),
SizedBox(
width: 6,
),
Text(
vipCard != null ? vipCard.tenantName : "",
style: TextStyle(
@ -336,12 +383,14 @@ class _MineShopDetails extends State<MineShopDetails> {
),
],
),
SizedBox(height:4.h,),
SizedBox(
height: 4.h,
),
Text(
"${vipCard != null ? vipCard.balance : ""}",
style: TextStyle(
color: Color(0xFF262626),
fontSize:24.sp,
fontSize: 24.sp,
fontWeight: MyFontWeight.bold,
),
),
@ -383,7 +432,7 @@ class _MineShopDetails extends State<MineShopDetails> {
onTap: () {
// Navigator.of(context).pushNamed('/router/union_detail_page',
// arguments: {"id": store.id});
if(store.posType.code == "NORMALSTORE") {
if (store.posType.code == "NORMALSTORE") {
Scan.toScan(
context,
store.id,
@ -485,7 +534,7 @@ class _MineShopDetails extends State<MineShopDetails> {
);
}
Widget consumeItem(UserBill userBill){
Widget consumeItem(UserBill userBill) {
return Container(
decoration: BoxDecoration(
borderRadius: new BorderRadius.circular(6),
@ -509,7 +558,9 @@ class _MineShopDetails extends State<MineShopDetails> {
color: Colors.black,
),
),
SizedBox(height: 4,),
SizedBox(
height: 4,
),
Text(
userBill.updateTime ?? "",
style: TextStyle(
@ -521,7 +572,7 @@ class _MineShopDetails extends State<MineShopDetails> {
],
),
Text(
"-${double.tryParse(userBill.number ?? "0").toInt().toString()}",
"-${double.tryParse(userBill.number ?? "0").toInt().toString()}",
style: TextStyle(
fontSize: 18.sp,
fontWeight: MyFontWeight.regular,

1
lib/mine/mine_view/calendar_page.dart

@ -84,5 +84,4 @@ class _CalendarPage extends State<CalendarPage> with TickerProviderStateMixin {
);
}
}

81
lib/mine/mine_view/mine_item.dart

@ -15,6 +15,7 @@ class MineItem extends StatefulWidget {
}
class _MineItem extends State<MineItem> {
var isShowMore = false;
@override
Widget build(BuildContext context) {
return Container(
@ -36,8 +37,8 @@ class _MineItem extends State<MineItem> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(left: 16,top:16,bottom:4),
child: Text(
padding: EdgeInsets.only(left: 16,top:16,bottom:4,right: 16),
child:Text(
"其他",
style: TextStyle(
color: Color(0xFF353535),
@ -204,8 +205,27 @@ class _MineItem extends State<MineItem> {
],
),
SizedBox(height: 10.h,),
if(isShowMore)
Row(
children: [
///
Expanded(child: InkWell(
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString("token") == null ||
value.getString("token") == "") {
LoginTipsDialog().show(context);
return;
}
Navigator.of(context)
.pushNamed('/router/exchange_history_page');
});
},
child: mineItem(
S.of(context).duihuanlishi,
"assets/image/icon_mine_records_of_consumption.webp",
),
),),
///
Expanded(child:
InkWell(
@ -240,17 +260,6 @@ class _MineItem extends State<MineItem> {
"assets/image/settled.webp",
),
),),
///
Expanded(child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/bargain_group_order',
arguments: {"type":1});
},
child: mineItem(
"发票管理",
"assets/image/bill_gl.webp",
),
),),
// Expanded(child: InkWell(
// onTap: () {
// Navigator.of(context).pushNamed('/router/qr_share', arguments: {});
@ -271,9 +280,22 @@ class _MineItem extends State<MineItem> {
// ),),
],
),
if(isShowMore)
SizedBox(height: 10.h,),
if(isShowMore)
Row(
children: [
///
Expanded(child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/bargain_group_order',
arguments: {"type":1});
},
child: mineItem(
"发票管理",
"assets/image/bill_gl.webp",
),
),),
///
Expanded(child: InkWell(
onTap: () {
@ -295,9 +317,40 @@ class _MineItem extends State<MineItem> {
),
),),
Expanded(child:Container(),),
Expanded(child:Container(),),
],
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
isShowMore = !isShowMore;
});
},
child: Container(
margin: EdgeInsets.symmetric(vertical: 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Text(
(isShowMore != null && !isShowMore)?"展开": "收起",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF32A060),
),
),
Icon(
(isShowMore != null && !isShowMore)
? Icons.keyboard_arrow_down
: Icons.keyboard_arrow_up,
color: Color(0xFF32A060),
size: 18,
),
],
),),
)
],
),
);

14
lib/mine/mine_view/mine_view.dart

@ -374,16 +374,10 @@ class _MineView extends State<MineView> {
},
child: Container(
padding: EdgeInsets.only(top: 4, bottom: 4, right: 16,left: 7),
margin: EdgeInsets.only(right: 14.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(100),bottomLeft:Radius.circular(100)),
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFACDD60),
Color(0xFF32A060),
],
),
borderRadius: BorderRadius.circular(12),
color: Colors.white
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
@ -396,7 +390,7 @@ class _MineView extends State<MineView> {
Text(
"天天领积分",
style: TextStyle(
color: Colors.white,
color: Color(0xFF32A060),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),

93
lib/mine/recharge_page.dart

@ -21,6 +21,7 @@ import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/item_input_widget.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/recharge_details_dialog.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:shared_preferences/shared_preferences.dart';
@ -552,7 +553,7 @@ class _RechargePage extends State<RechargePage> {
onTap: (){
setState(() {
if(selectIndex == index)
rechargeShowBottomSheet();
showRecharge(index);
});
},
child: Row(
@ -596,95 +597,13 @@ class _RechargePage extends State<RechargePage> {
}
///
rechargeShowBottomSheet() {
showRecharge(index) {
showModalBottomSheet(
builder: (BuildContext context) {
return buildBottomSheetWidget(context);
},
context: context,
backgroundColor: Colors.transparent,
context: context);
}
Widget buildBottomSheetWidget(BuildContext context) {
return Container(
padding: EdgeInsets.only(top: 12),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: new BorderRadius.only(
topLeft: const Radius.circular(25.0),
topRight: const Radius.circular(25.0))),
child: Container(
width: 299,
height:299,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:
Container(
margin: EdgeInsets.symmetric(vertical: 12.h),
alignment: Alignment.center,
child: Text(
"充值说明",
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 15.sp,
color: Color(0xFF353535),
),
),
)),
GestureDetector(
onTap: (){
setState(() {
Navigator.of(context).pop();
builder: (context) {
return RechargeWidget(rechargeA[index]);
});
},
child: Icon(
Icons.clear,
color: Colors.black,
size: 18,
),
),
SizedBox(width: 14),
],
),
SizedBox(height: 12.h,),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xFFF2F2F2),
margin: EdgeInsets.only(bottom:13.h),
),
Padding(padding:EdgeInsets.only(left: 14),
child:
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
if (vipRuleDetails?.recharge != null &&
vipRuleDetails.recharge != "")
Expanded(
child: Container(
color: Colors.white,
child: Html(
data: "注意:${vipRuleDetails?.recharge ?? ""}",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
)
],
),)
],
),
));
}
recharge() async {

14
lib/mine/roll_center_page.dart

@ -7,6 +7,7 @@ import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/coupon_details_dialog.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
@ -145,6 +146,9 @@ class _RollCenterPage extends State<RollCenterPage> {
coupons[position].isEx = !coupons[position].isEx;
});
},
(){
showCouponDetails(position);
},
type: 1,
),
);
@ -192,4 +196,14 @@ class _RollCenterPage extends State<RollCenterPage> {
},
);
}
///使
showCouponDetails(index) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (context) {
return CouponDetailsWidget(coupons[index]);
});
}
}

2
lib/mine/vip_balance_page.dart

@ -84,7 +84,7 @@ class _VipBalancePage extends State<VipBalancePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: MyAppBar(
title: S.of(context).yuemingxi,
title: S.of(context).yue,
titleColor: Colors.black,
background: Color(0xFFF7F7F7),
leadingColor: Colors.black,

1
lib/order/exchange_history_page.dart

@ -331,6 +331,7 @@ class _ExchangeHistoryList extends State<ExchangeHistoryList> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(exchangeOrder.useTyped != 3)
Text(
S.of(context).shouhuodi + " :",
style: TextStyle(

370
lib/order/exchange_order_page.dart

@ -77,8 +77,8 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
physics: BouncingScrollPhysics(),
child: Column(
children: [
widget.arguments["useTyped"] == 1
? Container(
// widget.arguments["useTyped"] == 1 ?
Container(
margin: EdgeInsets.only(
left: 16, right: 16, top: 26, bottom: 8),
padding: EdgeInsets.all(20),
@ -147,11 +147,11 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
color: Color(0xFF353535),
),
)),
Icon(
Icons.keyboard_arrow_right,
size: 16,
color: Color(0xFF32A060),
),
// Icon(
// Icons.keyboard_arrow_right,
// size: 16,
// color: Color(0xFF32A060),
// ),
],
),
),
@ -270,11 +270,90 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
),
],
),
)
:
),
// :
// // Container(
// // margin:
// // EdgeInsets.only(left: 16, right: 16, top: 26, bottom: 8),
// // padding: EdgeInsets.all(20),
// // decoration: BoxDecoration(
// // color: Colors.white,
// // boxShadow: [
// // BoxShadow(
// // color: Colors.black.withAlpha(12),
// // offset: Offset(0, 3),
// // blurRadius: 14,
// // spreadRadius: 0,
// // )
// // ],
// // borderRadius: BorderRadius.all(Radius.circular(8)),
// // ),
// // child: Column(
// // mainAxisAlignment: MainAxisAlignment.spaceAround,
// // crossAxisAlignment: CrossAxisAlignment.start,
// // children: [
// // Row(
// // children: [
// // Image.asset(
// // "assets/image/icon_order_exchange_info.webp",
// // width: 24,
// // height: 24,
// // ),
// // SizedBox(width: 4),
// // Text(
// // S.of(context).duihuanxinxi,
// // style: TextStyle(
// // fontWeight: FontWeight.bold,
// // fontSize: 16,
// // color: Color(0xFF353535)),
// // ),
// // ],
// // ),
// // SizedBox(
// // height: 18.h,
// // ),
// // Row(
// // children: [
// // Text(
// // S.of(context).lingqufangshi,
// // style: TextStyle(
// // fontSize: 14.sp,
// // color: Color(0xFF353535),
// // ),
// // ),
// // SizedBox(
// // width: 12.w,
// // ),
// // Text(
// // widget.arguments["useTyped"] == 1
// // ? S.of(context).ziti
// // : widget.arguments["useTyped"] == 2
// // ? S.of(context).peisong
// // : S.of(context).xianshangfafang,
// // style: TextStyle(
// // fontSize: 14.sp,
// // color: Color(0xFF353535),
// // ),
// // ),
// // ],
// // ),
// // SizedBox(
// // height: 12.h,
// // ),
// // Text(
// // "非实物商品兑换后领取到卡包即可使用!",
// // style: TextStyle(
// // fontSize: 14.sp,
// // color: Color(0xFF32A060),
// // fontWeight: MyFontWeight.medium
// // ),
// // ),
// // ],
// // ),
// // ),
// Container(
// margin:
// EdgeInsets.only(left: 16, right: 16, top: 26, bottom: 8),
// margin: EdgeInsets.only(
// left: 16, right: 16, top: 26, bottom: 8),
// padding: EdgeInsets.all(20),
// decoration: BoxDecoration(
// color: Colors.white,
@ -286,11 +365,10 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
// spreadRadius: 0,
// )
// ],
// borderRadius: BorderRadius.all(Radius.circular(8)),
// borderRadius:
// BorderRadius.all(Radius.circular(8)),
// ),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Row(
// children: [
@ -312,7 +390,13 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
// SizedBox(
// height: 18.h,
// ),
// Row(
// GestureDetector(
// onTap: () {
// setState(() {
// showAlertDialog();
// });
// },
// child: Row(
// children: [
// Text(
// S.of(context).lingqufangshi,
@ -324,7 +408,8 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
// SizedBox(
// width: 12.w,
// ),
// Text(
// Expanded(
// child: Text(
// widget.arguments["useTyped"] == 1
// ? S.of(context).ziti
// : widget.arguments["useTyped"] == 2
@ -334,180 +419,95 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// )),
// Icon(
// Icons.keyboard_arrow_right,
// size: 16,
// color: Color(0xFF32A060),
// ),
// ],
// ),
// SizedBox(
// height: 12.h,
// ),
// Visibility(
// child: SizedBox(
// height: 13.h,
// ),
// visible: widget.arguments["useTyped"] != 3,
// ),
// Visibility(
// child: Row(
// children: [
// Text(
// "非实物商品兑换后领取到卡包即可使用!",
// "收货地址",
// style: TextStyle(
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// ),
// SizedBox(
// width: 12.w,
// ),
// Expanded(
// child: GestureDetector(
// onTap: () {
// toAddressPicker();
// },
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment.end,
// crossAxisAlignment:
// CrossAxisAlignment.end,
// mainAxisSize: MainAxisSize.min,
// children: [
// Expanded(
// child: Text(
// (address != null &&
// address != "")
// ? address
// : widget.arguments[
// "useTyped"] ==
// 1
// ? S
// .of(context)
// .qingxuanzhemendian
// : widget.arguments[
// "useTyped"] ==
// 2
// ? S
// .of(context)
// .qingxuanzeshouhuodizhi
// : S
// .of(context)
// .xuni,
// overflow:
// TextOverflow.ellipsis,
// style: TextStyle(
// fontSize: 14.sp,
// color: Color(0xFF32A060),
// fontWeight: MyFontWeight.medium
// ),
// ),
// flex: 1,
// ),
// Icon(
// Icons.keyboard_arrow_right,
// size: 16,
// color: Color(0xFF32A060),
// ),
// ],
// ),
// ),
// flex: 1,
// ),
// ],
// ),
// visible: widget.arguments["useTyped"] != 3,
// ),
// SizedBox(
// height: 12.h,
// ),
// ],
// ),
// ),
Container(
margin: EdgeInsets.only(
left: 16, right: 16, top: 26, bottom: 8),
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius:
BorderRadius.all(Radius.circular(8)),
),
child: Column(
children: [
Row(
children: [
Image.asset(
"assets/image/icon_order_exchange_info.webp",
width: 24,
height: 24,
),
SizedBox(width: 4),
Text(
S.of(context).duihuanxinxi,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: Color(0xFF353535)),
),
],
),
SizedBox(
height: 18.h,
),
GestureDetector(
onTap: () {
setState(() {
showAlertDialog();
});
},
child: Row(
children: [
Text(
S.of(context).lingqufangshi,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
SizedBox(
width: 12.w,
),
Expanded(
child: Text(
widget.arguments["useTyped"] == 1
? S.of(context).ziti
: widget.arguments["useTyped"] == 2
? S.of(context).peisong
: S.of(context).xianshangfafang,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF353535),
),
)),
Icon(
Icons.keyboard_arrow_right,
size: 16,
color: Color(0xFF32A060),
),
],
),
),
Visibility(
child: SizedBox(
height: 13.h,
),
visible: widget.arguments["useTyped"] != 3,
),
Visibility(
child: Row(
children: [
Text(
"收货地址",
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
SizedBox(
width: 12.w,
),
Expanded(
child: GestureDetector(
onTap: () {
toAddressPicker();
},
child: Row(
mainAxisAlignment:
MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: Text(
(address != null &&
address != "")
? address
: widget.arguments[
"useTyped"] ==
1
? S
.of(context)
.qingxuanzhemendian
: widget.arguments[
"useTyped"] ==
2
? S
.of(context)
.qingxuanzeshouhuodizhi
: S
.of(context)
.xuni,
overflow:
TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF32A060),
),
),
flex: 1,
),
Icon(
Icons.keyboard_arrow_right,
size: 16,
color: Color(0xFF32A060),
),
],
),
),
flex: 1,
),
],
),
visible: widget.arguments["useTyped"] != 3,
),
SizedBox(
height: 12.h,
),
],
),
),
Container(
margin: EdgeInsets.only(
left: 16, right: 16, top: 8, bottom: 16),
@ -1003,18 +1003,22 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
}
String handleNeedPay() {
return widget.arguments["payType"] == 1
? "${double.parse(widget.arguments["onePrice"]) * buyNum}积分".toString()
: (widget.arguments["payType"] == 2
? ((widget.arguments["price"] == null ||
if(widget.arguments["payType"] == 0)
return "";
if(widget.arguments["payType"] == 1){
return S.of(context).jifen_(double.parse(widget.arguments["onePrice"]) * buyNum);
}else if(widget.arguments["payType"] ==2){
return (widget.arguments["price"] == null ||
widget.arguments["price"] == "0"
? ""
: "${double.parse(widget.arguments["price"]) * buyNum}积分") +
(widget.arguments["money"] == null ||
widget.arguments["money"] == "0.00"
? ""
: " + ${double.parse(widget.arguments["money"]) * buyNum}"))
: "${double.parse(widget.arguments["oneMoney"]) * buyNum}");
: " + ${double.parse(widget.arguments["money"]) * buyNum}");
}else if(widget.arguments["payType"] == 3){
return "${double.parse(widget.arguments["oneMoney"]) * buyNum}";
}
}
Widget checkPayView(var index) {

6
lib/order/order_view/order_commodity.dart

@ -178,14 +178,16 @@ class _OrderCommodity extends State<OrderCommodity> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
Expanded(child:Text(
productList.productName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
)),
Text(
"x${productList.buyNum}",
style: TextStyle(

4
lib/order/order_view/order_status.dart

@ -69,12 +69,12 @@ class _OrderStatus extends State<OrderStatus> {
: widget.isTakeOut == 1
? S.of(context).waimai
: "物流",
width: 42.w * AppUtils.textScale(context),
width: 46.w * AppUtils.textScale(context),
height: 20.h * AppUtils.textScale(context),
textColor: Color(0xFF32A060),
fontSize: 14.sp,
padding:
EdgeInsets.fromLTRB(8.w, 1.h, 8.w, 1.h),
EdgeInsets.symmetric(horizontal:8),
backgroup: Color(0xFFFFFFFF),
radius: 15.w,
),

4
lib/order/store_selector_page.dart

@ -45,7 +45,9 @@ class _StoreSelectorPage extends State<StoreSelectorPage> {
SharedPreferences.getInstance().then((value) {
apiService =
ApiService(Dio(), context: context, token: value.getString('token'));
ApiService(Dio(),
showLoading: true,
context: context, token: value.getString('token'));
});
if (aMapFlutterLocation == null) {

78
lib/qr/invite_friends.dart

@ -3,9 +3,9 @@ import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/article.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/invitation_list.dart';
import 'package:huixiang/retrofit/data/page.dart';
@ -19,6 +19,9 @@ import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:sharesdk_plugin/sharesdk_defines.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart';
import 'package:sharesdk_plugin/sharesdk_map.dart';
class InviteFriends extends StatefulWidget {
@override
@ -34,12 +37,19 @@ class _InviteFriends extends State<InviteFriends> {
List<InvitationList> invitationList = [];
UserInfo userInfo;
int pageNum = 1;
String phone = "";
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) {
if (value.getString('user') != null && value.getString('user') != "") {
phone = UserInfo.fromJson(jsonDecode(value.getString('user'))).inviteCode;
setState(() {});
}
queryInviteMember();
queryInviteMember();
});
}
///
@ -134,21 +144,21 @@ class _InviteFriends extends State<InviteFriends> {
),
centerTitle: true,
elevation: 0.0,
actions: [
GestureDetector(
child: Container(
margin: EdgeInsets.only(right: 14),
padding:EdgeInsets.only(left:70,right: 20),
child: Icon(
Icons.more_horiz,
color: Colors.black,
),
),
onTap: () {
// Navigator.of(context).pop();
// share();
})
],
// actions: [
// GestureDetector(
// child: Container(
// margin: EdgeInsets.only(right: 14),
// padding:EdgeInsets.only(left:70,right: 20),
// child: Icon(
// Icons.more_horiz,
// color: Colors.black,
// ),
// ),
// onTap: () {
// // Navigator.of(context).pop();
// // share();
// })
// ],
),
body: SmartRefresher(
controller: refreshController,
@ -209,7 +219,11 @@ class _InviteFriends extends State<InviteFriends> {
fit: BoxFit.fill,
),
SizedBox(height: 12.h,),
Container(
GestureDetector(
onTap: (){
widgetToUrl();
},
child: Container(
width: double.infinity,
height: 52.h,
decoration: BoxDecoration(
@ -238,6 +252,7 @@ class _InviteFriends extends State<InviteFriends> {
)
],
),
),
)
],
),
@ -736,4 +751,33 @@ class _InviteFriends extends State<InviteFriends> {
);
}
GlobalKey globalKey = GlobalKey();
widgetToUrl() async {
SSDKMap params = SSDKMap()
..setGeneral(
"邀请好友",
"",
[
"",
],
"https://pos.upload.gznl.top/0000/2022/06/0c4aa046-9da5-4053-84e6-a5c6ddb4387a.png",
"",
buildShareUrl(),
"",
"",
"",
"",
SSDKContentTypes.webpage,
);
SharesdkPlugin.share(ShareSDKPlatforms.wechatSession, params,
(state, userData, contentEntity, error) {
print("share!$state");
});
}
String buildShareUrl() {
return "http://192.168.10.134:5500/invite.html?invite=${phone}";
}
}

1
lib/qr/qr_share_image.dart

@ -8,7 +8,6 @@ import 'package:huixiang/utils/font_weight.dart';
import 'dart:ui' as ui;
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:path_provider/path_provider.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:sharesdk_plugin/sharesdk_plugin.dart';
class QrShareImagePage extends StatefulWidget {

6
lib/retrofit/data/coupon.dart

@ -23,9 +23,11 @@ class Coupon {
bool centreDisplay;
bool allProduct;
String tenantCode;
String remark;
String tenantName;
int isDelete;
String couponName;
String limitAmount;
String couponImg;
String couponDescription;
String memberCouponId;
@ -55,9 +57,11 @@ class Coupon {
..centreDisplay = json['centreDisplay'] as bool
..allProduct = json['allProduct'] as bool
..tenantCode = json['tenantCode'] as String
..remark = json['remark'] as String
..tenantName = json['tenantName'] as String
..isDelete = json['isDelete'] as int
..couponName = json['couponName'] as String
..limitAmount = json['limitAmount'] as String
..couponImg = json['couponImg'] as String
..couponDescription = json['couponDescription'] as String
..memberCouponId = json['memberCouponId'] as String
@ -88,9 +92,11 @@ class Coupon {
'centreDisplay': this.centreDisplay,
'allProduct' : this.allProduct,
'tenantCode': this.tenantCode,
'remark':this.remark,
'tenantName': this.tenantName,
'isDelete': this.isDelete,
'couponName': this.couponName,
'limitAmount': this.limitAmount,
'couponImg': this.couponImg,
'couponDescription': this.couponDescription,
'memberCouponId': this.memberCouponId,

3
lib/retrofit/data/settleOrderInfo.dart

@ -223,6 +223,7 @@ class CouponListBean {
int fullNumber;
int discountPercent;
String bizId;
String limitAmount;
String publishStartTime;
String publishEndTime;
String useStartTime;
@ -254,6 +255,7 @@ class CouponListBean {
couponListBean.fullNumber = map['fullNumber'];
couponListBean.discountPercent = map['discountPercent'];
couponListBean.bizId = map['bizId'];
couponListBean.limitAmount = map['limitAmount'];
couponListBean.publishStartTime = map['publishStartTime'];
couponListBean.publishEndTime = map['publishEndTime'];
couponListBean.useStartTime = map['useStartTime'];
@ -283,6 +285,7 @@ class CouponListBean {
"fullNumber": fullNumber,
"discountPercent": discountPercent,
"bizId": bizId,
"limitAmount":limitAmount,
"publishStartTime": publishStartTime,
"publishEndTime": publishEndTime,
"useStartTime": useStartTime,

2
lib/retrofit/retrofit_api.dart

@ -81,7 +81,7 @@ abstract class ApiService {
BuildContext context,
String token,
bool showLoading = false,
bool pay = false,
bool pay = true,
}) {
Map<String, dynamic> headers =
(token == null || token == "") ? {} : {'token': "Bearer $token"};

2
lib/setting/logout_page.dart

@ -118,7 +118,7 @@ class _LogoutPage extends State<LogoutPage> {
),
_textRich("1.首先,保在您开始注销操作前,请先进行以下确认,保证帐号、财产完全:"
"\n   •帐号处于安全状态;"
"\n   •请确认平台余额以及店铺余额清零,否则将不予注销;"
"\n   •请确认平台余额以及清零,否则将不予注销;"
"\n   •请确认当下无正在进行中的交易,否则无法进行注销操作;。"),
_textRich(
"2.勾选《一心回乡账号注销协议》,点击注销后,系统将判定帐号是否符合注销条件,符合后进行手机号验证,输入正确验证码后既注销完成。"),

141
lib/setting/treaty_page.dart

@ -45,147 +45,6 @@ class _TreatyPage extends State<TreatyPage> {
initialUrl: "http://huixiang.lotus-wallet.com/Privacy.html",
javascriptMode: JavascriptMode.unrestricted,
)),
// Container(
// width: MediaQuery.of(context).size.width,
// height: MediaQuery.of(context).size.height,
// margin: EdgeInsets.only(left: 20, right: 20, top: 10),
// child: SingleChildScrollView(
// physics: BouncingScrollPhysics(),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Padding(
// padding: EdgeInsets.only(top: 5),
// child: Align(
// alignment: Alignment.center,
// child: Text(
// "用户注册及使用App隐私协议",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xff00A359),
// ),
// ),
// ),
// ),
// SizedBox(
// height: 32.h,
// ),
// _textRich("    在此特别提醒您(用户)在注册成为用户之前,请认真阅读本《用户注册及使用App隐私协议》"
// "(以下简称「协议」),确保您充分理解本协议中各条款。请您审慎阅读并选择接受或不接受本协议。除非您接受本协议所有条款,"
// "否则您无权注册、登录或使用本协议所涉服务。您的注册、登录、使用等行为将视为对本协议的接受,并同意接受本协议各项条款"
// "的约束。本协议约定知理知己(武汉)文化科技有限公司(以下简称「一心回乡」)与用户之间关于一心回乡软件服务(以下简称"
// "「服务」)的权利义务。用户,是指注册、登录、使用本服务的个人或组织。本协议可由一心回乡随时更新,更新后的协议条款一旦"
// "公布即代替原来的协议条款,恕不再另行通知,用户可在本App中查阅最新版协议条款。在修改协议条款后,如果用户不接受修改后"
// "的条款,请立即停止使用一心回乡提供的服务,用户继续使用一心回乡提供的服务将被视为接受修改后的协议。"),
// Padding(
// padding: EdgeInsets.only(bottom: 25),
// child: Text(
// "一、账号注册",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// height: 1.2,
// color: Color(0xff32A060)),
// ),
// ),
// _textRich("    1、用户在使用本服务前需要注册一个一心回乡App账号。一心回乡App账号应当使用手机号码绑定注册,"
// "请用户使用尚未与一心回乡App账号绑定的手机号码,以及未被一心回乡根据本协议封禁的手机号码注册一心回乡App账号。"
// "一心回乡可以根据用户需求或产品需要对账号注册和绑定的方式进行变更,而无须事先通知用户。"
// "\n    2、鉴于一心回乡App账号的绑定注册方式,您同意一心回乡在注册时将允许您的手机号码及手机设备识别码等信息用于注册。"
// "\n    3、在用户注册及使用本服务时,一心回乡需要搜集能识别用户身份的个人信息以便一心回乡可以在必要时联系用户,"
// "或为用户提供更好的使用体验。一心回乡搜集的信息包括但不限于用户的姓名、地址;一心回乡同意对这些信息的使用将受限于第三条用户个人隐私信息保护的约束。"),
// Padding(
// padding: EdgeInsets.only(bottom: 25),
// child: Text(
// "二、用户个人隐私信息保护",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// height: 1.2,
// color: Color(0xff32A060)),
// ),
// ),
// _textRich("    1、如果一心回乡发现或收到他人举报或投诉用户违反本协议约定的,一心回乡"
// "有权不经通知随时对相关内容,包括但不限于用户资料、发布记录进行审查、删除,并视情节轻重对违"
// "规账号处以包括但不限于警告、账号封禁、设备封禁、功能封禁的处罚,且通知用户处理结果。"
// "\n    2、因违反用户协议被封禁的用户,可以自行与一心回乡联系。其中,被实施功能封禁的用户会在"
// "封禁期届满后自动恢复被封禁功能。被封禁用户可提交申诉,一心回乡将对申诉进行审查,并自行合理判断决定是否变更处罚措施。"
// "\n    3、用户理解并同意,一心回乡有权依合理判断对违反有关法律法规或本协议规定的行为进行处罚,"
// "对违法违规的任何用户采取适当的法律行动,并依据法律法规保存有关信息向有关部门报告等,用户应承担由此而产生的一切法律责任。"
// "\n    4、用户理解并同意,因用户违反本协议约定,导致或产生的任何第三方主张的任何索赔、要求或损失,"
// "包括合理的律师费,用户应当赔偿一心回乡与合作公司、关联公司,并使之免受损害。"),
// Padding(
// padding: EdgeInsets.only(bottom: 25),
// child: Text(
// "三、用户发布内容规范",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// height: 1.2,
// color: Color(0xff32A060)),
// ),
// ),
// _textRich("   1、本条所述内容是指用户使用一心回乡App的过程中所制作、上传、复制、发布、传播的任何内容,包括但不限"
// "于账号头像、名称、用户说明等注册信息及认证资料,或文字、语音、图片、视频、图文等发送、回复或自动回复消息和"
// "相关链接页面,以及其他使用账号或本服务所产生的内容。"
// "\n    2、用户不得利用一心回乡App账号或本服务制作、上传、复制、发布、传播如下法律、法规和政策禁止的内容:"
// "\n    (1) 反对宪法所确定的基本原则的\n    (2) 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;"
// "\n    (3)损害国家荣誉和利益的;\n    (4) 煽动民族仇恨、民族歧视,破坏民族团结的;"
// "\n    (5) 破坏国家宗教政策,宣扬邪教和封建迷信的;\n    (6) 散布谣言,扰乱社会秩序,破坏社会稳定的;"
// "\n    (7) 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;\n    (8) 侮辱或者诽谤他人,侵害他人合法权益的;"
// "\n    (9) 含有法律、行政法规禁止的其他内容的信息。"
// "\n    3、用户不得利用一心回乡App账号或本服务制作、上传、复制、发布、传播如下干扰一心回乡App正常运营,以及侵犯其他用户或第三方合法权益的内容:"
// "\n    (1) 含有任何性或性暗示的;"
// "\n    (2) 含有辱骂、恐吓、威胁内容的;\n    (3) 含有骚扰、垃圾广告、恶意信息、诱骗信息的;"
// "\n    (4) 涉及他人隐私、个人信息或数据的;\n    (5) 侵害他人名誉权、肖像权、知识产权、商业秘密等合法权利的;"
// "\n    (6) 含有其他干扰本服务正常运营和侵犯其他用户或第三方合法权益内容的信息。"),
// Padding(
// padding: EdgeInsets.only(bottom: 25),
// child: Text(
// "四、使用规则",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// height: 1.2,
// color: Color(0xff32A060)),
// ),
// ),
// _textRich(
// "   1、用户在本服务中或通过本服务所传送、发布的任何内容并不反映或代表,也不得被视为反映或代表一心回乡的观点、立场或政策,一心回乡对此不承担任何责任。"
// "\n    2、用户不得利用一心回乡App账号或本服务进行如下行为:\n    (1) 提交、发布虚假信息,或盗用他人头像或数据,冒充、利用他人名义的;"
// "\n    (2) 强制、诱导其他用户关注、点击连接页面或分享信息的;\n    (3) 虚构事实、隐瞒真相以误导、欺骗他人的;"
// "\n    (4) 利用技术手段批量建立虚假账号的;\n    (5)利用一心回乡App账号或本服务从事任何违法犯罪活动的;"
// "\n    (6) 制作、发布与以上行为相关的方法、工具,或对此类方法、工具进行运营或传播,无论这些行为是否为商业目的;"
// "\n    (7) 其他违反法律法规规定、侵犯其他用户合法权益、干扰一心回乡App正常运营或脚印未明示授权的行为。"
// "\n    3、用户须对利用一心回乡App账号或本服务传送信息的真实性、合法性、无害性、准确性、有效性等全权负责,"
// "与用户所传播的信息相关的任何法律责任由用户自行承担,与一心回乡无关。如因此给一心回乡或第三方造成损害的,用户应当依法予以赔偿。"
// "\n    4、一心回乡提供的服务中可能包括广告,用户同意在使用过程中显示一心回乡和第三方供应商、合作伙伴提供的广告。"
// "除法律法规明确规定外,用户应自行对依该广告信息进行的交易负责,对用户因依该广告信息进行的交易或前述广告商提供的内容而遭受的损失或损害,一心回乡不承担任何责任。"),
// Padding(
// padding: EdgeInsets.only(bottom: 25),
// child: Text(
// "五、其他",
// style: TextStyle(
// fontSize: 18.sp,
// fontWeight: MyFontWeight.semi_bold,
// height: 1.2,
// color: Color(0xff32A060)),
// ),
// ),
// _textRich("   1、一心回乡郑重提醒用户注意本协议中免除脚印责任和限制用户权利的条款,请用户仔细阅读,自主考虑风险。"
// "未成年人应在法定监护人的陪同下阅读本协议。\n    2、本协议的效力、解释及纠纷的解决,适用于中华人民共和国法律。"
// "若用户和脚印之间发生任何纠纷或争议,首先应友好协商解决,协商不成的,用户同意将纠纷或争议提交脚印住所地有管辖权的人民法院管辖。"
// "\n    3、本协议的任何条款无论因何种原因无效或不具可执行性,其余条款仍有效,对双方具有约束力。\n    4、本协议最终解释"
// "权归脚印所有,据知理知己(武汉)有限责任公司免责条款特此声明:该应用注册及隐私协议与知理知己(武汉)有限责任公司无关。政策认为合适的披露。"),
// SizedBox(
// height: 50.h,
// ),
// ],
// ),
// ),
// ),
);
}

273
lib/settlement/settlement_view/coupon.dart

@ -23,6 +23,8 @@ class CouponWidget extends StatefulWidget {
}
}
class _CouponWidget extends State<CouponWidget> {
@override
Widget build(BuildContext context) {
@ -52,53 +54,55 @@ class _CouponWidget extends State<CouponWidget> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
"¥",
style: TextStyle(
fontSize: 22.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xff32A060),
),
),
SizedBox(
height: 4.h,
),
Text(
"${double.tryParse(widget.couponList.discountAmount).toInt()}",
style: TextStyle(
fontSize: 40.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
],
),
),
Text(
S
.of(context)
.manyuankeyong(widget.couponList.fullAmount),
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
],
),
flex: 1,
),
// Expanded(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Expanded(
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.baseline,
// textBaseline: TextBaseline.alphabetic,
// children: [
// Text(
// "¥",
// style: TextStyle(
// fontSize: 22.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xff32A060),
// ),
// ),
// SizedBox(
// height: 4.h,
// ),
// Text(
// "${double.tryParse(widget.couponList.discountAmount).toInt()}",
// style: TextStyle(
// fontSize: 40.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xff32A060),
// ),
// ),
// ],
// ),
// ),
// Text(
// S.of(context)
// .manyuankeyong(widget.couponList.fullAmount),
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xff32A060),
// ),
// ),
// ],
// ),
// flex: 1,
// ),
SizedBox(width:8,),
couponListWidget(context),
SizedBox(width:5,),
Expanded(
flex: 2,
child: Column(
@ -265,4 +269,179 @@ class _CouponWidget extends State<CouponWidget> {
),
);
}
Widget couponListWidget(BuildContext context) {
if (widget.couponList.bizType == 1) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
"¥",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xff32A060),
),
),
SizedBox(
height: 4.h,
),
Text(
widget.couponList != null
? double.tryParse("${widget.couponList.discountAmount}" ?? "0")
.toInt()
.toString()
: "",
style: TextStyle(
fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
],
),
Text(
S.of(context).manyuankeyong(widget.couponList != null
? ("${widget.couponList.fullAmount}" ?? "0")
.toString()
: ""),
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
],
);
} else if (widget.couponList.bizType == 3) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.only(bottom:10,top: 7,left: 12),
child: Text(
S.of(context).duihuanquan,
style: TextStyle(
fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
),
Text(
S.of(context).xianshangshiyong,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
],
);
} else if (widget.couponList.bizType == 5) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
padding: EdgeInsets.only(bottom:10,top: 7,left: 12),
child: Text(
S.of(context).duihuanquan,
style: TextStyle(
fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
),
Text(
S.of(context).xianxiashiyong,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
],
);
} else if (widget.couponList.bizType == 6) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
"¥",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: widget.couponList.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
),
),
SizedBox(
height: 4.h,
),
Text(
widget.couponList != null
? double.tryParse("${widget.couponList.limitAmount}" ?? "0").toStringAsFixed(2)
: "",
style: TextStyle(
fontSize: 28.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
],
),
],
);
}else{
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
widget.couponList != null
? "${(widget.couponList.discountPercent / 10.0 >= 10) ? 10 : widget.couponList.discountPercent / 10.0}" ??
"0"
: "",
style: TextStyle(
fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
SizedBox(
height: 4.h,
),
Text(
"",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060),
),
),
],
),
],
);
}
}
}

7
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -146,14 +146,17 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
Expanded(child: Text(
productList.productName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
),),
Text(
"x${productList.buyNum}",
style: TextStyle(

4
lib/store/store_order.dart

@ -436,7 +436,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
child:
),*/
),
if(count() != 0)
// if(count() != 0)
Positioned(
bottom: 0,
left: 0,
@ -645,6 +645,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
position < storeInfo.bannerList.length)
? storeInfo.bannerList[position].imgUrl
: "",
height: 230.h,
width:double.infinity,
fit: BoxFit.cover,
radius: BorderRadius.zero,
errorSrc: "assets/image/default_2_1.webp",

4
lib/store/store_view/product_sku.dart

@ -114,8 +114,8 @@ class _ProductSku extends State<ProductSku> {
children: [
MImage(
widget.miNiDetail.imgs[0],
width: 75,
height: 75,
width: 76,
height: 76,
fit: BoxFit.cover,
radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp",

62
lib/store/store_view/shop_goods.dart

@ -83,20 +83,20 @@ class _ShopGoods extends State<ShopGoods> {
),
),
),
Image.asset(
"assets/image/green_leaf.webp",
fit: BoxFit.cover,
width: 12,
height: 12,
),
Text(
"X300",
style: TextStyle(
color: Color(0xFF55BC51),
fontSize: 10.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
// Image.asset(
// "assets/image/green_leaf.webp",
// fit: BoxFit.cover,
// width: 12,
// height: 12,
// ),
// Text(
// "X300",
// style: TextStyle(
// color: Color(0xFF55BC51),
// fontSize: 10.sp,
// fontWeight: MyFontWeight.semi_bold,
// ),
// ),
],
),
SizedBox(
@ -141,23 +141,23 @@ class _ShopGoods extends State<ShopGoods> {
SizedBox(
width: 2.w,
),
Container(
width: 44.w,
height: 18.h,
decoration: BoxDecoration(
color: Color(0xFFFF4500),
borderRadius: BorderRadius.circular(2),
),
alignment: Alignment.center,
child: Text(
"APP专享",
style: TextStyle(
color: Color(0xFFFFFFFF),
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
),
),
),
// Container(
// width: 44.w,
// height: 18.h,
// decoration: BoxDecoration(
// color: Color(0xFFFF4500),
// borderRadius: BorderRadius.circular(2),
// ),
// alignment: Alignment.center,
// child: Text(
// "APP专享",
// style: TextStyle(
// color: Color(0xFFFFFFFF),
// fontSize: 10.sp,
// fontWeight: MyFontWeight.medium,
// ),
// ),
// ),
],
),
Spacer(),

0
lib/union/un_page.dart

32
lib/union/union_page.dart

@ -37,7 +37,7 @@ class UnionPage extends StatefulWidget {
}
class _UnionPage extends State<UnionPage>
with AutomaticKeepAliveClientMixin, WidgetsBindingObserver {
with AutomaticKeepAliveClientMixin, WidgetsBindingObserver,SingleTickerProviderStateMixin {
final RefreshController refreshController =
RefreshController(initialRefresh: false);
final RefreshController refreshController1 =
@ -50,6 +50,8 @@ class _UnionPage extends State<UnionPage>
bool isKeyBoardShow = false;
BMFCoordinate latLng;
@override
void dispose() {
super.dispose();
@ -83,6 +85,11 @@ class _UnionPage extends State<UnionPage>
@override
void initState() {
super.initState();
if (tabController == null)
tabController = TabController(length: 4, vsync: this);
tabController?.addListener(() {
startLocation();
});
WidgetsBinding.instance.addObserver(this);
eventBus.on<EventType>().listen((event) {
@ -179,7 +186,7 @@ class _UnionPage extends State<UnionPage>
value.getString("province"),
value.getString("city"),
value.getString("district"),
editingController.text,
editingController.text
),
setState(() {
if (_mapController != null) {
@ -202,12 +209,13 @@ class _UnionPage extends State<UnionPage>
queryStore(latitude, longitude, province, city, district, searchKey) async {
BaseData<List<Store>> baseData = await apiService.queryStore({
// "city": city,
// "district": district,
// "province": province,
"city": city,
"district": district,
"province": province,
"latitude": latitude,
"longitude": longitude,
"searchKey": searchKey
"searchKey": searchKey,
"serviceType":tabController.index == 0 ?"":(tabController.index==1?"EATSTORE":(tabController.index == 2?"DRINKSTORE":"HAPPYSTORE")),
}).catchError((error) {
refreshController.refreshFailed();
});
@ -220,13 +228,12 @@ class _UnionPage extends State<UnionPage>
EasyLoading.dismiss();
setState(() {});
}
TabController tabController;
@override
Widget build(BuildContext context) {
super.build(context);
return DefaultTabController(
length: 4,
child: Scaffold(
return Scaffold(
appBar: MyAppBar(
title: "",
leading: false,
@ -234,6 +241,7 @@ class _UnionPage extends State<UnionPage>
titleChild: PreferredSize(
preferredSize: Size(double.infinity, 38.h),
child: TabBar(
controller: tabController,
isScrollable: true,
//
indicatorColor: Color(0xff39B54A),
@ -260,6 +268,7 @@ class _UnionPage extends State<UnionPage>
),
)),
body: TabBarView(
controller: tabController,
children: [
buildItem(refreshController),
buildItem(refreshController1),
@ -267,7 +276,6 @@ class _UnionPage extends State<UnionPage>
buildItem(refreshController3),
],
),
),
);
// GestureDetector(
// onTap: () {
@ -351,7 +359,7 @@ class _UnionPage extends State<UnionPage>
// );
}
Widget buildItem(RefreshController refreshController) {
Widget buildItem(RefreshController refreshController,) {
return Column(
children: [
buildSearchItem(),
@ -411,6 +419,8 @@ class _UnionPage extends State<UnionPage>
);
}
BMFMapController _mapController;
final TextEditingController editingController = TextEditingController();

94
lib/view_widget/coupon_details_dialog.dart

@ -0,0 +1,94 @@
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/retrofit/data/store.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/store/scan.dart';
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/round_button.dart';
class CouponDetailsWidget extends StatefulWidget {
final Coupon coupon;
CouponDetailsWidget(this.coupon);
@override
State<StatefulWidget> createState() {
return _CouponDetailsWidget();
}
}
class _CouponDetailsWidget extends State<CouponDetailsWidget> {
int selectIndex = 0;
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height:291.h,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Container(
alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical: 12),
child: Text(
"使用详情",
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 15.sp,
color: Color(0xFF353535),
),
),
)),
GestureDetector(
onTap: () {
setState(() {
Navigator.of(context).pop();
});
},
child: Icon(
Icons.clear,
color: Colors.black,
size: 18,
),
),
SizedBox(width: 14),
],
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xFFF2F2F2),
margin: EdgeInsets.only(bottom: 11.h),
),
Container(
color: Colors.white,
child: Html(
data: widget.coupon.remark ?? "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
]));
}
}

2
lib/view_widget/mine_vip_entry.dart

@ -131,7 +131,7 @@ class MineVipEntry extends StatelessWidget {
height: 14,
),
Container(
height: 8.h,
height: 4.h,
child: ClipRRect(
borderRadius: BorderRadius.circular(6.5),
child: LinearProgressIndicator(

16
lib/view_widget/my_appbar.dart

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/utils/font_weight.dart';
class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
final Function onTap;
@ -59,6 +60,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
brightness: brightness,
leading: leading
? GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if(exit == null)
Navigator.of(context).pop();
@ -66,7 +68,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(left: 12),
margin: EdgeInsets.only(left: 12,),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
@ -81,19 +83,27 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
leadingWidth: leading ? 56 : 10.w,
title: ((title == null || title == "") && titleChild != null)
? titleChild
: Container(
: GestureDetector(
onTap: () {
if(exit == null)
Navigator.of(context).pop();
else exit();
},
child: Container(
width: double.infinity,
margin: EdgeInsets.only(right:34.w),
padding: EdgeInsets.all(10),
alignment: Alignment.center,
child: Text(
title,
style: TextStyle(
color: titleColor,
fontWeight: FontWeight.bold,
fontWeight: MyFontWeight.medium,
fontSize: titleSize,
),
),
),
),
actions: actions,
bottom: bottom,
);

55
lib/view_widget/new_coupon_widget.dart

@ -10,16 +10,16 @@ class NewCouponWidget extends StatelessWidget {
// final Function couponDialog;
final GestureTapCallback callbackEx;
final Coupon coupon;
final Function showCouponDetails;
final int type;
NewCouponWidget(this.coupon, this.callback,this.callbackEx, {this.type = 1});
NewCouponWidget(this.coupon, this.callback,this.callbackEx,this.showCouponDetails, {this.type = 1});
@override
Widget build(BuildContext context) {
return buildCoupon(context);
}
String getCouponStoreName(){
String couponStoreName = coupon.tenantName;
if(coupon?.storeList != null && coupon.storeId != "0"){
@ -30,6 +30,7 @@ class NewCouponWidget extends StatelessWidget {
}
return couponStoreName;
}
///ui
Widget buildCoupon(BuildContext context) {
// if(coupon != null) {
@ -41,7 +42,7 @@ class NewCouponWidget extends StatelessWidget {
// }
return Container(
height: (coupon != null && coupon.isEx) ? 168.h : 151.h,
height: (coupon != null && coupon.isEx) ? 155.h : 135.h,
width: double.infinity,
margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h),
decoration: BoxDecoration(
@ -74,7 +75,7 @@ class NewCouponWidget extends StatelessWidget {
Expanded(
flex: 2,
child:Container(
margin: EdgeInsets.only(top: 12,left: 12,bottom: 12),
margin: EdgeInsets.only(top: 14,left: 14,bottom: 14),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -89,7 +90,7 @@ class NewCouponWidget extends StatelessWidget {
color: Color(0xFF0D0D0D),
),
),
SizedBox(height: 6,),
SizedBox(height:10,),
Expanded(child:
(coupon.useStartTime == null &&
coupon.useEndTime == null)?
@ -130,6 +131,7 @@ class NewCouponWidget extends StatelessWidget {
color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D),
),
),
SizedBox(height: 5,),
Text(
"${coupon?.useEndTime ?? ""}",
maxLines:1,
@ -147,8 +149,7 @@ class NewCouponWidget extends StatelessWidget {
),),
GestureDetector(
onTap: (){
// showDeleteDialog();
showCouponDetails();
},
child: Row(
children: [
@ -174,7 +175,7 @@ class NewCouponWidget extends StatelessWidget {
Expanded(
flex: 1,
child:Container(
margin: EdgeInsets.only(top: 12,left: 12,bottom: 12),
margin: EdgeInsets.only(top: 14,left: 12,bottom: 14,),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -489,7 +490,42 @@ class NewCouponWidget extends StatelessWidget {
),
],
);
} else {
} else if (coupon.bizType == 6) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Text(
"¥",
style: TextStyle(
fontSize: 22.sp,
fontWeight: MyFontWeight.medium,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
),
),
SizedBox(
height: 4.h,
),
Text(
coupon != null
? double.tryParse("${coupon.limitAmount}" ?? "0").toStringAsFixed(2)
: "",
style: TextStyle(
fontSize: 35.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060),
),
),
],
),
],
);
}else {
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
@ -673,4 +709,5 @@ class NewCouponWidget extends StatelessWidget {
}
}
}
}

106
lib/view_widget/recharge_details_dialog.dart

@ -0,0 +1,106 @@
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/coupon.dart';
import 'package:huixiang/retrofit/data/recharge_list.dart';
import 'package:huixiang/retrofit/data/store.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/store/scan.dart';
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/round_button.dart';
class RechargeWidget extends StatefulWidget {
final RechargeList rechargeA;
RechargeWidget(this.rechargeA);
@override
State<StatefulWidget> createState() {
return _RechargeWidget();
}
}
class _RechargeWidget extends State<RechargeWidget> {
int selectIndex = 0;
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(top: 12),
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: new BorderRadius.only(
topLeft: const Radius.circular(25.0),
topRight: const Radius.circular(25.0))),
child: Container(
width: 299,
height:299,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:
Container(
margin: EdgeInsets.symmetric(vertical: 12.h),
alignment: Alignment.center,
child: Text(
"充值说明",
style: TextStyle(
fontWeight: MyFontWeight.bold,
fontSize: 15.sp,
color: Color(0xFF353535),
),
),
)),
GestureDetector(
onTap: (){
setState(() {
Navigator.of(context).pop();
});
},
child: Icon(
Icons.clear,
color: Colors.black,
size: 18,
),
),
SizedBox(width: 14),
],
),
SizedBox(height: 12.h,),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xFFF2F2F2),
margin: EdgeInsets.only(bottom:13.h),
),
Padding(padding:EdgeInsets.only(left: 14),
child:
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Expanded(
child: Container(
color: Colors.white,
child: Html(
data: widget.rechargeA.remark ?? "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
)
],
),)
],
),
));
}
}

14
lib/view_widget/selector_store_dialog.dart

@ -32,10 +32,10 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
52.0.h) +
54.0.h +
158.0.h,
padding: EdgeInsets.only(
top: 16.h,
bottom: 16.h,
),
// padding: EdgeInsets.only(
// top: 16.h,
// bottom: 16.h,
// ),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
@ -54,6 +54,7 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
Expanded(
child: Container(
alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical: 12),
child: Text(
S.of(context).qingxuanzeshiyongmendian,
style: TextStyle(
@ -78,9 +79,6 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
SizedBox(width: 14),
],
),
SizedBox(
height: 12.h,
),
Container(
width: double.infinity,
height: 1.h,
@ -233,7 +231,7 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
color: position == selectIndex ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7),
),
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 12, bottom: 16, top: 16),
padding: EdgeInsets.only(left: 12,),
child: Text(
store.storeName,
style: TextStyle(

Loading…
Cancel
Save