diff --git a/assets/static/vip_background.png b/assets/static/vip_background.png new file mode 100644 index 00000000..268c4f99 Binary files /dev/null and b/assets/static/vip_background.png differ diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 3171b22a..2731be74 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -1134,6 +1134,10 @@ class $AssetsStaticGen { /// File path: assets/static/sign_in_background.png AssetGenImage get signInBackground => const AssetGenImage('assets/static/sign_in_background.png'); + + /// File path: assets/static/vip_background.png + AssetGenImage get vipBackground => + const AssetGenImage('assets/static/vip_background.png'); } class $AssetsTabGen { diff --git a/lib/pages/personal/intergral/integral_center_page.dart b/lib/pages/personal/intergral/integral_center_page.dart index 752ace2e..b96e99b3 100644 --- a/lib/pages/personal/intergral/integral_center_page.dart +++ b/lib/pages/personal/intergral/integral_center_page.dart @@ -22,7 +22,9 @@ class _integralCenterPageState extends State { void initState() { Future.delayed(Duration(milliseconds: 5000), () async { _proportion = 0.5; - setState(() {}); + if (mounted) { + setState(() {}); + } }); super.initState(); } diff --git a/lib/pages/personal/personal_page.dart b/lib/pages/personal/personal_page.dart index a0431345..fc4ff925 100644 --- a/lib/pages/personal/personal_page.dart +++ b/lib/pages/personal/personal_page.dart @@ -21,6 +21,7 @@ import 'package:get/get.dart'; import 'package:provider/provider.dart'; import 'address/address_list_page.dart'; +import 'clock_in/clock_success_dialog.dart'; import 'intergral/integral_center_page.dart'; class PersonalIndex extends StatefulWidget { @@ -331,8 +332,9 @@ class _PersonalIndexState extends State )), Spacer(), MaterialButton( - onPressed: () { - Get.to(() => ClockInPage()); + onPressed: () async { + await Get.dialog(ClockSuccessDialog( + todayIntegral: 1, tomorrowIntegral: 2)); }, elevation: 0, color: Colors.white, @@ -347,11 +349,50 @@ class _PersonalIndexState extends State ), ), ), + Spacer(), + Container( + width: 686.w, + height: 120.w, + alignment: Alignment.center, + decoration: BoxDecoration( + image: DecorationImage( + image: + AssetImage(Assets.static.vipBackground.path)), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(16.w), + topRight: Radius.circular(16.w))), + child: Row( + children: [ + 32.wb, + Assets.icons.vipFont.image(width: 60.w, height: 60.w), + 24.wb, + '当前会员等级:2级' + .text + .size(24.sp) + .color(Color(0xFFFFE0A9)) + .make(), + Spacer(), + GestureDetector( + onTap: () => Get.to(() => integralCenterPage()), + child: Container( + width: 160.w, + height: 58.w, + alignment: Alignment.center, + decoration: BoxDecoration( + color: Color(0xFFFFE0A9), + borderRadius: BorderRadius.circular(29.w)), + child: '会员中心'.text.size(24.sp).black.make(), + ), + ), + 32.wb, + ], + ), + ), ], ), ), Padding( - padding: EdgeInsets.only(top: 350.w), + padding: EdgeInsets.only(top: 450.w), child: Column( children: [ Container( @@ -419,7 +460,7 @@ class _PersonalIndexState extends State color: Colors.white, child: InkWell( onTap: () { - Get.to(() => integralCenterPage()); + Get.to(() => ClockInPage()); }, borderRadius: BorderRadius.circular(16.w), child: Padding(