Browse Source

Merge remote-tracking branch 'origin/new_revision_app' into new_revision_app

# Conflicts:
#	lib/settlement/settlement.dart
#	lib/settlement/settlement_view/activity_coupon_remarks.dart
#	lib/vip/vip_view/vip_goods_discount.dart
dart3_last
fmk 2 years ago
parent
commit
5cdbe3fefc
  1. BIN
      assets/image/2x/discount.webp
  2. BIN
      assets/image/2x/home_chi.webp
  3. BIN
      assets/image/2x/home_he.webp
  4. BIN
      assets/image/2x/home_lm.webp
  5. BIN
      assets/image/2x/home_recharge.webp
  6. BIN
      assets/image/2x/home_wan.webp
  7. BIN
      assets/image/2x/home_welfare.webp
  8. BIN
      assets/image/2x/vip_card.webp
  9. BIN
      assets/image/2x/vip_shop_bj.webp
  10. BIN
      assets/image/2x/vip_shop_hg.webp
  11. BIN
      assets/image/2x/vip_shop_hx.webp
  12. BIN
      assets/image/2x/vip_shop_qj.webp
  13. BIN
      assets/image/2x/vip_title.webp
  14. BIN
      assets/image/2x/welfare1.webp
  15. BIN
      assets/image/2x/welfare2.webp
  16. BIN
      assets/image/2x/welfare3.webp
  17. BIN
      assets/image/2x/welfare_spread.webp
  18. BIN
      assets/image/3x/discount.webp
  19. BIN
      assets/image/3x/home_chi.webp
  20. BIN
      assets/image/3x/home_he.webp
  21. BIN
      assets/image/3x/home_lm.webp
  22. BIN
      assets/image/3x/home_recharge.webp
  23. BIN
      assets/image/3x/home_wan.webp
  24. BIN
      assets/image/3x/home_welfare.webp
  25. BIN
      assets/image/3x/vip_card.webp
  26. BIN
      assets/image/3x/vip_shop_bj.webp
  27. BIN
      assets/image/3x/vip_shop_hg.webp
  28. BIN
      assets/image/3x/vip_shop_hx.webp
  29. BIN
      assets/image/3x/vip_shop_qj.webp
  30. BIN
      assets/image/3x/vip_title.webp
  31. BIN
      assets/image/3x/welfare1.webp
  32. BIN
      assets/image/3x/welfare2.webp
  33. BIN
      assets/image/3x/welfare3.webp
  34. BIN
      assets/image/3x/welfare_spread.webp
  35. BIN
      assets/image/discount.webp
  36. BIN
      assets/image/home_chi.webp
  37. BIN
      assets/image/home_he.webp
  38. BIN
      assets/image/home_lm.webp
  39. BIN
      assets/image/home_recharge.webp
  40. BIN
      assets/image/home_wan.webp
  41. BIN
      assets/image/home_welfare.webp
  42. BIN
      assets/image/vip_card.webp
  43. BIN
      assets/image/vip_shop_bj.webp
  44. BIN
      assets/image/vip_shop_hg.webp
  45. BIN
      assets/image/vip_shop_hx.webp
  46. BIN
      assets/image/vip_shop_qj.webp
  47. BIN
      assets/image/vip_title.webp
  48. BIN
      assets/image/welfare1.webp
  49. BIN
      assets/image/welfare2.webp
  50. BIN
      assets/image/welfare3.webp
  51. BIN
      assets/image/welfare_spread.webp
  52. 16
      lib/home/home_page.dart
  53. 68
      lib/home/home_view/discount_zone.dart
  54. 61
      lib/home/home_view/shortcut_operation.dart
  55. 2
      lib/home/home_view/top_selling_list.dart
  56. 32
      lib/home/home_view/union_entry.dart
  57. 46
      lib/home/home_view/welfare_core.dart
  58. 9
      lib/home/points_mall_view/points_goods_view.dart
  59. 2
      lib/home/welfare_exchange.dart
  60. 3
      lib/login/new_login_page.dart
  61. 5
      lib/main_page.dart
  62. 4
      lib/mine/mine_page.dart
  63. 11
      lib/order/order_detail_page.dart
  64. 4
      lib/order/order_view/order_info.dart
  65. 2
      lib/retrofit/min_api.g.dart
  66. 3
      lib/retrofit/retrofit_api.dart
  67. 13
      lib/settlement/settlement.dart
  68. 9
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  69. 17
      lib/settlement/settlement_view/pay_method.dart
  70. 34
      lib/settlement/settlement_view/settlement_order_commodity.dart
  71. 20
      lib/store/store_order.dart
  72. 10
      lib/store/store_view/store_order_list.dart
  73. 3
      lib/union/union_page.dart
  74. 3
      lib/vip/vip_page.dart
  75. 236
      lib/vip/vip_view/exclusive_coupon.dart
  76. 88
      lib/vip/vip_view/vip_goods_discount.dart
  77. 41
      lib/vip/vip_view/vip_top.dart

BIN
assets/image/2x/discount.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
assets/image/2x/home_chi.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
assets/image/2x/home_he.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/image/2x/home_lm.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
assets/image/2x/home_recharge.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 B

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/2x/home_wan.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
assets/image/2x/home_welfare.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/2x/vip_card.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 98 KiB

