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. 119
      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. 191
      lib/home/home_view/welfare_core.dart
  34. 44
      lib/home/points_mall_view/points_goods_title.dart
  35. 59
      lib/home/points_mall_view/points_goods_view.dart
  36. 75
      lib/home/welfare_exchange.dart
  37. 187
      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. 308
      lib/mine/coupon_page.dart
  48. 17
      lib/mine/coupons_page.dart
  49. 407
      lib/mine/mine_shop_details.dart
  50. 1
      lib/mine/mine_view/calendar_page.dart
  51. 99
      lib/mine/mine_view/mine_item.dart
  52. 14
      lib/mine/mine_view/mine_view.dart
  53. 101
      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. 504
      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. 132
      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. 32
      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("发票助手"), "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"),
"fasong" : MessageLookupByLibrary.simpleMessage("发送"), "fasong" : MessageLookupByLibrary.simpleMessage("发送"),
"faxingshijian" : m4, "faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"), "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到卡包即可使用!"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"),

4
lib/generated/intl/messages_zh_CN.dart

@ -218,8 +218,8 @@ class MessageLookup extends MessageLookupByLibrary {
"fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"), "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"),
"fasong" : MessageLookupByLibrary.simpleMessage("发送"), "fasong" : MessageLookupByLibrary.simpleMessage("发送"),
"faxingshijian" : m4, "faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"), "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到卡包即可使用!"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : 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("发票助手"), "fapiaozhushou" : MessageLookupByLibrary.simpleMessage("发票助手"),
"fasong" : MessageLookupByLibrary.simpleMessage("发送"), "fasong" : MessageLookupByLibrary.simpleMessage("发送"),
"faxingshijian" : m4, "faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"), "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非实物兑换"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到卡包即可使用!"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非实物商品兑换后领取到优惠券即可使用!"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉丝"), "fensi" : MessageLookupByLibrary.simpleMessage("粉丝"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : 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("發送"), "fasong" : MessageLookupByLibrary.simpleMessage("發送"),
"faxingshijian" : m4, "faxingshijian" : m4,
"feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非實物兌換碼"), "feishiwuduihuanma" : MessageLookupByLibrary.simpleMessage("非實物兌換碼"),
"feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品!"), "feishiwushangpin" : MessageLookupByLibrary.simpleMessage("非實物商品兌換後領取到優惠券即可使用"),
"fensi" : MessageLookupByLibrary.simpleMessage("粉絲"), "fensi" : MessageLookupByLibrary.simpleMessage("粉絲"),
"fenxiang" : MessageLookupByLibrary.simpleMessage("分享"), "fenxiang" : MessageLookupByLibrary.simpleMessage("分享"),
"fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"), "fenxiangdao" : MessageLookupByLibrary.simpleMessage("分享到"),

2
lib/generated/intl/messages_zh_TW.dart

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

8
lib/generated/l10n.dart

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

25
lib/home/home_page.dart

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

119
lib/home/home_view/discount_zone.dart

@ -50,7 +50,7 @@ class _DiscountZone extends State<DiscountZone> {
)), )),
if(widget.coupon.length != 0) if(widget.coupon.length != 0)
Container( Container(
height: 91, height: 100,
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
@ -74,55 +74,39 @@ class _DiscountZone extends State<DiscountZone> {
Widget discountItem(Coupon coupon) { Widget discountItem(Coupon coupon) {
return Container( return Container(
width: 300.w, width: 270.w,
height: 91.h, height: 100.h,
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
fit: BoxFit.cover, fit: BoxFit.fill,
image: AssetImage("assets/image/discount.webp"), image: AssetImage("assets/image/discount.webp"),
), ),
), ),
margin: EdgeInsets.only(right: 6.w), margin: EdgeInsets.only(right: 6.w),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ 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( Expanded(
flex: 2, flex: 2,
child: Container( child: Container(
margin: EdgeInsets.only(top: 12,left:35,bottom: 12), margin: EdgeInsets.only(top: 12,bottom: 12,left: 20,right: 27),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded(child:
Text( Text(
coupon != null ? coupon.couponName ?? "" : "", (coupon != null ? coupon.couponName ?? "" : ""),
maxLines: 1, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
height: 1.5,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF0D0D0D), color: Color(0xFFFFA607),
), ),
),), ),
Spacer(),
SizedBox(height:5), SizedBox(height:5),
Expanded(child:
(coupon.useStartTime == null && (coupon.useStartTime == null &&
coupon.useEndTime == null)? coupon.useEndTime == null)?
Text( Text(
@ -132,7 +116,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D), color: Color(0xFFFFA607),
), ),
):Text( ):Text(
"有效期至 ${coupon.useEndTime.substring(0, coupon.useEndTime.indexOf(" "))}", "有效期至 ${coupon.useEndTime.substring(0, coupon.useEndTime.indexOf(" "))}",
@ -141,12 +125,26 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, 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( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
), ),
), ),
SizedBox( SizedBox(
@ -182,8 +180,8 @@ class _DiscountZone extends State<DiscountZone> {
: "", : "",
style: TextStyle( style: TextStyle(
fontSize: 30.sp, fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: FontWeight.w900,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
), ),
), ),
], ],
@ -196,7 +194,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 26.sp, fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 26.sp, fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold, 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( return Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -271,7 +304,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle( style: TextStyle(
fontSize: 30.sp, fontSize: 30.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xff32A060), color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
), ),
), ),
SizedBox( SizedBox(
@ -282,7 +315,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold, 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) { Widget build(BuildContext context) {
return Container( return Container(
child: AspectRatio( child: AspectRatio(
aspectRatio: 1.4, aspectRatio: 375/230,
child: Swiper( child: Swiper(
pagination: SwiperPagination( pagination: SwiperPagination(
margin: EdgeInsets.only(bottom: 12.h), 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( Expanded(child: GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).pushNamed('/router/roll_center_page'); // Navigator.of(context).pushNamed('/router/roll_center_page');
// Navigator.of(context).pushNamed('/router/welfare_page'); Navigator.of(context).pushNamed('/router/welfare_page');
}, },
child:Container( child:Container(
width: double.infinity, width: double.infinity,

5
lib/home/home_view/top_selling_list.dart

@ -33,7 +33,10 @@ class _TopSellingList extends State<TopSellingList> {
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6), 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), margin: EdgeInsets.only(left: 14.w,right: 14.w,top: 12.h,bottom: 23.h),
padding: EdgeInsets.only(left: 12.w,top: 16.h), padding: EdgeInsets.only(left: 12.w,top: 16.h),

191
lib/home/home_view/welfare_core.dart

@ -65,106 +65,121 @@ class _WelfareCore extends State<WelfareCore> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded(child: Container( Expanded(child: GestureDetector(
width: double.infinity, onTap: (){
height:60.h, Navigator.of(context).pushNamed('/router/welfare_page');
padding: EdgeInsets.only(left: 12.w), },
decoration: BoxDecoration( child:Container(
image: DecorationImage( width: double.infinity,
fit: BoxFit.fill, height:60.h,
image: AssetImage("assets/image/welfare1.webp"), padding: EdgeInsets.only(left: 12.w),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/welfare1.webp"),
),
), ),
), child: Column(
child: Column( mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Text(
Text( "本周劵包",
"本周劵包", style: TextStyle(
style: TextStyle( fontSize: 14.sp,
fontSize: 14.sp, fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, color: Color(0xFFFFFFFF),
color: Color(0xFFFFFFFF), ),
), ),
), SizedBox(height: 2.h),
SizedBox(height: 2.h), Text(
Text( "每周三更新劵包",
"每周三更新劵包", style: TextStyle(
style: TextStyle( fontSize: 10.sp,
fontSize: 10.sp, fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, color: Color(0xFFFFFFFF),
color: Color(0xFFFFFFFF), ),
), ),
), ],
], ),
), ),
)), )),
Expanded(child: Container( Expanded(child: GestureDetector(
width: double.infinity, onTap: (){
height:60.h, Navigator.of(context).pushNamed('/router/welfare_page');
padding: EdgeInsets.only(left: 12.w), },
decoration: BoxDecoration( child:Container(
image: DecorationImage( width: double.infinity,
fit: BoxFit.fill, height:60.h,
image: AssetImage("assets/image/welfare2.webp"), padding: EdgeInsets.only(left: 12.w),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/welfare2.webp"),
),
), ),
), child: Column(
child: Column( mainAxisAlignment: MainAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Text(
Text( "邀请好友",
"邀请好友", style: TextStyle(
style: TextStyle( fontSize: 14.sp,
fontSize: 14.sp, fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, color: Color(0xFFFFFFFF),
color: Color(0xFFFFFFFF), ),
), ),
), SizedBox(height: 2.h),
SizedBox(height: 2.h), Text(
Text( "邀请好友得分",
"邀请好友得分", style: TextStyle(
style: TextStyle( fontSize: 10.sp,
fontSize: 10.sp, fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.regular, color: Color(0xFFFFFFFF),
color: Color(0xFFFFFFFF), ),
), ),
), ],
],
),
)),
Expanded(child: Container(
width: double.infinity,
height:60.h,
padding: EdgeInsets.only(left: 12.w),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/welfare3.webp"),
), ),
), ),
child: Column( ),),
mainAxisAlignment: MainAxisAlignment.center, Expanded(child: GestureDetector(
crossAxisAlignment: CrossAxisAlignment.start, onTap: (){
children: [ Navigator.of(context).pushNamed('/router/welfare_page');
Text( },
"做任务得券", child:Container(
style: TextStyle( width: double.infinity,
fontSize: 14.sp, height:60.h,
fontWeight: MyFontWeight.regular, padding: EdgeInsets.only(left: 12.w),
color: Color(0xFFFFFFFF), decoration: BoxDecoration(
), image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage("assets/image/welfare3.webp"),
), ),
SizedBox(height: 2.h), ),
Text( child: Column(
"多种优惠券等你拿", mainAxisAlignment: MainAxisAlignment.center,
style: TextStyle( crossAxisAlignment: CrossAxisAlignment.start,
fontSize: 10.sp, children: [
fontWeight: MyFontWeight.regular, Text(
color: Color(0xFFFFFFFF), "积分换券",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
), ),
), SizedBox(height: 2.h),
], Text(
"多种优惠券等你拿",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
),
],
),
), ),
)), )),
], ],

