Browse Source

首页ui更改;

订单结算优化;
店铺点单滑动更改;
vip ui更改;
dart3_last
wurong 2 years ago
parent
commit
308fc65e0a
  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. 15
      lib/settlement/settlement.dart
  68. 12
      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:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../utils/flutter_utils.dart';
import 'home_view/shortcut_operation.dart'; import 'home_view/shortcut_operation.dart';
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
@ -158,6 +159,8 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
final BaseData brand = final BaseData brand =
await apiService.queryHomeBrand().catchError((onError) { await apiService.queryHomeBrand().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
refreshController.refreshFailed(); refreshController.refreshFailed();
}); });
if (brand != null && brand.isSuccess) { if (brand != null && brand.isSuccess) {
@ -377,10 +380,10 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
} }
} }
_onRefresh(){ _onRefresh() async{
queryHome(); await queryHome();
// queryMsgStats(); // queryMsgStats();
queryCoupon(); await queryCoupon();
} }
@override @override
@ -485,10 +488,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
}, },
child: SingleChildScrollView( child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
child: FutureBuilder( child: Column(
future:queryHome(),
builder: (context, snapshot) {
return Column(
children: [ children: [
///banner ///banner
HomeBanner(bannerData, controller), 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) { Widget build(BuildContext context) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 14.h,), margin: EdgeInsets.only(top:28.h,),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Padding(padding:EdgeInsets.symmetric(horizontal: 14.w), Padding(padding: EdgeInsets.symmetric(horizontal: 14.w),child: Row(
child: Text( children: [
Expanded(child: Text(
S.of(context).tehuizhuanqu, S.of(context).tehuizhuanqu,
style: TextStyle( style: TextStyle(
color: Color(0xFF0D0D0D), color: Color(0xFF0D0D0D),
@ -44,6 +45,21 @@ class _DiscountZone extends State<DiscountZone> {
fontWeight: FontWeight.bold, 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) if(widget.coupon.length != 0)
Container( Container(
height: 120.h, height: 120.h,
@ -99,29 +115,7 @@ class _DiscountZone extends State<DiscountZone> {
fontSize: 14.sp, fontSize: 14.sp,
height: 1.5.h, height: 1.5.h,
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
color: Color(0xFFFFA607), color: Color(0xFF32A060),
),
),
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),
), ),
), ),
], ],
@ -163,7 +157,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(0xFFFFFFFF), color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
), ),
), ),
SizedBox( SizedBox(
@ -177,7 +171,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle( style: TextStyle(
fontSize: 30.sp, fontSize: 30.sp,
fontWeight: FontWeight.w900, 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( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 26.sp, fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 26.sp, fontSize: 26.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.semi_bold, 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( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF), color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
), ),
), ),
SizedBox( SizedBox(
@ -275,7 +269,7 @@ class _DiscountZone extends State<DiscountZone> {
style: TextStyle( style: TextStyle(
fontSize: 28.sp, fontSize: 28.sp,
fontWeight: FontWeight.w900, 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( style: TextStyle(
fontSize: 30.sp, fontSize: 30.sp,
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFFFFFFFF), color: coupon.status == 3 ? Color(0xFFB3B3B3):Color(0xFF32A060),
), ),
), ),
SizedBox( SizedBox(
@ -311,7 +305,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(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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: 75.h, height: 70.h,
width: double.infinity, 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( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -45,13 +45,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
margin: EdgeInsets.symmetric(horizontal: 5), margin: EdgeInsets.symmetric(horizontal: 5),
padding: EdgeInsets.all(10.h), padding: EdgeInsets.all(10.h),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: new LinearGradient( color: Colors.white,
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFD1E8D9),
Color(0xFFE4F7EA),
]),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
@ -75,7 +69,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF32A060), color: Colors.black,
), ),
), ),
SizedBox(height: 5.h), SizedBox(height: 5.h),
@ -84,17 +78,18 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF61836F), color: Color(0xff4D4D4D),
), ),
), ),
], ],
), ),
SizedBox(width: 3.w), SizedBox(width:16.w),
Expanded( Expanded(
child: Image.asset( child: Image.asset(
"assets/image/home_lm.webp", "assets/image/home_lm.webp",
width: 36.w, width: 24.w,
height: 36.h, height: 31.h,
fit: BoxFit.fill,
), ),
), ),
], ],
@ -111,13 +106,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
margin: EdgeInsets.symmetric(horizontal: 5.w), margin: EdgeInsets.symmetric(horizontal: 5.w),
padding: EdgeInsets.all(10.h), padding: EdgeInsets.all(10.h),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: new LinearGradient( color: Colors.white,
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFAEDCB),
Color(0xFFFAF4E2),
]),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
@ -141,7 +130,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFFFFBA1B), color: Colors.black,
), ),
), ),
SizedBox(height: 5.h), SizedBox(height: 5.h),
@ -150,17 +139,18 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFFA59162), color: Color(0xff4D4D4D),
), ),
), ),
], ],
), ),
SizedBox(width: 3.w), SizedBox(width:16.w),
Expanded( Expanded(
child: Image.asset( child: Image.asset(
"assets/image/home_recharge.webp", "assets/image/home_recharge.webp",
width: 36.w, width: 21.w,
height: 36.h, height: 33.h,
fit: BoxFit.fill,
), ),
), ),
], ],
@ -179,13 +169,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
margin: EdgeInsets.symmetric(horizontal: 5.w), margin: EdgeInsets.symmetric(horizontal: 5.w),
padding: EdgeInsets.all(10.h), padding: EdgeInsets.all(10.h),
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: new LinearGradient( color: Colors.white,
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFFAE5CB),
Color(0xFFFAF1E4),
]),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.black.withAlpha(12), color: Colors.black.withAlpha(12),
@ -209,7 +193,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFFFF910F), color: Colors.black,
), ),
), ),
SizedBox(height: 5.h), SizedBox(height: 5.h),
@ -218,17 +202,18 @@ class _ShortcutOperation extends State<ShortcutOperation> {
style: TextStyle( style: TextStyle(
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF89755D), color: Color(0xff4D4D4D),
), ),
), ),
], ],
), ),
SizedBox(width: 3.w), SizedBox(width: 16.w),
Expanded( Expanded(
child: Image.asset( child: Image.asset(
"assets/image/home_welfare.webp", "assets/image/home_welfare.webp",
width: 36.w, width: 22.w,
height: 36.h, 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, 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), padding: EdgeInsets.only(left: 12.w,top: 16.h),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

32
lib/home/home_view/union_entry.dart

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

46
lib/home/home_view/welfare_core.dart

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

2
lib/home/welfare_exchange.dart

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

3
lib/login/new_login_page.dart

@ -137,7 +137,8 @@ class _NewLoginPage extends State<NewLoginPage> {
} }
}) })
.catchError((error) { .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 @override
void initState() { void initState() {
super.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); WidgetsBinding.instance.addObserver(this);
EasyLoading.instance EasyLoading.instance
..indicatorType = EasyLoadingIndicatorType.circle ..indicatorType = EasyLoadingIndicatorType.circle
@ -390,7 +393,7 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
} }
} }
final PageController pageController = PageController(initialPage: 0); PageController pageController;
@override @override
Widget build(BuildContext context) { 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/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.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/generated/l10n.dart';
import 'package:huixiang/main.dart'; import 'package:huixiang/main.dart';
import 'package:huixiang/mine/mine_view/mine_calendar.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:dio/dio.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../utils/flutter_utils.dart';
import 'mine_view/mine_item.dart'; import 'mine_view/mine_item.dart';
import 'mine_view/mine_view.dart'; import 'mine_view/mine_view.dart';
@ -99,6 +101,8 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
BaseData<List<Rank>> rankData = BaseData<List<Rank>> rankData =
await apiService.rankList().catchError((onError) { await apiService.rankList().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
_refreshController.refreshFailed(); _refreshController.refreshFailed();
}); });
if (rankData != null && rankData.isSuccess) { if (rankData != null && rankData.isSuccess) {

11
lib/order/order_detail_page.dart

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

4
lib/order/order_view/order_info.dart

@ -53,8 +53,8 @@ class _OrderInfoView extends State<OrderInfoView> {
widget.orderInfo != null widget.orderInfo != null
? widget.orderInfo.notes ?? S.of(context).qingshurubeizhuyaoqiu ? widget.orderInfo.notes ?? S.of(context).qingshurubeizhuyaoqiu
: S.of(context).qingshurubeizhuyaoqiu), : S.of(context).qingshurubeizhuyaoqiu),
orderInfoItem(S.of(context).zhifufangshi, // orderInfoItem(S.of(context).zhifufangshi,
widget.orderInfo != null ? payChannel() : S.of(context).yue), // 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); data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson( final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data, _result.data,
(json) => (json as List<dynamic>) (json) => ((json??"") == "")?null:(json as List<dynamic>)
.map<ShoppingCart>( .map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>)) (i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList()); .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:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart'; import 'package:retrofit/retrofit.dart';
import '../utils/flutter_utils.dart';
import 'data/achievement_detail_list.dart'; import 'data/achievement_detail_list.dart';
import 'data/activity_pos.dart'; import 'data/activity_pos.dart';
import 'data/address.dart'; import 'data/address.dart';
@ -131,6 +132,8 @@ abstract class ApiService {
if (EasyLoading.isShow) { if (EasyLoading.isShow) {
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
// SmartDialog.showToast(AppUtils.dioErrorTypeToString(e.type),
// alignment: Alignment.center);
debugPrint("\n======================= 错误响应数据 ======================="); debugPrint("\n======================= 错误响应数据 =======================");
debugPrint("type = ${e.type}"); debugPrint("type = ${e.type}");
debugPrint("message = ${e.message}"); debugPrint("message = ${e.message}");

15
lib/settlement/settlement.dart

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

12
lib/settlement/settlement_view/activity_coupon_remarks.dart

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

17
lib/settlement/settlement_view/pay_method.dart

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

34
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -18,9 +18,10 @@ class SettlementOrderCommodity extends StatefulWidget {
final MinOrderInfo minOrderInfo; final MinOrderInfo minOrderInfo;
final String pageType; final String pageType;
final bool useVipPriceSelect; final bool useVipPriceSelect;
final bool showVipTips;
SettlementOrderCommodity( 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 @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -108,6 +109,36 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
widgets.add(vipItem(Color(0xFFFF7A1A), "VIP优惠", widget?.settleOrderInfo?.discountAmount ?? "")); 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( widgets.add(Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 24.h, top: 24.h,
@ -123,6 +154,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
return widgets; return widgets;
} }
Widget commodityItem(OrderProductVOList productList) { Widget commodityItem(OrderProductVOList productList) {
return Container( return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h), 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; StoreInfo storeInfo;
List<Activity> activitys; List<Activity> activitys;
StoreOrderListPage storeOrderListPage; StoreOrderListPage storeOrderListPage;
ScrollPhysics scrollPhysics = NeverScrollableScrollPhysics();
ScrollController controller = ScrollController(); ScrollController controller = ScrollController();
ShoppingCart shopCarGoods; ShoppingCart shopCarGoods;
@ -99,9 +100,11 @@ class _StoreOrderPage extends State<StoreOrderPage>
Dio(), Dio(),
context: context, context: context,
token: shared.getString('token'), token: shared.getString('token'),
showLoading: false, showLoading: true,
); );
apiService.minLogin(storeId).catchError((onError) { apiService.minLogin(storeId).catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
debugPrint(onError); debugPrint(onError);
}).then((baseData) { }).then((baseData) {
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
@ -121,7 +124,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
token: minToken, token: minToken,
tenant: tenant, tenant: tenant,
storeId: storeId, storeId: storeId,
showLoading: false,
); );
queryMemberInfo(); queryMemberInfo();
@ -272,7 +274,13 @@ class _StoreOrderPage extends State<StoreOrderPage>
controller, controller,
storeInfo != null storeInfo != null
? storeInfo.storeName ? storeInfo.storeName
: ''), : '',(alpha){
setState(() {
if(alpha == 1)
scrollPhysics = BouncingScrollPhysics();
else scrollPhysics = NeverScrollableScrollPhysics();
});
}),
collapseMode: CollapseMode.pin, collapseMode: CollapseMode.pin,
stretchModes: [ stretchModes: [
StretchMode.zoomBackground, StretchMode.zoomBackground,
@ -431,7 +439,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
this.shopCarGoods = value; this.shopCarGoods = value;
setState(() {}); setState(() {});
}); });
}), },scrollPhysics),
///, ///,
// StoreActivity( // StoreActivity(
@ -991,8 +999,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
class Title extends StatefulWidget { class Title extends StatefulWidget {
final ScrollController controller; final ScrollController controller;
final String title; final String title;
final Function scrollChange;
Title(this.controller, this.title); Title(this.controller, this.title,this.scrollChange);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -1023,6 +1032,7 @@ class _Title extends State<Title> {
if (alpha != alphatemp && mounted) { if (alpha != alphatemp && mounted) {
alpha = alphatemp; alpha = alphatemp;
print("object: $alpha"); print("object: $alpha");
widget.scrollChange(alpha);
setState(() {}); setState(() {});
} }
}); });