BIN
assets/image/2x/vip_shop_bj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
assets/image/2x/vip_shop_hg.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
assets/image/2x/vip_shop_hx.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/image/2x/vip_shop_qj.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
assets/image/2x/vip_title.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/image/2x/welfare1.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
assets/image/2x/welfare2.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/2x/welfare3.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/2x/welfare_spread.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
assets/image/3x/discount.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/image/3x/home_chi.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/image/3x/home_he.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
assets/image/3x/home_lm.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
assets/image/3x/home_recharge.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 778 B

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/3x/home_wan.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
assets/image/3x/home_welfare.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
assets/image/3x/vip_card.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 204 KiB

BIN
assets/image/3x/vip_shop_bj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/image/3x/vip_shop_hg.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
assets/image/3x/vip_shop_hx.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/image/3x/vip_shop_qj.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 18 KiB

BIN
assets/image/3x/vip_title.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
assets/image/3x/welfare1.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
assets/image/3x/welfare2.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
assets/image/3x/welfare3.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
assets/image/3x/welfare_spread.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
assets/image/discount.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/image/home_chi.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/image/home_he.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 928 B

BIN
assets/image/home_lm.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/home_recharge.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 814 B

BIN
assets/image/home_wan.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
assets/image/home_welfare.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 842 B

BIN
assets/image/vip_card.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 31 KiB

BIN
assets/image/vip_shop_bj.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/image/vip_shop_hg.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
assets/image/vip_shop_hx.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
assets/image/vip_shop_qj.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
assets/image/vip_title.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

BIN
assets/image/welfare1.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/welfare2.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/welfare3.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/welfare_spread.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

16
lib/home/home_page.dart

@ -42,6 +42,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../utils/flutter_utils.dart';
import 'home_view/shortcut_operation.dart';
class HomePage extends StatefulWidget {
@ -158,6 +159,8 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
final BaseData brand =
await apiService.queryHomeBrand().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
refreshController.refreshFailed();
});
if (brand != null && brand.isSuccess) {
@ -377,10 +380,10 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
}
}
_onRefresh(){
queryHome();
_onRefresh() async{
await queryHome();
// queryMsgStats();
queryCoupon();
await queryCoupon();
}
@override
@ -485,10 +488,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
},
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: FutureBuilder(
future:queryHome(),
builder: (context, snapshot) {
return Column(
child: Column(
children: [
///banner
HomeBanner(bannerData, controller),
@ -560,8 +560,6 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
},
),
],
);
},
),
),
),

68
lib/home/home_view/discount_zone.dart

@ -30,13 +30,14 @@ class _DiscountZone extends State<DiscountZone> {
Widget build(BuildContext context) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 14.h,),
margin: EdgeInsets.only(top:28.h,),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(padding:EdgeInsets.symmetric(horizontal: 14.w),
child: Text(
Padding(padding: EdgeInsets.symmetric(horizontal: 14.w),child: Row(
children: [
Expanded(child: Text(
S.of(context).tehuizhuanqu,
style: TextStyle(
color: Color(0xFF0D0D0D),
@ -44,6 +45,21 @@ class _DiscountZone extends State<DiscountZone> {
fontWeight: FontWeight.bold,
),
)),
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page');
},
child: Text(
"更多好券",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
),
),
),
],
),),
if(widget.coupon.length != 0)
Container(
height: 120.h,
@ -99,29 +115,7 @@ class _DiscountZone extends State<DiscountZone> {
fontSize: 14.sp,
height: 1.5.h,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFFFA607),
),
),
SizedBox(height:5.w),
(coupon.useStartTime == null &&
coupon.useEndTime == null)?
Text(
S.of(context).quantian,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFA607),
),
):Text(
"发放时间: ${coupon.useEndTime.substring(0, coupon.publishStartTime.indexOf(" "))}",
maxLines:1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFA607),
color: Color(0xFF32A060),
),
),
],
@ -163,7 +157,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
SizedBox(
@ -177,7 +171,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 30.sp,
fontWeight: FontWeight.w900,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
],
@ -190,7 +184,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
],
@ -207,7 +201,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
),
@ -216,7 +210,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
],
@ -233,7 +227,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
),
@ -242,7 +236,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
],
@ -262,7 +256,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
SizedBox(
@ -275,7 +269,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 28.sp,
fontWeight: FontWeight.w900,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
],
@ -300,7 +294,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 30.sp,
fontWeight: FontWeight.w900,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
SizedBox(
@ -311,7 +305,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF),
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
),
),
],

61
lib/home/home_view/shortcut_operation.dart