44
lib/home/points_mall_view/points_goods_title.dart

@ -42,32 +42,32 @@ class _PointsGoodsTitle extends State<PointsGoodsTitle> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// ItemTitle(
// text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.webp",
// ),
// ItemTitle( // ItemTitle(
// text: S.of(context).jifenshangcheng, // text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.webp", // 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( Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: DefaultTabController( child: DefaultTabController(

59
lib/home/points_mall_view/points_goods_view.dart

@ -19,6 +19,18 @@ class PointGoods extends StatefulWidget {
} }
class _PointGoods extends State<PointGoods> { 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GridView.builder( return GridView.builder(
@ -40,7 +52,7 @@ class _PointGoods extends State<PointGoods> {
mainAxisSpacing: 16.w, mainAxisSpacing: 16.w,
//Widget宽高比例 0.59 //Widget宽高比例 0.59
childAspectRatio: childAspectRatio:
200 / (281 / 2 + (281 / 2) * AppUtils.textScale(context)), 200 / (295 / 2 + (295 / 2) * AppUtils.textScale(context)),
), ),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return GestureDetector( return GestureDetector(
@ -79,7 +91,7 @@ class _PointGoods extends State<PointGoods> {
children: [ children: [
MImage( MImage(
goods.mainImgPath, goods.mainImgPath,
aspectRatio: 1.1, aspectRatio: 158/158,
radius: BorderRadius.only( radius: BorderRadius.only(
topLeft: Radius.circular(6), topLeft: Radius.circular(6),
topRight: Radius.circular(6), topRight: Radius.circular(6),
@ -109,34 +121,37 @@ class _PointGoods extends State<PointGoods> {
fontSize: 15.sp, fontSize: 15.sp,
), ),
), ),
Column(
Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( 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( style: TextStyle(
color: Color(0xFFE5600D), color: Color(0xFFE5600D),
fontSize: 16.sp, fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
), ),
), ),
Image.asset( Row(
"assets/image/green_leaf.webp", children: [
fit: BoxFit.cover, Image.asset(
width: 12, "assets/image/green_leaf.webp",
height: 12, fit: BoxFit.cover,
), width: 12,
Text( height: 12,
"x100", ),
overflow: TextOverflow.ellipsis, Text(
maxLines: 2, "x100",
style: TextStyle( overflow: TextOverflow.ellipsis,
color: Color(0xFF32A060), maxLines: 2,
fontWeight: MyFontWeight.semi_bold, style: TextStyle(
fontSize: 16.sp, color: Color(0xFF32A060),
), fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
),
),
],
), ),
], ],
), ),

75
lib/home/welfare_exchange.dart

@ -339,25 +339,58 @@ class _WelfareExchange extends State<WelfareExchange> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( GestureDetector(
S.of(context).yiyoujifen, onTap: (){
style: TextStyle( Navigator.of(context).pushNamed('/router/integral_detailed_page');
fontSize: 12.sp, },
fontWeight: MyFontWeight.medium, child: Row(
color: Color(0xFF4C4C4C), children: [
Text(
"积分明细",
style: TextStyle(
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( SizedBox(
height: 4.h, height: 4.h,
), ),
Text( Row(
(userInfo != null) ? "${userInfo.points}" : "", children: [
style: TextStyle( Text(
fontSize: 16.sp, (userInfo != null) ? "${userInfo.points}" : "",
color: Color(0xFF32A060), style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 16.sp,
), color: Color(0xFF32A060),
), 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(), Spacer(),
Text( 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( style: TextStyle(
color: Color(0xFFE5600D), color: Color(0xFFE5600D),
fontSize: 16.sp, 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}";
}
}
} }

187
lib/home/welfare_page.dart

@ -34,6 +34,7 @@ class _WelfarePage extends State<WelfarePage> {
ApiService apiService; ApiService apiService;
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
List<Goods> goods = []; List<Goods> goods = [];
Goods goodsPrice;
List<Coupon> coupons = []; List<Coupon> coupons = [];
List<List<Coupon>> coupon=[]; List<List<Coupon>> coupon=[];
String categoryId; 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(); con = coupons.skip(i*3).take((i*3<coupons.length)?3:(coupons.length - (i*3))).toList();
coupon.add(con); coupon.add(con);
} }
if(coupon.length > 0 && coupon[coupon.length - 1].isEmpty)
coupon.removeAt(coupon.length-1);
refreshController.refreshCompleted(); refreshController.refreshCompleted();
refreshController.loadComplete(); refreshController.loadComplete();
setState(() {}); setState(() {});
@ -144,7 +147,7 @@ class _WelfarePage extends State<WelfarePage> {
), ),
), ),
width: double.infinity, width: double.infinity,
height: 385.h, height: 236.h,
), ),
Scaffold( Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
@ -174,20 +177,27 @@ class _WelfarePage extends State<WelfarePage> {
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
scrollController: ScrollController(), scrollController: ScrollController(),
child: Container( child: Container(
margin: EdgeInsets.only(top: 45.h,left: 14,right: 14), // margin: EdgeInsets.only(top:30.h,left: 14,right: 14),
child: SingleChildScrollView( child: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
weekCoupons(), weekCoupons(),
inviteFriends(), Container(
color: Colors.white,
padding: EdgeInsets.only(left: 14,right: 14),
child:Column(
children: [
inviteFriends(),
benefitExchange(), benefitExchange(),
],
),
)
// activityTask(), // activityTask(),
], ],
@ -202,26 +212,23 @@ class _WelfarePage extends State<WelfarePage> {
/// ///
Widget weekCoupons() { Widget weekCoupons() {
return Stack( return Container(
alignment: Alignment.topRight, width: double.infinity,
children: [ margin: EdgeInsets.only(top: 95),
Container( decoration: BoxDecoration(
width: double.infinity, borderRadius: BorderRadius.circular(6),
margin: EdgeInsets.only(top: 95), color: Colors.white,
decoration: BoxDecoration( boxShadow: [
borderRadius: BorderRadius.circular(6), BoxShadow(
color: Colors.white, color: Color(0x08213303).withAlpha(12),
boxShadow: [ offset: Offset(0, 2),
BoxShadow( blurRadius: 3,
color: Color(0x08213303).withAlpha(12), spreadRadius: 0,
offset: Offset(0, 2), ),
blurRadius: 3, ],
spreadRadius: 0, ),
), // margin: EdgeInsets.only(top: 139.h),
], child: Column(
),
// margin: EdgeInsets.only(top: 139.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -241,7 +248,7 @@ class _WelfarePage extends State<WelfarePage> {
), ),
), ),
Text( Text(
"每周上新 ", "每周上新 ",
style: TextStyle( style: TextStyle(
color: Color(0xFF4D4D4D), color: Color(0xFF4D4D4D),
fontSize: 12.sp, 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( Expanded(child: Container(
margin: EdgeInsets.only(top: 12,bottom: 12), margin: EdgeInsets.only(top: 12,bottom: 12),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded(child:
Text( Text(
cop != null ? cop.couponName ?? "" : "", cop != null ? cop.couponName ?? "" : "",
maxLines: 1, maxLines: 1,
@ -375,10 +343,10 @@ class _WelfarePage extends State<WelfarePage> {
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF353535), color: Color(0xFF0D0D0D),
), ),
)), ),
Expanded(child: SizedBox(height: 12,),
(cop.useStartTime == null && (cop.useStartTime == null &&
cop.useEndTime == null)? cop.useEndTime == null)?
Text( Text(
@ -399,29 +367,6 @@ class _WelfarePage extends State<WelfarePage> {
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
color: cop.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), 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( return Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -741,7 +721,7 @@ class _WelfarePage extends State<WelfarePage> {
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded(child: Expanded(child:
Text( Text(
@ -868,8 +848,8 @@ class _WelfarePage extends State<WelfarePage> {
), ),
Spacer(), Spacer(),
Text( 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( style: TextStyle(
color: Color(0xFFE5600D), color: Color(0xFFE5600D),
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
@ -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() { Widget activityTask() {
return Container( return Container(

2
lib/integral/integral_page.dart

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

4
lib/integral/intergra_view/in_for_points.dart

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

4
lib/l10n/intl_en.arb

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

4
lib/l10n/intl_zh_CN.arb

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

4
lib/l10n/intl_zh_Hans_CN.arb

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

2
lib/l10n/intl_zh_Hant_CN.arb

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

2
lib/l10n/intl_zh_TW.arb

@ -237,7 +237,7 @@
"qingxuanzeshouhuodizhi": "請選擇收貨地址", "qingxuanzeshouhuodizhi": "請選擇收貨地址",
"shouhuodizhi1": "收貨地址", "shouhuodizhi1": "收貨地址",
"wenzhangxiangqing": "文章詳情", "wenzhangxiangqing": "文章詳情",
"feishiwushangpin": "非實物商品!", "feishiwushangpin": "非實物商品兌換後領取到優惠券即可使用!",
"duihuanhoufahuo": "兌換物商品", "duihuanhoufahuo": "兌換物商品",
"xianshangfafang": "綫上發放", "xianshangfafang": "綫上發放",
"lingqushijian": "領取時間 {shijian}", "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 { xgFlutterPlugin.addEventHandler(xgPushClickAction: (event) async {
print("xgPushClickAction1: $event"); print("xgPushClickAction1: $event");
if (event["actionType"] == 2) return event; if (event["actionType"] == 2) return event;
@ -293,6 +293,11 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
routeName = "/router/community_details"; routeName = "/router/community_details";
params["businessId"] = pushMap["info"]; params["businessId"] = pushMap["info"];
break; break;
case 8:
routeName = "/router/mine_wallet";
params["id"] = pushMap["info"];
break;
} }
sharedPreferences.setString("pushData", ""); sharedPreferences.setString("pushData", "");
print("xgPushClickAction: routeName: $routeName"); print("xgPushClickAction: routeName: $routeName");

308
lib/mine/coupon_page.dart

@ -3,7 +3,6 @@ import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/coupon.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/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/coupon_details_dialog.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/new_coupon_widget.dart'; import 'package:huixiang/view_widget/new_coupon_widget.dart';
@ -94,7 +94,9 @@ class _CouponPage extends State<CouponPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppBar( appBar: MyAppBar(
title: S.of(context).youhuiquan, title: S
.of(context)
.youhuiquan,
titleColor: Colors.black, titleColor: Colors.black,
background: Color(0xFFFFFFFF), background: Color(0xFFFFFFFF),
leadingColor: Colors.black, leadingColor: Colors.black,
@ -110,68 +112,76 @@ class _CouponPage extends State<CouponPage> {
children: [ children: [
Expanded( Expanded(
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
state = 1; state = 1;
_onRefresh(); _onRefresh();
}); });
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: new BorderRadius.only( borderRadius: new BorderRadius.only(
topLeft: Radius.circular(6), topLeft: Radius.circular(6),
bottomLeft: Radius.circular(6), bottomLeft: Radius.circular(6),
), ),
border: Border.all( border: Border.all(
color: Color(0xFF32A060), color: Color(0xFF32A060),
width: 1, width: 1,
), ),
color: state == 1 ? Color(0xFF32A060) : Color(0xFFFFFFFF), color: state == 1 ? Color(0xFF32A060) : Color(
), 0xFFFFFFFF),
child: Text( ),
S.of(context).keyongquan, child: Text(
style: TextStyle( S
fontWeight: MyFontWeight.medium, .of(context)
fontSize: 15.sp, .keyongquan,
color: state == 1 ? Color(0xFFFFFFFF) : Color(0xFF32A060), style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 15.sp,
color: state == 1 ? Color(0xFFFFFFFF) : Color(
0xFF32A060),
),
),
), ),
), )),
),
)),
Expanded( Expanded(
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
state = 3; state = 3;
_onRefresh(); _onRefresh();
}); });
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: new BorderRadius.only( borderRadius: new BorderRadius.only(
topRight: Radius.circular(6), topRight: Radius.circular(6),
bottomRight: Radius.circular(6), bottomRight: Radius.circular(6),
), ),
border: Border.all( border: Border.all(
color: Color(0xFF32A060), color: Color(0xFF32A060),
width: 1, width: 1,
), ),
color: state == 3 ? Color(0xFF32A060) : Color(0xFFFFFFFF), color: state == 3 ? Color(0xFF32A060) : Color(
), 0xFFFFFFFF),
child: Text( ),
S.of(context).shixiaoquan, child: Text(
style: TextStyle( S
fontWeight: MyFontWeight.medium, .of(context)
fontSize: 15.sp, .shixiaoquan,
color: state == 3 ? Color(0xFFFFFFFF) : Color(0xFF32A060), style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 15.sp,
color: state == 3 ? Color(0xFFFFFFFF) : Color(
0xFF32A060),
),
),
), ),
), ))
),
))
], ],
), ),
), ),
@ -191,54 +201,55 @@ class _CouponPage extends State<CouponPage> {
onLoading: queryCard, onLoading: queryCard,
child: (coupons != null && coupons.length > 0) child: (coupons != null && coupons.length > 0)
? ListView.builder( ? ListView.builder(
itemBuilder: (context, position) { itemBuilder: (context, position) {
return GestureDetector( return GestureDetector(
child: NewCouponWidget( child: NewCouponWidget(
coupons[position], coupons[position],
(type) { (type) {
if (type == 1) { if (type == 1) {
receiveCoupon(coupons[position].id); receiveCoupon(coupons[position].id);
} else { } else {
if (coupons[position].bizType == 5 || if (coupons[position].bizType == 5 ||
coupons[position].bizType == 3) { coupons[position].bizType == 3) {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/write_off_page', '/router/write_off_page',
arguments: { arguments: {
"couponId": coupons[position].id, "couponId": coupons[position].id,
"coupon": jsonEncode(coupons[position]), "coupon": jsonEncode(coupons[position]),
}).then((value) { }).then((value) {
_onRefresh(); _onRefresh();
}); });
} else { } else {
showStoreSelector( showStoreSelector(
coupons[position].storeList); coupons[position].storeList);
}
} }
}, }
// (){
// setState(() {
// couponDialog();
// });
// },
() {
setState(() {
coupons[position].isEx =
!coupons[position].isEx;
});
},
type: 0,
),
);
}, },
itemCount: coupons != null ? coupons.length : 0, () {
) setState(() {
: NoDataView( coupons[position].isEx =
src: "assets/image/ka.webp", !coupons[position].isEx;
isShowBtn: false, });
text: "目前暂无优惠券,请到领劵中心领取哦~", },
fontSize: 16.sp, (){
margin: EdgeInsets.only(top: 120.h, left: 60, right: 60), setState(() {
showCouponDetails(position);
});
},
type: 0,
), ),
);
},
itemCount: coupons != null ? coupons.length : 0,
)
: NoDataView(
src: "assets/image/ka.webp",
isShowBtn: false,
text: "目前暂无优惠券,请到领劵中心领取哦~",
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h, left: 60, right: 60),
),
), ),
), ),
], ],
@ -248,7 +259,7 @@ class _CouponPage extends State<CouponPage> {
receiveCoupon(couponId) async { receiveCoupon(couponId) async {
BaseData baseData = BaseData baseData =
await apiService.receiveCoupon(couponId).catchError((onError) {}); await apiService.receiveCoupon(couponId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
_onRefresh(); _onRefresh();
showAlertDialog(); showAlertDialog();
@ -265,10 +276,6 @@ class _CouponPage extends State<CouponPage> {
}); });
} }
couponDialog(){
showCouponDialog();
}
showAlertDialog() { showAlertDialog() {
// //
showDialog( showDialog(
@ -279,75 +286,14 @@ class _CouponPage extends State<CouponPage> {
); );
} }
/// ///使
showCouponDialog() { showCouponDetails(index) {
showDialog( showModalBottomSheet(
context: context, context: context,
builder: (context) { backgroundColor: Colors.transparent,
return AlertDialog( builder: (context) {
content: Container( return CouponDetailsWidget(coupons[index]);
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();
});
},
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/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.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/my_footer.dart';
import 'package:huixiang/view_widget/new_coupon_widget.dart'; import 'package:huixiang/view_widget/new_coupon_widget.dart';
import 'package:huixiang/view_widget/no_data_view.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; coupons[position].isEx = !coupons[position].isEx;
}); });
}, },
(){
setState(() {
showCouponDetails(position);
});
},
type: 0, 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]);
});
}
} }