10
lib/store/store_view/store_order_list.dart

@ -24,6 +24,7 @@ class StoreOrderListPage extends StatefulWidget {
final int tableId; final int tableId;
final Function(String id, int count) queryMiNiDetail; final Function(String id, int count) queryMiNiDetail;
final Function queryShoppingCart; final Function queryShoppingCart;
final ScrollPhysics scrollPhysics;
ShoppingCart shopCarGoods; ShoppingCart shopCarGoods;
@ -38,6 +39,7 @@ class StoreOrderListPage extends StatefulWidget {
this.tableId, this.tableId,
this.queryMiNiDetail, this.queryMiNiDetail,
this.queryShoppingCart, this.queryShoppingCart,
this.scrollPhysics
); );
@override @override
@ -86,7 +88,8 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
token: widget.minToken, token: widget.minToken,
tenant: widget.tenant, tenant: widget.tenant,
storeId: widget.arguments["id"], storeId: widget.arguments["id"],
showLoading: true); showLoading: true
);
BaseData<List<FindMiNiGroupList>> baseData = BaseData<List<FindMiNiGroupList>> baseData =
await minService.findMiNiGroupList({ await minService.findMiNiGroupList({
@ -147,8 +150,9 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
width: MediaQuery.of(context).size.width - 100.w, width: MediaQuery.of(context).size.width - 100.w,
child: ListView.builder( child: ListView.builder(
itemCount: appletProducts == null ? 0 : appletProducts.length, itemCount: appletProducts == null ? 0 : appletProducts.length,
padding: EdgeInsets.only(top: 0),
controller: controller, controller: controller,
physics: BouncingScrollPhysics(), physics: widget.scrollPhysics,
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (context, position) { itemBuilder: (context, position) {
return rightOrderItem(position); return rightOrderItem(position);
@ -211,7 +215,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
color: currentIndex != index ? Color(0xFFFAFAFA) : Colors.white, color: currentIndex != index ? Color(0xFFFAFAFA) : Colors.white,
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.all(15), 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( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.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_baidu_mapapi_utils/flutter_baidu_mapapi_utils.dart';
import 'package:flutter_bmflocation/flutter_bmflocation.dart'; import 'package:flutter_bmflocation/flutter_bmflocation.dart';
import 'package:flutter_easyloading/flutter_easyloading.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/generated/l10n.dart';
import 'package:huixiang/main.dart'; import 'package:huixiang/main.dart';
import 'package:huixiang/retrofit/data/base_data.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_screenutil/flutter_screenutil.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart'; import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import '../utils/flutter_utils.dart';
class UnionPage extends StatefulWidget { class UnionPage extends StatefulWidget {
final int initialIndex; 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/data/base_data.dart';
import '../retrofit/retrofit_api.dart'; import '../retrofit/retrofit_api.dart';
import '../utils/flutter_utils.dart';
import '../view_widget/my_appbar.dart'; import '../view_widget/my_appbar.dart';
@ -56,6 +57,8 @@ class _VipPageState extends State<VipPage> with AutomaticKeepAliveClientMixin {
} }
BaseData<VipCardHome> baseData = BaseData<VipCardHome> baseData =
await apiService.vipCardIndex().catchError((onError) { await apiService.vipCardIndex().catchError((onError) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(onError.type),
alignment: Alignment.center);
_refreshController.refreshFailed();}); _refreshController.refreshFailed();});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
vipHome = baseData.data; vipHome = baseData.data;

236
lib/vip/vip_view/exclusive_coupon.dart

@ -18,7 +18,7 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
return Container( return Container(
margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom: 40.h), margin: EdgeInsets.only(left: 14.w, right: 14.w, bottom: 40.h),
width: double.infinity, 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( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w), borderRadius: BorderRadius.circular(6.w),
color: Colors.white, color: Colors.white,
@ -35,6 +35,16 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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( Text(
S.of(context).zhuanxiangyouhuiquan, S.of(context).zhuanxiangyouhuiquan,
style: TextStyle( style: TextStyle(
@ -43,91 +53,215 @@ class _ExclusiveCoupon extends State<ExclusiveCoupon> {
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
), ),
), ),
],
),
SizedBox( SizedBox(
height: 10.h, height: 10.h,
), ),
Row( Container(
children: [ height: 124.h,
SizedBox(width: 2.w,), margin: EdgeInsets.only(bottom: 16.h),
Expanded(
child: Stack( child: Stack(
alignment: Alignment.bottomCenter,
children: [ children: [
Image.asset( Image.asset(
"assets/image/vip_shop_hx.webp", "assets/image/vip_shop_bj.webp",
width: 100.w, fit: BoxFit.fill, //
height: 120.h, height:double.infinity,
fit: BoxFit.fill, width: double.infinity,
), ),
Padding( Container(
padding: EdgeInsets.only(bottom: 4.h), child: Row(
child: Text( mainAxisAlignment: MainAxisAlignment.start,
"6折饮品券", 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( style: TextStyle(
fontSize: 14.sp, color: Color(0xff32A060),
fontWeight: MyFontWeight.medium, fontSize: 15.sp,
color: Colors.white, 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( child: Stack(
alignment: Alignment.bottomCenter,
children: [ children: [
Image.asset( Image.asset(
"assets/image/vip_shop_qj.webp", "assets/image/vip_shop_bj.webp",
width: 100.w, fit: BoxFit.fill, //
height: 120.h, height:double.infinity,
fit: BoxFit.fill, width: double.infinity,
), ),
Padding( Container(
padding: EdgeInsets.only(bottom: 4.h), child: Row(
child: Text( mainAxisAlignment: MainAxisAlignment.start,
"7折烘焙券", 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( style: TextStyle(
fontSize: 14.sp, color: Color(0xff32A060),
fontWeight: MyFontWeight.medium, fontSize: 15.sp,
color: Colors.white, 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( child: Stack(
alignment: Alignment.bottomCenter,
children: [ children: [
Image.asset( Image.asset(
"assets/image/vip_shop_hg.webp", "assets/image/vip_shop_bj.webp",
width:100.w, fit: BoxFit.fill, //
height: 120.h, height:double.infinity,
fit: BoxFit.fill, width: double.infinity,
), ),
Padding( Container(
padding: EdgeInsets.only(bottom: 4.h), child: Row(
child: Text( mainAxisAlignment: MainAxisAlignment.start,
"8折火锅券", 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( style: TextStyle(
fontSize: 14.sp, color: Color(0xff32A060),
fontWeight: MyFontWeight.medium, fontSize: 15.sp,
color: Colors.white, 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(){ Widget vipGoodsRecommend(){
return Container( return Container(
margin: EdgeInsets.only(top: 12.h), margin: EdgeInsets.only(top: 12.h),
height: 195.h, height: 261.h,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(top: 16.h,left: 8.h), padding: EdgeInsets.only(top: 16.h,left: 13.h),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.w), borderRadius: BorderRadius.circular(6.w),
color: Colors.white, color: Colors.white,
@ -104,6 +104,16 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ 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( Text(
S.of(context).huiyuanzhuanxiangjiage, S.of(context).huiyuanzhuanxiangjiage,
style: TextStyle( style: TextStyle(
@ -112,7 +122,9 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
), ),
), ),
SizedBox(height:20.h,), ],
),
SizedBox(height:10.h,),
vipGoodsRecommendList(), vipGoodsRecommendList(),
], ],
), ),
@ -121,7 +133,7 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Widget vipGoodsRecommendList(){ Widget vipGoodsRecommendList(){
return Container( return Container(
height: 126.h, height: 200.h,
child: ListView.builder( child: ListView.builder(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -147,35 +159,53 @@ class _VipGoodsDiscount extends State<VipGoodsDiscount> {
Widget vipGoodsRecommendItem(ProductVips productVips){ Widget vipGoodsRecommendItem(ProductVips productVips){
return Container( return Container(
width: 70.w, width: 140.w,
margin: EdgeInsets.only(right:40.w,left:6.w), margin: EdgeInsets.only(right:13.w,left:6.w),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Stack(
alignment: Alignment.bottomCenter,
children: [ children: [
MImage( MImage(
productVips.thumbnailImg ?? "", productVips.thumbnailImg ?? "",
width: 70, width: 140.w,
height: 70, height: 145.h,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(2), radius: BorderRadius.circular(6),
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
fadeSrc: "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") if(productVips.vipDiscount != "0.00")
Container( Container(
width: 70, padding: EdgeInsets.symmetric(vertical: 2.h,horizontal:3.w),
padding: EdgeInsets.symmetric(vertical:2.h), margin: EdgeInsets.only(left: 5.w),
alignment: Alignment.center,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffF96519),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
bottomRight: Radius.circular(2.r), topLeft: Radius.circular(10),
bottomLeft: Radius.circular(2.r), topRight: Radius.circular(10),
bottomLeft: Radius.circular(0),
bottomRight: Radius.circular(10),
), ),
color: Color(0xff32A060),
), ),
child: Text( child: Text(
"${productVips.vipDiscount ?? "0"}", "${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 @override
Widget build(BuildContext context) { 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( child: Column(
children: [ children: [
vipCard(), vipCard(),
@ -238,6 +249,8 @@ class _VipTop extends State<VipTop> {
), ),
], ],
), ),
)
],
); );
} }
@ -245,8 +258,9 @@ class _VipTop extends State<VipTop> {
Widget vipCard() { Widget vipCard() {
return Container( return Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(
14.w, MediaQuery.of(context).padding.top + 25.h, 14.w, 8.h), 14.w,( MediaQuery.of(context).padding.top + 50.h), 14.w, 8.h),
height: 167.h, width: double.infinity,
height: 207.h,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8.w), borderRadius: BorderRadius.circular(8.w),
color: Colors.white, color: Colors.white,
@ -265,29 +279,22 @@ class _VipTop extends State<VipTop> {
Image.asset( Image.asset(
"assets/image/vip_card.webp", "assets/image/vip_card.webp",
fit: BoxFit.fill, // fit: BoxFit.fill, //
height: 167.h, height:double.infinity,
width: double.infinity,
), ),
Container( Container(
padding: EdgeInsets.all(16.w), padding: EdgeInsets.only(top: 24.h,right:16.w),
alignment: Alignment.topRight,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded(
child: Text(
S.of(context).huixiangVIPka,
style: TextStyle(
color: Color(0xff32A060),
fontSize: 24.sp,
fontWeight: MyFontWeight.semi_bold,
),
)),
Text( Text(
widget?.vipCardHome?.member?.nickname ?? "", widget?.vipCardHome?.member?.nickname ?? "",
style: TextStyle( style: TextStyle(
color: Colors.white, color: Color(0xff32A060),
fontSize: 15.sp, fontSize: 15.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.medium,
), ),
), ),
SizedBox( SizedBox(
@ -297,7 +304,7 @@ class _VipTop extends State<VipTop> {
Text( Text(
"有效期至 ${(widget?.vipCardHome?.member?.vipExpire ?? "").substring(0, (widget?.vipCardHome?.member?.vipExpire ?? "").indexOf(" "))}", "有效期至 ${(widget?.vipCardHome?.member?.vipExpire ?? "").substring(0, (widget?.vipCardHome?.member?.vipExpire ?? "").indexOf(" "))}",
style: TextStyle( style: TextStyle(
color: Color(0xffFFFFFF), color: Color(0xff32A060),
fontSize: 13.sp, fontSize: 13.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
), ),

Loading…
Cancel
Save