@ -28,9 +28,9 @@ class _ShortcutOperation extends State<ShortcutOperation> {
@override
Widget build(BuildContext context) {
return Container(
height: 75.h,
height: 70.h,
width: double.infinity,
margin: EdgeInsets.only(bottom: 15.h, left: 9.w, right: 9.w),
margin: EdgeInsets.only(bottom:28.h, left: 9.w, right: 9.w),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
@ -45,13 +45,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
margin: EdgeInsets.symmetric(horizontal: 5),
padding: EdgeInsets.all(10.h),
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFD1E8D9),
Color(0xFFE4F7EA),
]),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
@ -75,7 +69,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFF32A060),
color: Colors.black,
),
),
SizedBox(height: 5.h),
@ -84,17 +78,18 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xFF61836F),
color: Color(0xff4D4D4D),
),
),
],
),
SizedBox(width: 3.w),
SizedBox(width:16.w),
Expanded(
child: Image.asset(
"assets/image/home_lm.webp",
width: 36.w,
height: 36.h,
width: 24.w,
height: 31.h,
fit: BoxFit.fill,
),
),
],
@ -111,13 +106,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
margin: EdgeInsets.symmetric(horizontal: 5.w),
padding: EdgeInsets.all(10.h),
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFAEDCB),
Color(0xFFFAF4E2),
]),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
@ -141,7 +130,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFFFFBA1B),
color: Colors.black,
),
),
SizedBox(height: 5.h),
@ -150,17 +139,18 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xFFA59162),
color: Color(0xff4D4D4D),
),
),
],
),
SizedBox(width: 3.w),
SizedBox(width:16.w),
Expanded(
child: Image.asset(
"assets/image/home_recharge.webp",
width: 36.w,
height: 36.h,
width: 21.w,
height: 33.h,
fit: BoxFit.fill,
),
),
],
@ -179,13 +169,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
margin: EdgeInsets.symmetric(horizontal: 5.w),
padding: EdgeInsets.all(10.h),
decoration: BoxDecoration(
gradient: new LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFAE5CB),
Color(0xFFFAF1E4),
]),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
@ -209,7 +193,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp,
color: Color(0xFFFF910F),
color: Colors.black,
),
),
SizedBox(height: 5.h),
@ -218,17 +202,18 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle(
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
color: Color(0xFF89755D),
color: Color(0xff4D4D4D),
),
),
],
),
SizedBox(width: 3.w),
SizedBox(width: 16.w),
Expanded(
child: Image.asset(
"assets/image/home_welfare.webp",
width: 36.w,
height: 36.h,
width: 22.w,
height: 35.h,
fit: BoxFit.fill,
),
),
],

2
lib/home/home_view/top_selling_list.dart