407
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/font_weight.dart';
import 'package:huixiang/utils/location.dart'; import 'package:huixiang/utils/location.dart';
import 'package:huixiang/utils/painter_bg.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/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
@ -47,15 +48,14 @@ class _MineShopDetails extends State<MineShopDetails> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
SharedPreferences.getInstance().then((value) {
vipDetail("", ""); apiService =
ApiService(Dio(), token: value.getString("token"), context: context);
// startLocation(); vipDetail("", "");
queryDetail("bill_cate_point_sub"); });
startLocation();
} }
VipCard vipCard; VipCard vipCard;
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
final RefreshController consumeRefreshController = RefreshController(); final RefreshController consumeRefreshController = RefreshController();
@ -63,8 +63,9 @@ class _MineShopDetails extends State<MineShopDetails> {
vipDetail(latitude, longitude) async { vipDetail(latitude, longitude) async {
SharedPreferences value = await SharedPreferences.getInstance(); SharedPreferences value = await SharedPreferences.getInstance();
if(apiService == null) if (apiService == null)
apiService = ApiService(Dio(), context: context, token: value.getString("token")); apiService =
ApiService(Dio(), context: context, token: value.getString("token"));
BaseData<VipCard> baseData = await apiService.vipDetail({ BaseData<VipCard> baseData = await apiService.vipDetail({
"id": widget.arguments["id"], "id": widget.arguments["id"],
"latitude": "$latitude", "latitude": "$latitude",
@ -80,42 +81,76 @@ class _MineShopDetails extends State<MineShopDetails> {
setState(() {}); setState(() {});
} }
queryDetail(category) async { startLocation() async {
SharedPreferences value = await SharedPreferences.getInstance(); // EasyLoading.show(status: S.current.zhengzaijiazai);
if(apiService == null) Location.getInstance()
apiService = ApiService(Dio(), context: context, token: value.getString("token")); .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();
apiService = ApiService(Dio(),
context: context, token: value.getString("token"), showLoading: true);
}
BaseData<PageInfo<UserBill>> baseData = await apiService.queryBillInfo({ BaseData<PageInfo<UserBill>> baseData = await apiService.queryBillInfo({
"current": current, "current": current,
"model": {"category": category, "title": "bill_title_point", "type": ""}, "model": {"category": "", "title": "bill_title_balance", "type": ""},
"order": "descending", "order": "descending",
"size": 10, "size": 10,
"sort": "id" "sort": "id"
}).catchError((onError) { }).catchError((onError) {
consumeRefreshController.loadFailed(); refreshController.refreshFailed();
refreshController.loadFailed();
consumeRefreshController.refreshFailed(); consumeRefreshController.refreshFailed();
consumeRefreshController.loadFailed();
}); });
if (current == 1) userBill.clear();
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
if (current == 1) {
userBill.clear();
}
userBill.addAll(baseData.data.records); userBill.addAll(baseData.data.records);
consumeRefreshController.loadComplete(); refreshController.refreshCompleted();
refreshController.loadComplete();
consumeRefreshController.refreshCompleted(); consumeRefreshController.refreshCompleted();
consumeRefreshController.loadComplete();
if (current * 10 > int.tryParse(baseData.data.total)) { if (current * 10 > int.tryParse(baseData.data.total)) {
refreshController.loadNoData();
consumeRefreshController.loadNoData(); consumeRefreshController.loadNoData();
} else { } else {
current += 1; current += 1;
} }
setState(() {});
} else { } else {
consumeRefreshController.loadFailed(); refreshController.refreshFailed();
refreshController.loadFailed();
consumeRefreshController.refreshFailed(); consumeRefreshController.refreshFailed();
consumeRefreshController.loadFailed();
} }
if (mounted) setState(() {});
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppBar( appBar: MyAppBar(
title: "余额详情", title: "会员卡详情",
titleColor: Colors.black, titleColor: Colors.black,
background: Colors.white, background: Colors.white,
brightness: Brightness.dark, brightness: Brightness.dark,
@ -126,13 +161,12 @@ class _MineShopDetails extends State<MineShopDetails> {
buildVipCard(), buildVipCard(),
Container( Container(
margin: EdgeInsets.only(left: 14.w), margin: EdgeInsets.only(left: 14.w),
child: child: Row(
Row(
children: [ children: [
GestureDetector( GestureDetector(
onTap: (){ onTap: () {
setState(() { setState(() {
selectType =0; selectType = 0;
}); });
}, },
child: Column( child: Column(
@ -140,40 +174,16 @@ class _MineShopDetails extends State<MineShopDetails> {
Text( Text(
"适用门店", "适用门店",
style: TextStyle( style: TextStyle(
color: Color(selectType == 0 ? 0xFF000000 : 0xFF868686), color:
Color(selectType == 0 ? 0xFF000000 : 0xFF868686),
fontSize: 15.sp, fontSize: 15.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
), ),
), ),
SizedBox(height:8.h,), SizedBox(
if(selectType == 0) height: 8.h,
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,), if (selectType == 0)
if(selectType == 1)
Container( Container(
width: 52.w, width: 52.w,
height: 2.h, height: 2.h,
@ -182,64 +192,99 @@ 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 ? selectType == 0
Expanded( ? Expanded(
child: SmartRefresher( child: SmartRefresher(
controller: refreshController, controller: refreshController,
enablePullDown: false, enablePullDown: false,
enablePullUp: false, enablePullUp: false,
footer: CustomFooter( footer: CustomFooter(
builder: (context, mode) { builder: (context, mode) {
return MyFooter(mode); return MyFooter(mode);
}, },
), ),
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: ListView.builder( child: ListView.builder(
itemBuilder: (context, position) { itemBuilder: (context, position) {
return GestureDetector( return GestureDetector(
onTap: () {}, onTap: () {},
child: shopItem(vipCard.storeList[position]), child: shopItem(vipCard.storeList[position]),
); );
}, },
padding: EdgeInsets.symmetric(vertical: 1), padding: EdgeInsets.symmetric(vertical: 1),
itemCount: (vipCard != null && vipCard.storeList != null) itemCount: (vipCard != null && vipCard.storeList != null)
? vipCard.storeList.length ? vipCard.storeList.length
: 0, : 0,
), ),
), ),
): )
Expanded( : Expanded(
child: SmartRefresher( child: SmartRefresher(
controller: consumeRefreshController, controller: consumeRefreshController,
enablePullDown: false, enablePullDown: true,
enablePullUp: false, enablePullUp: true,
footer: CustomFooter( physics: BouncingScrollPhysics(),
builder: (context, mode) { header: MyHeader(),
return MyFooter(mode); footer: CustomFooter(
}, builder: (context, mode) {
), return MyFooter(mode);
physics: BouncingScrollPhysics(),
child: Column(
children: [
Expanded(child: ListView.builder(
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
}, },
child: consumeItem(userBill[position]), ),
); onRefresh: (){
}, current = 1;
padding: EdgeInsets.symmetric(vertical: 1), billInfo();
itemCount: userBill != null ? userBill.length : 0, },
),), onLoading: () {
], billInfo();
) },
), child: ListView.builder(
), itemBuilder: (context, position) {
return GestureDetector(
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() { Widget buildVipCard() {
return Container( return Container(
width:double.infinity, width: double.infinity,
// height:140.h, // 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( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -272,7 +317,7 @@ class _MineShopDetails extends State<MineShopDetails> {
topLeft: Radius.circular(6), topLeft: Radius.circular(6),
topRight: Radius.circular(6), topRight: Radius.circular(6),
), ),
color: Color(colorByName(vipCard?.tenantName ?? "")), color: Color(colorByName(vipCard?.tenantName ?? "")),
), ),
padding: EdgeInsets.only(left: 12.w), padding: EdgeInsets.only(left: 12.w),
height: 62.h, height: 62.h,
@ -289,7 +334,9 @@ class _MineShopDetails extends State<MineShopDetails> {
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp",
), ),
SizedBox(width: 6,), SizedBox(
width: 6,
),
Text( Text(
vipCard != null ? vipCard.tenantName : "", vipCard != null ? vipCard.tenantName : "",
style: TextStyle( style: TextStyle(
@ -336,12 +383,14 @@ class _MineShopDetails extends State<MineShopDetails> {
), ),
], ],
), ),
SizedBox(height:4.h,), SizedBox(
height: 4.h,
),
Text( Text(
"${vipCard != null ? vipCard.balance : ""}", "${vipCard != null ? vipCard.balance : ""}",
style: TextStyle( style: TextStyle(
color: Color(0xFF262626), color: Color(0xFF262626),
fontSize:24.sp, fontSize: 24.sp,
fontWeight: MyFontWeight.bold, fontWeight: MyFontWeight.bold,
), ),
), ),
@ -383,7 +432,7 @@ class _MineShopDetails extends State<MineShopDetails> {
onTap: () { onTap: () {
// Navigator.of(context).pushNamed('/router/union_detail_page', // Navigator.of(context).pushNamed('/router/union_detail_page',
// arguments: {"id": store.id}); // arguments: {"id": store.id});
if(store.posType.code == "NORMALSTORE") { if (store.posType.code == "NORMALSTORE") {
Scan.toScan( Scan.toScan(
context, context,
store.id, store.id,
@ -455,7 +504,7 @@ class _MineShopDetails extends State<MineShopDetails> {
flex: 1, flex: 1,
child: Text( child: Text(
S.of(context).yingyeshijian((store.openStartTime == null && S.of(context).yingyeshijian((store.openStartTime == null &&
store.openEndTime == null) store.openEndTime == null)
? S.of(context).quantian ? S.of(context).quantian
: "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))} - ${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}"), : "${store.openStartTime.substring(0, store.openStartTime.lastIndexOf(":"))} - ${store.openEndTime.substring(0, store.openEndTime.lastIndexOf(":"))}"),
style: TextStyle( style: TextStyle(
@ -468,10 +517,10 @@ class _MineShopDetails extends State<MineShopDetails> {
Text( Text(
(store.distance ?? 0) > 1000 (store.distance ?? 0) > 1000
? S.of(context).gongli( ? S.of(context).gongli(
((store.distance ?? 0) / 1000 * 100).toInt() / 100.0) ((store.distance ?? 0) / 1000 * 100).toInt() / 100.0)
: S : S
.of(context) .of(context)
.mi(((store.distance ?? 0) * 100).toInt() / 100.0), .mi(((store.distance ?? 0) * 100).toInt() / 100.0),
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -485,43 +534,45 @@ class _MineShopDetails extends State<MineShopDetails> {
); );
} }
Widget consumeItem(UserBill userBill){ Widget consumeItem(UserBill userBill) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: new BorderRadius.circular(6), borderRadius: new BorderRadius.circular(6),
color: Colors.white, color: Colors.white,
), ),
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.h), margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.h),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Column( Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
userBill.name ?? "", userBill.name ?? "",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Colors.black, color: Colors.black,
),
), ),
), SizedBox(
SizedBox(height: 4,), height: 4,
Text(
userBill.updateTime ?? "",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
), ),
), Text(
], userBill.updateTime ?? "",
), style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
),
),
],
),
Text( Text(
"-${double.tryParse(userBill.number ?? "0").toInt().toString()}", "-${double.tryParse(userBill.number ?? "0").toInt().toString()}",
style: TextStyle( style: TextStyle(
fontSize: 18.sp, fontSize: 18.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -554,41 +605,41 @@ class _MineShopDetails extends State<MineShopDetails> {
return products return products
.map( .map(
(e) => Container( (e) => Container(
margin: EdgeInsets.symmetric(horizontal: 2.w), margin: EdgeInsets.symmetric(horizontal: 2.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
MImage( MImage(
e.skuImg, e.skuImg,
width: 75.w, width: 75.w,
height: 75.h, height: 75.h,
fit: BoxFit.contain, fit: BoxFit.contain,
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp", fadeSrc: "assets/image/default_1.webp",
),
SizedBox(
height: 4.h,
),
if (isRemake)
Container(
width: 75.w,
child: Text(
e.productName,
maxLines: 1,
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF353535),
),
), ),
), SizedBox(
], height: 4.h,
), ),
), if (isRemake)
) Container(
width: 75.w,
child: Text(
e.productName,
maxLines: 1,
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF353535),
),
),
),
],
),
),
)
.toList(); .toList();
} }
} }

1
lib/mine/mine_view/calendar_page.dart

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

99
lib/mine/mine_view/mine_item.dart

@ -15,6 +15,7 @@ class MineItem extends StatefulWidget {
} }
class _MineItem extends State<MineItem> { class _MineItem extends State<MineItem> {
var isShowMore = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -36,8 +37,8 @@ class _MineItem extends State<MineItem> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
padding: EdgeInsets.only(left: 16,top:16,bottom:4), padding: EdgeInsets.only(left: 16,top:16,bottom:4,right: 16),
child: Text( child:Text(
"其他", "其他",
style: TextStyle( style: TextStyle(
color: Color(0xFF353535), color: Color(0xFF353535),
@ -204,8 +205,27 @@ class _MineItem extends State<MineItem> {
], ],
), ),
SizedBox(height: 10.h,), SizedBox(height: 10.h,),
if(isShowMore)
Row( Row(
children: [ 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: Expanded(child:
InkWell( InkWell(
@ -240,26 +260,15 @@ class _MineItem extends State<MineItem> {
"assets/image/settled.webp", "assets/image/settled.webp",
), ),
),), ),),
/// // Expanded(child: InkWell(
Expanded(child: InkWell( // onTap: () {
onTap: () { // Navigator.of(context).pushNamed('/router/qr_share', arguments: {});
Navigator.of(context).pushNamed('/router/bargain_group_order', // },
arguments: {"type":1}); // child: mineItem(
}, // S.of(context).tuiguangma,
child: mineItem( // "assets/image/pin_tuan.webp",
"发票管理", // ),
"assets/image/bill_gl.webp", // ),),
),
),),
// Expanded(child: InkWell(
// onTap: () {
// Navigator.of(context).pushNamed('/router/qr_share', arguments: {});
// },
// child: mineItem(
// S.of(context).tuiguangma,
// "assets/image/pin_tuan.webp",
// ),
// ),),
// Expanded(child:InkWell( // Expanded(child:InkWell(
// onTap: () { // onTap: () {
// Navigator.of(context).pushNamed('/router/invitation_record', arguments: {}); // Navigator.of(context).pushNamed('/router/invitation_record', arguments: {});
@ -271,9 +280,22 @@ class _MineItem extends State<MineItem> {
// ),), // ),),
], ],
), ),
if(isShowMore)
SizedBox(height: 10.h,), SizedBox(height: 10.h,),
if(isShowMore)
Row( Row(
children: [ 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( Expanded(child: InkWell(
onTap: () { onTap: () {
@ -295,9 +317,40 @@ class _MineItem extends State<MineItem> {
), ),
),), ),),
Expanded(child:Container(),), 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( child: Container(
padding: EdgeInsets.only(top: 4, bottom: 4, right: 16,left: 7), padding: EdgeInsets.only(top: 4, bottom: 4, right: 16,left: 7),
margin: EdgeInsets.only(right: 14.w),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(100),bottomLeft:Radius.circular(100)), borderRadius: BorderRadius.circular(12),
gradient: LinearGradient( color: Colors.white
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFACDD60),
Color(0xFF32A060),
],
),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
@ -396,7 +390,7 @@ class _MineView extends State<MineView> {
Text( Text(
"天天领积分", "天天领积分",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Color(0xFF32A060),
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
), ),

101
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:huixiang/view_widget/item_input_widget.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.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:huixiang/view_widget/round_button.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -552,7 +553,7 @@ class _RechargePage extends State<RechargePage> {
onTap: (){ onTap: (){
setState(() { setState(() {
if(selectIndex == index) if(selectIndex == index)
rechargeShowBottomSheet(); showRecharge(index);
}); });
}, },
child: Row( child: Row(
@ -596,96 +597,14 @@ class _RechargePage extends State<RechargePage> {
} }
/// ///
rechargeShowBottomSheet() { showRecharge(index) {
showModalBottomSheet( showModalBottomSheet(
builder: (BuildContext context) { context: context,
return buildBottomSheetWidget(context); backgroundColor: Colors.transparent,
}, builder: (context) {
backgroundColor: Colors.transparent, return RechargeWidget(rechargeA[index]);
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();
});
},
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 { recharge() async {
// String money = controller.text; // String money = controller.text;

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/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/classic_header.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/item_title.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
@ -145,6 +146,9 @@ class _RollCenterPage extends State<RollCenterPage> {
coupons[position].isEx = !coupons[position].isEx; coupons[position].isEx = !coupons[position].isEx;
}); });
}, },
(){
showCouponDetails(position);
},
type: 1, 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) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppBar( appBar: MyAppBar(
title: S.of(context).yuemingxi, title: S.of(context).yue,
titleColor: Colors.black, titleColor: Colors.black,
background: Color(0xFFF7F7F7), background: Color(0xFFF7F7F7),
leadingColor: Colors.black, leadingColor: Colors.black,

1
lib/order/exchange_history_page.dart

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

504
lib/order/exchange_order_page.dart

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

6
lib/order/order_view/order_commodity.dart

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

4
lib/order/order_view/order_status.dart

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

4
lib/order/store_selector_page.dart

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

132
lib/qr/invite_friends.dart

@ -3,9 +3,9 @@ import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:huixiang/generated/l10n.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/base_data.dart';
import 'package:huixiang/retrofit/data/invitation_list.dart'; import 'package:huixiang/retrofit/data/invitation_list.dart';
import 'package:huixiang/retrofit/data/page.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:huixiang/view_widget/no_data_view.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.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 { class InviteFriends extends StatefulWidget {
@override @override
@ -34,12 +37,19 @@ class _InviteFriends extends State<InviteFriends> {
List<InvitationList> invitationList = []; List<InvitationList> invitationList = [];
UserInfo userInfo; UserInfo userInfo;
int pageNum = 1; int pageNum = 1;
String phone = "";
@override @override
void initState() { void initState() {
super.initState(); super.initState();
queryInviteMember(); SharedPreferences.getInstance().then((value) {
queryInviteMember(); 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, centerTitle: true,
elevation: 0.0, elevation: 0.0,
actions: [ // actions: [
GestureDetector( // GestureDetector(
child: Container( // child: Container(
margin: EdgeInsets.only(right: 14), // margin: EdgeInsets.only(right: 14),
padding:EdgeInsets.only(left:70,right: 20), // padding:EdgeInsets.only(left:70,right: 20),
child: Icon( // child: Icon(
Icons.more_horiz, // Icons.more_horiz,
color: Colors.black, // color: Colors.black,
), // ),
), // ),
onTap: () { // onTap: () {
// Navigator.of(context).pop(); // // Navigator.of(context).pop();
// share(); // // share();
}) // })
], // ],
), ),
body: SmartRefresher( body: SmartRefresher(
controller: refreshController, controller: refreshController,
@ -209,34 +219,39 @@ class _InviteFriends extends State<InviteFriends> {
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
SizedBox(height: 12.h,), SizedBox(height: 12.h,),
Container( GestureDetector(
width: double.infinity, onTap: (){
height: 52.h, widgetToUrl();
decoration: BoxDecoration( },
borderRadius: BorderRadius.circular(26), child: Container(
color: Color(0xFF00E16F), width: double.infinity,
), height: 52.h,
margin: EdgeInsets.symmetric(horizontal:14.w), decoration: BoxDecoration(
child: Row( borderRadius: BorderRadius.circular(26),
mainAxisAlignment: MainAxisAlignment.center, color: Color(0xFF00E16F),
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/image/wx.webp",
height: 20,
width:20,
fit: BoxFit.fill,
), ),
SizedBox(width:4.w,), margin: EdgeInsets.symmetric(horizontal:14.w),
Text( child: Row(
"邀请微信好友", mainAxisAlignment: MainAxisAlignment.center,
style: TextStyle( crossAxisAlignment: CrossAxisAlignment.center,
fontWeight: MyFontWeight.semi_bold, children: [
fontSize: 16.sp, Image.asset(
color: Color(0xFFFFFFFF), "assets/image/wx.webp",
height: 20,
width:20,
fit: BoxFit.fill,
), ),
) SizedBox(width:4.w,),
], Text(
"邀请微信好友",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 16.sp,
color: Color(0xFFFFFFFF),
),
)
],
),
), ),
) )
], ],
@ -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 'dart:ui' as ui;
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:sharesdk_plugin/sharesdk_plugin.dart'; import 'package:sharesdk_plugin/sharesdk_plugin.dart';
class QrShareImagePage extends StatefulWidget { class QrShareImagePage extends StatefulWidget {

6
lib/retrofit/data/coupon.dart

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

3
lib/retrofit/data/settleOrderInfo.dart

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

2
lib/retrofit/retrofit_api.dart

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

2
lib/setting/logout_page.dart

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

141
lib/setting/treaty_page.dart

@ -45,147 +45,6 @@ class _TreatyPage extends State<TreatyPage> {
initialUrl: "http://huixiang.lotus-wallet.com/Privacy.html", initialUrl: "http://huixiang.lotus-wallet.com/Privacy.html",
javascriptMode: JavascriptMode.unrestricted, 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> { class _CouponWidget extends State<CouponWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -52,53 +54,55 @@ class _CouponWidget extends State<CouponWidget> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( // Expanded(
child: Column( // child: Column(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.center,
children: [ // children: [
Expanded( // Expanded(
child: Row( // child: Row(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline, // crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic, // textBaseline: TextBaseline.alphabetic,
children: [ // children: [
Text( // Text(
"¥", // "¥",
style: TextStyle( // style: TextStyle(
fontSize: 22.sp, // fontSize: 22.sp,
fontWeight: MyFontWeight.medium, // fontWeight: MyFontWeight.medium,
color: Color(0xff32A060), // color: Color(0xff32A060),
), // ),
), // ),
SizedBox( // SizedBox(
height: 4.h, // height: 4.h,
), // ),
Text( // Text(
"${double.tryParse(widget.couponList.discountAmount).toInt()}", // "${double.tryParse(widget.couponList.discountAmount).toInt()}",
style: TextStyle( // style: TextStyle(
fontSize: 40.sp, // fontSize: 40.sp,
fontWeight: MyFontWeight.semi_bold, // fontWeight: MyFontWeight.semi_bold,
color: Color(0xff32A060), // color: Color(0xff32A060),
), // ),
), // ),
], // ],
), // ),
), // ),
Text( // Text(
S // S.of(context)
.of(context) // .manyuankeyong(widget.couponList.fullAmount),
.manyuankeyong(widget.couponList.fullAmount), // style: TextStyle(
style: TextStyle( // fontSize: 12.sp,
fontSize: 12.sp, // fontWeight: MyFontWeight.semi_bold,
fontWeight: MyFontWeight.semi_bold, // color: Color(0xff32A060),
color: Color(0xff32A060), // ),
), // ),
), // ],
], // ),
), // flex: 1,
flex: 1, // ),
), SizedBox(width:8,),
couponListWidget(context),
SizedBox(width:5,),
Expanded( Expanded(
flex: 2, flex: 2,
child: Column( 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, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Expanded(child: Text(
productList.productName, productList.productName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
), ),),
Text( Text(
"x${productList.buyNum}", "x${productList.buyNum}",
style: TextStyle( style: TextStyle(

4
lib/store/store_order.dart

@ -436,7 +436,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
child: child:
),*/ ),*/
), ),
if(count() != 0) // if(count() != 0)
Positioned( Positioned(
bottom: 0, bottom: 0,
left: 0, left: 0,
@ -645,6 +645,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
position < storeInfo.bannerList.length) position < storeInfo.bannerList.length)
? storeInfo.bannerList[position].imgUrl ? storeInfo.bannerList[position].imgUrl
: "", : "",
height: 230.h,
width:double.infinity,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.zero, radius: BorderRadius.zero,
errorSrc: "assets/image/default_2_1.webp", 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: [ children: [
MImage( MImage(
widget.miNiDetail.imgs[0], widget.miNiDetail.imgs[0],
width: 75, width: 76,
height: 75, height: 76,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(4), radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp", 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( // Image.asset(
"assets/image/green_leaf.webp", // "assets/image/green_leaf.webp",
fit: BoxFit.cover, // fit: BoxFit.cover,
width: 12, // width: 12,
height: 12, // height: 12,
), // ),
Text( // Text(
"X300", // "X300",
style: TextStyle( // style: TextStyle(
color: Color(0xFF55BC51), // color: Color(0xFF55BC51),
fontSize: 10.sp, // fontSize: 10.sp,
fontWeight: MyFontWeight.semi_bold, // fontWeight: MyFontWeight.semi_bold,
), // ),
), // ),
], ],
), ),
SizedBox( SizedBox(
@ -141,23 +141,23 @@ class _ShopGoods extends State<ShopGoods> {
SizedBox( SizedBox(
width: 2.w, width: 2.w,
), ),
Container( // Container(
width: 44.w, // width: 44.w,
height: 18.h, // height: 18.h,
decoration: BoxDecoration( // decoration: BoxDecoration(
color: Color(0xFFFF4500), // color: Color(0xFFFF4500),
borderRadius: BorderRadius.circular(2), // borderRadius: BorderRadius.circular(2),
), // ),
alignment: Alignment.center, // alignment: Alignment.center,
child: Text( // child: Text(
"APP专享", // "APP专享",
style: TextStyle( // style: TextStyle(
color: Color(0xFFFFFFFF), // color: Color(0xFFFFFFFF),
fontSize: 10.sp, // fontSize: 10.sp,
fontWeight: MyFontWeight.medium, // fontWeight: MyFontWeight.medium,
), // ),
), // ),
), // ),
], ],
), ),
Spacer(), 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> class _UnionPage extends State<UnionPage>
with AutomaticKeepAliveClientMixin, WidgetsBindingObserver { with AutomaticKeepAliveClientMixin, WidgetsBindingObserver,SingleTickerProviderStateMixin {
final RefreshController refreshController = final RefreshController refreshController =
RefreshController(initialRefresh: false); RefreshController(initialRefresh: false);
final RefreshController refreshController1 = final RefreshController refreshController1 =
@ -50,6 +50,8 @@ class _UnionPage extends State<UnionPage>
bool isKeyBoardShow = false; bool isKeyBoardShow = false;
BMFCoordinate latLng; BMFCoordinate latLng;
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
@ -83,6 +85,11 @@ class _UnionPage extends State<UnionPage>
@override @override
void initState() { void initState() {
super.initState(); super.initState();
if (tabController == null)
tabController = TabController(length: 4, vsync: this);
tabController?.addListener(() {
startLocation();
});
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance.addObserver(this);
eventBus.on<EventType>().listen((event) { eventBus.on<EventType>().listen((event) {
@ -179,7 +186,7 @@ class _UnionPage extends State<UnionPage>
value.getString("province"), value.getString("province"),
value.getString("city"), value.getString("city"),
value.getString("district"), value.getString("district"),
editingController.text, editingController.text
), ),
setState(() { setState(() {
if (_mapController != null) { if (_mapController != null) {
@ -202,12 +209,13 @@ class _UnionPage extends State<UnionPage>
queryStore(latitude, longitude, province, city, district, searchKey) async { queryStore(latitude, longitude, province, city, district, searchKey) async {
BaseData<List<Store>> baseData = await apiService.queryStore({ BaseData<List<Store>> baseData = await apiService.queryStore({
// "city": city, "city": city,
// "district": district, "district": district,
// "province": province, "province": province,
"latitude": latitude, "latitude": latitude,
"longitude": longitude, "longitude": longitude,
"searchKey": searchKey "searchKey": searchKey,
"serviceType":tabController.index == 0 ?"":(tabController.index==1?"EATSTORE":(tabController.index == 2?"DRINKSTORE":"HAPPYSTORE")),
}).catchError((error) { }).catchError((error) {
refreshController.refreshFailed(); refreshController.refreshFailed();
}); });
@ -220,13 +228,12 @@ class _UnionPage extends State<UnionPage>
EasyLoading.dismiss(); EasyLoading.dismiss();
setState(() {}); setState(() {});
} }
TabController tabController;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return DefaultTabController( return Scaffold(
length: 4,
child: Scaffold(
appBar: MyAppBar( appBar: MyAppBar(
title: "", title: "",
leading: false, leading: false,
@ -234,6 +241,7 @@ class _UnionPage extends State<UnionPage>
titleChild: PreferredSize( titleChild: PreferredSize(
preferredSize: Size(double.infinity, 38.h), preferredSize: Size(double.infinity, 38.h),
child: TabBar( child: TabBar(
controller: tabController,
isScrollable: true, isScrollable: true,
// //
indicatorColor: Color(0xff39B54A), indicatorColor: Color(0xff39B54A),
@ -260,6 +268,7 @@ class _UnionPage extends State<UnionPage>
), ),
)), )),
body: TabBarView( body: TabBarView(
controller: tabController,
children: [ children: [
buildItem(refreshController), buildItem(refreshController),
buildItem(refreshController1), buildItem(refreshController1),
@ -267,7 +276,6 @@ class _UnionPage extends State<UnionPage>
buildItem(refreshController3), buildItem(refreshController3),
], ],
), ),
),
); );
// GestureDetector( // GestureDetector(
// onTap: () { // onTap: () {
@ -351,7 +359,7 @@ class _UnionPage extends State<UnionPage>
// ); // );
} }
Widget buildItem(RefreshController refreshController) { Widget buildItem(RefreshController refreshController,) {
return Column( return Column(
children: [ children: [
buildSearchItem(), buildSearchItem(),
@ -411,6 +419,8 @@ class _UnionPage extends State<UnionPage>
); );
} }
BMFMapController _mapController; BMFMapController _mapController;
final TextEditingController editingController = TextEditingController(); 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, height: 14,
), ),
Container( Container(
height: 8.h, height: 4.h,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(6.5), borderRadius: BorderRadius.circular(6.5),
child: LinearProgressIndicator( child: LinearProgressIndicator(

32
lib/view_widget/my_appbar.dart

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

55
lib/view_widget/new_coupon_widget.dart

@ -10,16 +10,16 @@ class NewCouponWidget extends StatelessWidget {
// final Function couponDialog; // final Function couponDialog;
final GestureTapCallback callbackEx; final GestureTapCallback callbackEx;
final Coupon coupon; final Coupon coupon;
final Function showCouponDetails;
final int type; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return buildCoupon(context); return buildCoupon(context);
} }
String getCouponStoreName(){ String getCouponStoreName(){
String couponStoreName = coupon.tenantName; String couponStoreName = coupon.tenantName;
if(coupon?.storeList != null && coupon.storeId != "0"){ if(coupon?.storeList != null && coupon.storeId != "0"){
@ -30,6 +30,7 @@ class NewCouponWidget extends StatelessWidget {
} }
return couponStoreName; return couponStoreName;
} }
///ui ///ui
Widget buildCoupon(BuildContext context) { Widget buildCoupon(BuildContext context) {
// if(coupon != null) { // if(coupon != null) {
@ -41,7 +42,7 @@ class NewCouponWidget extends StatelessWidget {
// } // }
return Container( return Container(
height: (coupon != null && coupon.isEx) ? 168.h : 151.h, height: (coupon != null && coupon.isEx) ? 155.h : 135.h,
width: double.infinity, width: double.infinity,
margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h), margin: EdgeInsets.fromLTRB(14.w, 6.h, 14.w, 6.h),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -74,7 +75,7 @@ class NewCouponWidget extends StatelessWidget {
Expanded( Expanded(
flex: 2, flex: 2,
child:Container( child:Container(
margin: EdgeInsets.only(top: 12,left: 12,bottom: 12), margin: EdgeInsets.only(top: 14,left: 14,bottom: 14),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -89,7 +90,7 @@ class NewCouponWidget extends StatelessWidget {
color: Color(0xFF0D0D0D), color: Color(0xFF0D0D0D),
), ),
), ),
SizedBox(height: 6,), SizedBox(height:10,),
Expanded(child: Expanded(child:
(coupon.useStartTime == null && (coupon.useStartTime == null &&
coupon.useEndTime == null)? coupon.useEndTime == null)?
@ -130,6 +131,7 @@ class NewCouponWidget extends StatelessWidget {
color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), color: coupon.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D),
), ),
), ),
SizedBox(height: 5,),
Text( Text(
"${coupon?.useEndTime ?? ""}", "${coupon?.useEndTime ?? ""}",
maxLines:1, maxLines:1,
@ -147,8 +149,7 @@ class NewCouponWidget extends StatelessWidget {
),), ),),
GestureDetector( GestureDetector(
onTap: (){ onTap: (){
// showDeleteDialog(); showCouponDetails();
}, },
child: Row( child: Row(
children: [ children: [
@ -174,7 +175,7 @@ class NewCouponWidget extends StatelessWidget {
Expanded( Expanded(
flex: 1, flex: 1,
child:Container( child:Container(
margin: EdgeInsets.only(top: 12,left: 12,bottom: 12), margin: EdgeInsets.only(top: 14,left: 12,bottom: 14,),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.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( return Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, 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) + 52.0.h) +
54.0.h + 54.0.h +
158.0.h, 158.0.h,
padding: EdgeInsets.only( // padding: EdgeInsets.only(
top: 16.h, // top: 16.h,
bottom: 16.h, // bottom: 16.h,
), // ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -54,6 +54,7 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
Expanded( Expanded(
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: EdgeInsets.symmetric(vertical: 12),
child: Text( child: Text(
S.of(context).qingxuanzeshiyongmendian, S.of(context).qingxuanzeshiyongmendian,
style: TextStyle( style: TextStyle(
@ -78,9 +79,6 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
SizedBox(width: 14), SizedBox(width: 14),
], ],
), ),
SizedBox(
height: 12.h,
),
Container( Container(
width: double.infinity, width: double.infinity,
height: 1.h, height: 1.h,
@ -233,7 +231,7 @@ class _SelectorStoreWidget extends State<SelectorStoreWidget> {
color: position == selectIndex ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7), color: position == selectIndex ? Color(0xFFF0FAF4) :Color(0xFFF7F7F7),
), ),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: EdgeInsets.only(left: 12, bottom: 16, top: 16), padding: EdgeInsets.only(left: 12,),
child: Text( child: Text(
store.storeName, store.storeName,
style: TextStyle( style: TextStyle(

Loading…
Cancel
Save