@ -44,7 +44,7 @@ class _TopSellingList extends State<TopSellingList> {
fit: BoxFit.cover,
),
),
margin: EdgeInsets.only(left: 14.w,right: 14.w,bottom: 14.h),
margin: EdgeInsets.only(left: 14.w,right: 14.w,bottom: 24.h),
padding: EdgeInsets.only(left: 12.w,top: 16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

32
lib/home/home_view/union_entry.dart

@ -32,7 +32,7 @@ class _UnionEntry extends State<UnionEntry> {
return Container(
height: 130.h,
width: double.infinity,
margin: EdgeInsets.all(14.h),
margin: EdgeInsets.symmetric(horizontal:14.w,vertical: 15.h),
decoration: BoxDecoration(
color: Color(0xFFFFFFFF),
boxShadow: [
@ -59,15 +59,15 @@ class _UnionEntry extends State<UnionEntry> {
children: [
Image.asset(
"assets/image/home_chi.webp",
fit: BoxFit.cover,
width: 60.w,
height: 60.h,
fit: BoxFit.fill,
width: 53.w,
height: 52.h,
),
SizedBox(height:4.h),
SizedBox(height:8.h),
Text(
S.of(context).chijiankang,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),
@ -85,15 +85,15 @@ class _UnionEntry extends State<UnionEntry> {
children: [
Image.asset(
"assets/image/home_he.webp",
fit: BoxFit.cover,
width: 60.w,
height: 60.h,
fit: BoxFit.fill,
width: 36.w,
height: 56.h,
),
SizedBox(height:4.h),
SizedBox(height:8.h),
Text(
S.of(context).hejiankang,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),
@ -111,15 +111,15 @@ class _UnionEntry extends State<UnionEntry> {
children: [
Image.asset(
"assets/image/home_wan.webp",
fit: BoxFit.cover,
width: 60.w,
height: 60.h,
fit: BoxFit.fill,
width: 58.w,
height: 52.h,
),
SizedBox(height:4.h),
SizedBox(height:8.h),
Text(
S.of(context).wanjiankang,
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xFF0D0D0D),
),

46
lib/home/home_view/welfare_core.dart

@ -29,10 +29,11 @@ class _WelfareCore extends State<WelfareCore> {
@override
Widget build(BuildContext context) {
return Column(
return Container(
margin: EdgeInsets.only(left:10.w,right: 10.w,top: 14.h,bottom: 14.h),
child:Column(
children: [
Padding(padding:EdgeInsets.symmetric(horizontal: 14.w),
child: Row(
Row(
children: [
Expanded(child:
Text(
@ -57,11 +58,9 @@ class _WelfareCore extends State<WelfareCore> {
),
)
],
),),
Container(
width: double.infinity,
margin: EdgeInsets.only(left:10.w,right: 10.w,top: 14.h,bottom: 14.h),
child: Row(
),
SizedBox(height: 16.w,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -71,8 +70,7 @@ class _WelfareCore extends State<WelfareCore> {
},
child:Container(
width: double.infinity,
height:60.h,
padding: EdgeInsets.only(left: 12.w),
height:75.h,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
@ -81,7 +79,7 @@ class _WelfareCore extends State<WelfareCore> {
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"本周劵包",
@ -91,11 +89,11 @@ class _WelfareCore extends State<WelfareCore> {
color: Color(0xFFFFFFFF),
),
),
SizedBox(height: 2.h),
SizedBox(height:5.h),
Text(
"每周三更新劵包",
style: TextStyle(
fontSize: 10.sp,
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
@ -104,14 +102,14 @@ class _WelfareCore extends State<WelfareCore> {
),
),
)),
SizedBox(width: 10.w,),
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page');
},
child:Container(
width: double.infinity,
height:60.h,
padding: EdgeInsets.only(left: 12.w),
height:75.h,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
@ -120,7 +118,7 @@ class _WelfareCore extends State<WelfareCore> {
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
S.of(context).yaoqinghaoyou,
@ -130,11 +128,11 @@ class _WelfareCore extends State<WelfareCore> {
color: Color(0xFFFFFFFF),
),
),
SizedBox(height: 2.h),
SizedBox(height:5.h),
Text(
"邀请好友得分",
style: TextStyle(
fontSize: 10.sp,
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
@ -143,14 +141,14 @@ class _WelfareCore extends State<WelfareCore> {
),
),
),),
SizedBox(width: 10.w,),
Expanded(child: GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/welfare_page');
},
child:Container(
width: double.infinity,
height:60.h,
padding: EdgeInsets.only(left: 12.w),
height:75.h,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
@ -159,7 +157,7 @@ class _WelfareCore extends State<WelfareCore> {
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"积分换券",
@ -169,11 +167,11 @@ class _WelfareCore extends State<WelfareCore> {
color: Color(0xFFFFFFFF),
),
),
SizedBox(height: 2.h),
SizedBox(height:5.h),
Text(
"多种优惠券等你拿",
style: TextStyle(
fontSize: 10.sp,
fontSize: 11.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFFFFFF),
),
@ -184,8 +182,8 @@ class _WelfareCore extends State<WelfareCore> {
)),
],
),
),
],
),
);
}
}

9
lib/home/points_mall_view/points_goods_view.dart

@ -40,7 +40,13 @@ class _PointGoods extends State<PointGoods> {
@override
Widget build(BuildContext context) {
return (widget.goods == null || widget.goods.length == 0)
return Container(
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(4),
// color: Colors.white,
// ),
// margin: EdgeInsets.only(top: 16.h,right: 14.w,left: 14.w),
child:(widget.goods == null || widget.goods.length == 0)
? NoDataView(
src: "assets/image/xiao_fei.webp",
isShowBtn: false,
@ -77,6 +83,7 @@ class _PointGoods extends State<PointGoods> {
child: buildItem(widget.goods[index]),
);
},
),
);
}

2
lib/home/welfare_exchange.dart

@ -264,7 +264,7 @@ class _WelfareExchange extends State<WelfareExchange> with SingleTickerProvider
body: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: true,
enablePullUp: false,
physics: ClampingScrollPhysics(),
header: MyHeader(),
footer: CustomFooter(

3
lib/login/new_login_page.dart

@ -137,7 +137,8 @@ class _NewLoginPage extends State<NewLoginPage> {
}
})
.catchError((error) {
SmartDialog.showToast("$error", alignment: Alignment.center);
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
});
}
}

5
lib/main_page.dart

@ -84,6 +84,9 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
pageController = PageController(initialPage: widget.arguments != null && widget.arguments["index"] != null ? widget.arguments["index"]:0);
if(widget.arguments != null && widget.arguments["index"] != null)
clickIndex = widget.arguments["index"];
WidgetsBinding.instance.addObserver(this);
EasyLoading.instance
..indicatorType = EasyLoadingIndicatorType.circle
@ -390,7 +393,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
}
}
final PageController pageController = PageController(initialPage: 0);
PageController pageController;
@override
Widget build(BuildContext context) {

4
lib/mine/mine_page.dart

@ -4,6 +4,7 @@ import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_calendar.dart';
@ -25,6 +26,7 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:dio/dio.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../utils/flutter_utils.dart';
import 'mine_view/mine_item.dart';
import 'mine_view/mine_view.dart';
@ -99,6 +101,8 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
BaseData<List<Rank>> rankData =
await apiService.rankList().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
_refreshController.refreshFailed();
});
if (rankData != null && rankData.isSuccess) {

11
lib/order/order_detail_page.dart

@ -1,5 +1,6 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/order/order_view/order_address.dart';
@ -43,6 +44,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
Dio(),
context: context,
token: value.getString("token"),
showLoading: true
);
queryDetails();
});
@ -91,7 +93,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
Dio(),
context: context,
token: value.getString("token"),
showLoading: true
showLoading: false
);
}
BaseData<OrderInfo> baseData = await apiService
@ -221,9 +223,12 @@ class _OrderDetailPage extends State<OrderDetailPage> {
}
}
payResult(BaseData baseData) {
queryDetails();
payResult(BaseData baseData) async{
await queryDetails();
Future.delayed(Duration(milliseconds: 350), () {
EasyLoading.dismiss();
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
});
}
statusTitle() {

4
lib/order/order_view/order_info.dart

@ -53,8 +53,8 @@ class _OrderInfoView extends State<OrderInfoView> {
widget.orderInfo != null
? widget.orderInfo.notes ?? S.of(context).qingshurubeizhuyaoqiu
: S.of(context).qingshurubeizhuyaoqiu),
orderInfoItem(S.of(context).zhifufangshi,
widget.orderInfo != null ? payChannel() : S.of(context).yue),
// orderInfoItem(S.of(context).zhifufangshi,
// widget.orderInfo != null ? payChannel() : S.of(context).yue),
],
),
);

2
lib/retrofit/min_api.g.dart

@ -123,7 +123,7 @@ class _MinApiService implements MinApiService {
data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
(json) => ((json??"") == "")?null:(json as List<dynamic>)
.map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());

3
lib/retrofit/retrofit_api.dart

@ -18,6 +18,7 @@ import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart';
import '../utils/flutter_utils.dart';
import 'data/achievement_detail_list.dart';
import 'data/activity_pos.dart';
import 'data/address.dart';
@ -131,6 +132,8 @@ abstract class ApiService {
if (EasyLoading.isShow) {
EasyLoading.dismiss();
}
// SmartDialog.showToast(AppUtils.dioErrorTypeToString(e.type),
// alignment: Alignment.center);
debugPrint("\n======================= 错误响应数据 =======================");
debugPrint("type = ${e.type}");
debugPrint("message = ${e.message}");

13
lib/settlement/settlement.dart

@ -81,6 +81,7 @@ class _Settlement extends State<Settlement> {
String productId;
bool orderButton = false;
bool useVipPriceSelect = false;
bool showVipTips = false;
@override
void initState() {
@ -116,6 +117,7 @@ class _Settlement extends State<Settlement> {
token: minToken,
tenant: tenant,
storeId: storeId,
showLoading: true
);
if (promotions != null && promotions != "" && tableId <= 0) {
queryOrderInfo(
@ -751,7 +753,8 @@ class _Settlement extends State<Settlement> {
minOrderInfo,
tableId,
pageType,
(coupons != "" || promotions!="") ? false :useVipPriceSelect
(coupons != "" || promotions!="") ? false :useVipPriceSelect,
this.showVipTips
),
/////
@ -776,11 +779,16 @@ class _Settlement extends State<Settlement> {
});},
tableId,
vipPriceSelect,
(){
setState(() {
this.showVipTips = true;
});
}
),
if (placeOrder && joinA != JoinActivity.BargainBug)
///
PayMethod(payChannelCheck),
PayMethod(payChannelCheck,coupons,promotions,useVipPriceSelect),
],
),
),
@ -889,6 +897,7 @@ class _Settlement extends State<Settlement> {
count1,
payChannel,
tableId);}
}
vipPriceSelect(bool useVipPriceSelect) {

9
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/min_order_info.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
@ -20,6 +21,7 @@ class ActivityCouponRemarks extends StatefulWidget {
final String remark;
final int tableId;
final Function(bool useVipPriceSelect) vipPriceSelect;
final Function showVipTips;
ActivityCouponRemarks(
this.couponCart,
@ -34,6 +36,7 @@ class ActivityCouponRemarks extends StatefulWidget {
this.editRemark,
this.tableId,
this.vipPriceSelect,
this.showVipTips
);
@override
@ -77,6 +80,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// if(widget?.settleOrderInfo?.memberVO?.isVip ?? false)
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -98,8 +102,13 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
activeColor: Color(0xff32A060),
onChanged: (bool value) {
setState(() {
if((widget?.settleOrderInfo?.memberVO?.isVip ?? false)){
vipSelect = !vipSelect;
widget.vipPriceSelect(vipSelect);
}else{
widget.showVipTips();
return;
}
});
},
),

17
lib/settlement/settlement_view/pay_method.dart

@ -1,14 +1,20 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../view_widget/tips_dialog.dart';
class PayMethod extends StatefulWidget {
final Function(int payChannel) payChannelCheck;
final String coupons;
final String promotions;
final bool useVipPriceSelect;
PayMethod(this.payChannelCheck);
PayMethod(this.payChannelCheck,this.coupons,this.promotions,this.useVipPriceSelect);
@override
State<StatefulWidget> createState() {
@ -164,6 +170,15 @@ class _PayMethod extends State<PayMethod> {
onTap: () {
setState(() {
checkIndex = 3;
if(widget.promotions != "" || widget.coupons != "" || widget.useVipPriceSelect){
SmartDialog.show(
widget: Tips(
() {
},
text: "绿币支付不参与任何活动优惠,请重新选择支付方式",
));
return;
}
});
widget.payChannelCheck(5);
},

34
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -18,9 +18,10 @@ class SettlementOrderCommodity extends StatefulWidget {
final MinOrderInfo minOrderInfo;
final String pageType;
final bool useVipPriceSelect;
final bool showVipTips;
SettlementOrderCommodity(
this.isTakeOut, this.settleOrderInfo, this.minOrderInfo,this.tableId,this.pageType,this.useVipPriceSelect);
this.isTakeOut, this.settleOrderInfo, this.minOrderInfo,this.tableId,this.pageType,this.useVipPriceSelect,this.showVipTips);
@override
State<StatefulWidget> createState() {
@ -108,6 +109,36 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠", widget?.settleOrderInfo?.discountAmount ?? ""));
}
if(widget.showVipTips){
widgets.add(GestureDetector(child: Container(
alignment: Alignment.centerLeft,
child:Text.rich(
TextSpan(
children: [
TextSpan(
text: "您未购买回乡VIP卡,无法享受优惠,",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
),
TextSpan(
text: "点击立即购买",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFFFF7A1A),
),
),
],
),
),),onTap: (){
Navigator.of(context)
.pushNamedAndRemoveUntil('/router/main_page', (route) => false,arguments: {"index":2});
},));
}
widgets.add(Container(
margin: EdgeInsets.only(
top: 24.h,
@ -123,6 +154,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
return widgets;
}
Widget commodityItem(OrderProductVOList productList) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),

20
lib/store/store_order.dart

@ -52,6 +52,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
StoreInfo storeInfo;
List<Activity> activitys;
StoreOrderListPage storeOrderListPage;
ScrollPhysics scrollPhysics = NeverScrollableScrollPhysics();
ScrollController controller = ScrollController();
ShoppingCart shopCarGoods;
@ -99,9 +100,11 @@ class _StoreOrderPage extends State<StoreOrderPage>
Dio(),
context: context,
token: shared.getString('token'),
showLoading: false,
showLoading: true,
);
apiService.minLogin(storeId).catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
debugPrint(onError);
}).then((baseData) {
if (baseData != null && baseData.isSuccess) {
@ -121,7 +124,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
token: minToken,
tenant: tenant,
storeId: storeId,
showLoading: false,
);
queryMemberInfo();
@ -262,7 +264,13 @@ class _StoreOrderPage extends State<StoreOrderPage>
controller,
storeInfo != null
? storeInfo.storeName
: ''),
: '',(alpha){
setState(() {
if(alpha == 1)
scrollPhysics = BouncingScrollPhysics();
else scrollPhysics = NeverScrollableScrollPhysics();
});
}),
collapseMode: CollapseMode.pin,
stretchModes: [
StretchMode.zoomBackground,
@ -421,7 +429,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
this.shopCarGoods = value;
setState(() {});
});
}),
},scrollPhysics),
///,
// StoreActivity(
@ -981,8 +989,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
class Title extends StatefulWidget {
final ScrollController controller;
final String title;
final Function scrollChange;
Title(this.controller, this.title);
Title(this.controller, this.title,this.scrollChange);
@override
State<StatefulWidget> createState() {
@ -1013,6 +1022,7 @@ class _Title extends State<Title> {
if (alpha != alphatemp && mounted) {
alpha = alphatemp;
print("object: $alpha");
widget.scrollChange(alpha);
setState(() {});
}
});

10
lib/store/store_view/store_order_list.dart

@ -24,6 +24,7 @@ class StoreOrderListPage extends StatefulWidget {
final int tableId;
final Function(String id, int count) queryMiNiDetail;
final Function queryShoppingCart;
final ScrollPhysics scrollPhysics;
ShoppingCart shopCarGoods;
@ -38,6 +39,7 @@ class StoreOrderListPage extends StatefulWidget {
this.tableId,
this.queryMiNiDetail,
this.queryShoppingCart,
this.scrollPhysics
);
@override
@ -86,7 +88,8 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
token: widget.minToken,
tenant: widget.tenant,
storeId: widget.arguments["id"],
showLoading: true);
showLoading: true
);
BaseData<List<FindMiNiGroupList>> baseData =
await minService.findMiNiGroupList({
@ -147,8 +150,9 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
width: MediaQuery.of(context).size.width - 100.w,
child: ListView.builder(
itemCount: appletProducts == null ? 0 : appletProducts.length,
padding: EdgeInsets.only(top: 0),
controller: controller,
physics: BouncingScrollPhysics(),
physics: widget.scrollPhysics,
shrinkWrap: true,
itemBuilder: (context, position) {
return rightOrderItem(position);
@ -211,7 +215,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
color: currentIndex != index ? Color(0xFFFAFAFA) : Colors.white,
alignment: Alignment.center,
padding: EdgeInsets.all(15),
margin: EdgeInsets.only(bottom: (index==appletProducts.length - 1)?35.h:0),
// margin: EdgeInsets.only(bottom: (index==appletProducts.length - 1)?35.h:0),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,

3
lib/union/union_page.dart

@ -8,6 +8,7 @@ import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';
import 'package:flutter_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart';
import 'package:flutter_bmflocation/flutter_bmflocation.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/main.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
@ -31,6 +32,8 @@ import 'package:flutter/rendering.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import '../utils/flutter_utils.dart';
class UnionPage extends StatefulWidget {
final int initialIndex;

3
lib/vip/vip_page.dart

@ -13,6 +13,7 @@ import 'package:shared_preferences/shared_preferences.dart';
import '../retrofit/data/base_data.dart';
import '../retrofit/retrofit_api.dart';
import '../utils/flutter_utils.dart';
import '../view_widget/my_appbar.dart';
@ -56,6 +57,8 @@ class _VipPageState extends State<VipPage> with AutomaticKeepAliveClientMixin {
}
BaseData<VipCardHome> baseData =
await apiService.vipCardIndex().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
_refreshController.refreshFailed();});
if (baseData != null && baseData.isSuccess) {
vipHome = baseData.data;

236
lib/vip/vip_view/exclusive_coupon.dart

@ -18,7 +18,7 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
return Container(
margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom: 40.h),
width: double.infinity,
padding: EdgeInsets.only(top: 16.h,left: 8.h,bottom: 10.h),
padding: EdgeInsets.only(top: 20.h,left: 20.h,bottom: 10.h,right: 20.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w),
color: Colors.white,
@ -35,6 +35,16 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(width: 7.w,),
Image.asset(
"assets/image/vip_title.webp",
fit: BoxFit.fill, //
height:13.h,
width: 27.w,
),
SizedBox(width: 4.w,),
Text(
S.of(context).zhuanxiangyouhuiquan,
style: TextStyle(
@ -43,91 +53,215 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
SizedBox(
height: 10.h,
),
Row(
children: [
SizedBox(width: 2.w,),
Expanded(
Container(
height: 124.h,
margin: EdgeInsets.only(bottom: 16.h),
child: Stack(
alignment: Alignment.bottomCenter,
children: [
Image.asset(
"assets/image/vip_shop_hx.webp",
width: 100.w,
height: 120.h,
fit: BoxFit.fill,
),
Padding(
padding: EdgeInsets.only(bottom: 4.h),
child: Text(
"6折饮品券",
"assets/image/vip_shop_bj.webp",
fit: BoxFit.fill, //
height:double.infinity,
width: double.infinity,
),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:Padding(
padding:EdgeInsets.only(top:25.h,left: 19.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"海峡姐妹饮品券",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
color: Color(0xff32A060),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(height: 5.h,),
Text.rich(
TextSpan(
children: [
TextSpan(
text: "6",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 36.sp,
color: Color(0xffFF7E12),
),
),
TextSpan(
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
),
),
],
)),
SizedBox(
width: 14.w,
),
Expanded(
textDirection: TextDirection.ltr,
),
],
),)),
Image.asset(
"assets/image/vip_shop_hx.webp",
fit: BoxFit.fill, //
height:85,
width: 85,
),
],
),
)
],
),
),
Container(
height: 124.h,
margin: EdgeInsets.only(bottom: 16.h),
child: Stack(
alignment: Alignment.bottomCenter,
children: [
Image.asset(
"assets/image/vip_shop_qj.webp",
width: 100.w,
height: 120.h,
fit: BoxFit.fill,
),
Padding(
padding: EdgeInsets.only(bottom: 4.h),
child: Text(
"7折烘焙券",
"assets/image/vip_shop_bj.webp",
fit: BoxFit.fill, //
height:double.infinity,
width: double.infinity,
),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:Padding(
padding:EdgeInsets.only(top:25.h,left: 19.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"前进麦味烘焙券",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
color: Color(0xff32A060),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(height: 5.h,),
Text.rich(
TextSpan(
children: [
TextSpan(
text: "7",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 36.sp,
color: Color(0xffFF7E12),
),
),
TextSpan(
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
textDirection: TextDirection.ltr,
),
],
),)),
Image.asset(
"assets/image/vip_shop_qj.webp",
fit: BoxFit.fill, //
height:85,
width: 85,
),
],
),
)
],
),
SizedBox(
width: 14.w,
),
Expanded(
Container(
height: 124.h,
margin: EdgeInsets.only(bottom: 22.h),
child: Stack(
alignment: Alignment.bottomCenter,
children: [
Image.asset(
"assets/image/vip_shop_hg.webp",
width:100.w,
height: 120.h,
fit: BoxFit.fill,
),
Padding(
padding: EdgeInsets.only(bottom: 4.h),
child: Text(
"8折火锅券",
"assets/image/vip_shop_bj.webp",
fit: BoxFit.fill, //
height:double.infinity,
width: double.infinity,
),
Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child:Padding(
padding:EdgeInsets.only(top:25.h,left: 19.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"门店火锅券",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
color: Color(0xff32A060),
fontSize: 15.sp,
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(height: 5.h,),
Text.rich(
TextSpan(
children: [
TextSpan(
text: "8",
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 36.sp,
color: Color(0xffFF7E12),
),
),
TextSpan(
text: "",
style: TextStyle(
fontSize: 24.sp,
color: Color(0xffFF7E12),
fontWeight: MyFontWeight.semi_bold,
),
),
],
),
textDirection: TextDirection.ltr,
),
],
),)),
Image.asset(
"assets/image/vip_shop_hg.webp",
fit: BoxFit.fill, //
height:85,
width: 85,
),
],
),
)
],
),
),
],
),
);

88
lib/vip/vip_view/vip_goods_discount.dart

@ -85,9 +85,9 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Widget vipGoodsRecommend(){
return Container(
margin: EdgeInsets.only(top: 12.h),
height: 195.h,
height: 261.h,
width: double.infinity,
padding: EdgeInsets.only(top: 16.h,left: 8.h),
padding: EdgeInsets.only(top: 16.h,left: 13.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w),
color: Colors.white,
@ -104,6 +104,16 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
SizedBox(width: 7.w,),
Image.asset(
"assets/image/vip_title.webp",
fit: BoxFit.fill, //
height:13.h,
width: 27.w,
),
SizedBox(width: 4.w,),
Text(
S.of(context).huiyuanzhuanxiangjiage,
style: TextStyle(
@ -112,7 +122,9 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(height:20.h,),
],
),
SizedBox(height:10.h,),
vipGoodsRecommendList(),
],
),
@ -121,7 +133,7 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Widget vipGoodsRecommendList(){
return Container(
height: 136.h,
height: 200.h,
child: ListView.builder(
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
@ -147,35 +159,53 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Widget vipGoodsRecommendItem(ProductVips productVips){
return Container(
width: 70.w,
margin: EdgeInsets.only(right:40.w,left:6.w),
width: 140.w,
margin: EdgeInsets.only(right:13.w,left:6.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Stack(
alignment: Alignment.bottomCenter,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
MImage(
productVips.thumbnailImg ?? "",
width: 70,
height: 70,
width: 140.w,
height: 145.h,
fit: BoxFit.cover,
radius: BorderRadius.circular(2),
radius: BorderRadius.circular(6),
errorSrc: "assets/image/default_1.webp",
fadeSrc: "assets/image/default_1.webp",
),
Expanded(child: Padding(padding:EdgeInsets.only(top:10.h,bottom:7.h),
child: Text(
productVips.productName ?? "",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xff0D0D0D),
fontSize:14.sp,
fontWeight: MyFontWeight.regular,
),),
)),
Row(
children: [
Text(
"${productVips.vipPrice ?? "0.00"}",
style: TextStyle(
color: Color(0xff32A060),
fontSize:14.sp,
fontWeight: MyFontWeight.medium,
),),
if(productVips.vipDiscount != "0.00")
Container(
width: 70,
padding: EdgeInsets.symmetric(vertical:2.h),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 2.h,horizontal:3.w),
margin: EdgeInsets.only(left: 5.w),
decoration: BoxDecoration(
color: Color(0xffF96519),
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(2.r),
bottomLeft: Radius.circular(2.r),
topLeft: Radius.circular(10),
topRight: Radius.circular(10),
bottomLeft: Radius.circular(0),
bottomRight: Radius.circular(10),
),
color: Color(0xff32A060),
),
child: Text(
"${productVips.vipDiscount ?? "0"}",
@ -186,25 +216,7 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
),),
),
],
),
Padding(padding:EdgeInsets.only(top:6.h,bottom: 4.h),
child: Text(
productVips.productName ?? "",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xff0D0D0D),
fontSize:14.sp,
fontWeight: MyFontWeight.regular,
),),
),
Text(
"${productVips.vipPrice ?? "0.00"}",
style: TextStyle(
color: Color(0xff0D0D0D),
fontSize:14.sp,
fontWeight: MyFontWeight.medium,
),)
)
],
),
);

41
lib/vip/vip_view/vip_top.dart

@ -114,7 +114,18 @@ class _VipTop extends State<VipTop> {
@override
Widget build(BuildContext context) {
return Container(
return Stack(
children: [
Container(
height: 246.h,
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(8.w),
),
),
),
Container(
child: Column(
children: [
vipCard(),
@ -238,6 +249,8 @@ class _VipTop extends State<VipTop> {
),
],
),
)
],
);
}
@ -245,8 +258,9 @@ class _VipTop extends State<VipTop> {
Widget vipCard() {
return Container(
margin: EdgeInsets.fromLTRB(
14.w, MediaQuery.of(context).padding.top + 25.h, 14.w, 8.h),
height: 167.h,
14.w,( MediaQuery.of(context).padding.top + 50.h), 14.w, 8.h),
width: double.infinity,
height: 207.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w),
color: Colors.white,
@ -265,29 +279,22 @@ class _VipTop extends State<VipTop> {
Image.asset(
"assets/image/vip_card.webp",
fit: BoxFit.fill, //
height: 167.h,
height:double.infinity,
width: double.infinity,
),
Container(
padding: EdgeInsets.all(16.w),
padding: EdgeInsets.only(top: 24.h,right:16.w),
alignment: Alignment.topRight,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
S.of(context).huixiangVIPka,
style: TextStyle(
color: Color(0xff32A060),
fontSize: 24.sp,
fontWeight: MyFontWeight.semi_bold,
),
)),
Text(
widget?.vipCardHome?.member?.nickname ?? "",
style: TextStyle(
color: Colors.white,
color: Color(0xff32A060),
fontSize: 15.sp,
fontWeight: MyFontWeight.regular,
fontWeight: MyFontWeight.medium,
),
),
SizedBox(
@ -297,7 +304,7 @@ class _VipTop extends State<VipTop> {
Text(
"有效期至 ${(widget?.vipCardHome?.member?.vipExpire ?? "").substring(0, (widget?.vipCardHome?.member?.vipExpire ?? "").indexOf(" "))}",
style: TextStyle(
color: Color(0xffFFFFFF),
color: Color(0xff32A060),
fontSize: 13.sp,
fontWeight: MyFontWeight.regular,
),

Loading…
Cancel
Save