|
|
@@ -23,6 +23,7 @@ import '../../router/app_pages.dart';
|
|
|
import '../../utils/date_util.dart';
|
|
|
import '../../widget/animated_switcher_widget.dart';
|
|
|
import 'member_evaluate_bean.dart';
|
|
|
+import 'member_header_cycle_widget.dart';
|
|
|
|
|
|
///进入会员类型
|
|
|
enum MemberPageType {
|
|
|
@@ -56,7 +57,7 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
|
|
|
@override
|
|
|
Widget buildBody(BuildContext context) {
|
|
|
- return PopScope(
|
|
|
+ return PopScope(
|
|
|
canPop: false,
|
|
|
onPopInvokedWithResult: (bool didPop, dynamic result) async {
|
|
|
controller.onPopBack();
|
|
|
@@ -68,11 +69,102 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
controller: controller.scrollController,
|
|
|
child: Stack(
|
|
|
children: [
|
|
|
+ MemberHeaderCycleWidget(),
|
|
|
+ Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 249.w + MediaQuery.of(Get.context!).padding.top),
|
|
|
+ Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.white,
|
|
|
+ borderRadius: BorderRadius.only(
|
|
|
+ topLeft: Radius.circular(20.w),
|
|
|
+ topRight: Radius.circular(20.w)),
|
|
|
+ ),
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.only(
|
|
|
+ topLeft: Radius.circular(20.w),
|
|
|
+ topRight: Radius.circular(20.w)),
|
|
|
+ image: DecorationImage(
|
|
|
+ image: Assets.images.iconMemberVipMiddleBg.provider(),
|
|
|
+ fit: BoxFit.fill,
|
|
|
+ )
|
|
|
+ ),
|
|
|
+ width: double.infinity,
|
|
|
+ height: 174,
|
|
|
+ ),
|
|
|
+ Container(
|
|
|
+ width: double.infinity,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.only(
|
|
|
+ topLeft: Radius.circular(20.w),
|
|
|
+ topRight: Radius.circular(20.w)),
|
|
|
+ image: DecorationImage(image: Assets.images.iconMemberVipMiddleBg.provider())
|
|
|
+ ),
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 15.w),
|
|
|
+ buildUserInfoView(),
|
|
|
+ SizedBox(height: 26.w),
|
|
|
+ SizedBox(height: 23.w),
|
|
|
+ buildGoodsList(),
|
|
|
+ SizedBox(height: 12.w),
|
|
|
+ buildPrivacyPolicyView(),
|
|
|
+ buildPayWayView(),
|
|
|
+ SizedBox(height: 30.w),
|
|
|
+ Padding(
|
|
|
+ padding: EdgeInsets.only(left: 12.w),
|
|
|
+ child: Text(StringName.memberEquityIntroduction,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 16.sp,
|
|
|
+ color: ColorName.black90,
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 19.w),
|
|
|
+ buildFunctionList(),
|
|
|
+ SizedBox(height: 40.w),
|
|
|
+ Padding(
|
|
|
+ padding: EdgeInsets.only(left: 12.w),
|
|
|
+ child: Text(StringName.memberUserEvaluate,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 16.sp,
|
|
|
+ color: ColorName.black90,
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 8.w),
|
|
|
+ buildUserEvaluateList(),
|
|
|
+ SizedBox(height: 20.w),
|
|
|
+ Container(
|
|
|
+ padding: EdgeInsets.all(12.w),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: '#F7F7F7'.color,
|
|
|
+ borderRadius: BorderRadius.circular(6.w)),
|
|
|
+ margin: EdgeInsets.symmetric(horizontal: 12.w),
|
|
|
+ child: Text(StringName.memberTips,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp, color: '#A7A7A7'.color)),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 100.w)
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ /*Stack(
|
|
|
+ children: [
|
|
|
Assets.images.bgMemberHeader.image(width: double.infinity),
|
|
|
SafeArea(
|
|
|
child: Column(
|
|
|
children: [
|
|
|
- SizedBox(height: 62.w),
|
|
|
+ SizedBox(height: 249.w + MediaQuery.of(Get.context!).padding.top),
|
|
|
buildUserInfoView(),
|
|
|
SizedBox(height: 26.w),
|
|
|
Container(
|
|
|
@@ -135,7 +227,7 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
),
|
|
|
)
|
|
|
],
|
|
|
- ),
|
|
|
+ ),*/
|
|
|
),
|
|
|
buildHeadBar(),
|
|
|
buildMemberBottomView()
|
|
|
@@ -270,62 +362,100 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
controller.memberStatusInfo?.permanent == false,
|
|
|
child: Align(
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
- child: Container(
|
|
|
+ child: Container(//top: 98.w,
|
|
|
+ alignment: Alignment.bottomCenter,
|
|
|
+ height: 190.w + MediaQuery.of(Get.context!).padding.bottom,
|
|
|
padding: EdgeInsets.only(
|
|
|
- left: 12.w, right: 12.w, top: 13.w, bottom: 20.w),
|
|
|
+ left: 12.w, right: 12.w, bottom: 17.w + MediaQuery.of(Get.context!).padding.bottom),
|
|
|
decoration: BoxDecoration(
|
|
|
- color: Colors.white,
|
|
|
- boxShadow: [
|
|
|
- BoxShadow(
|
|
|
- color: Colors.black.withOpacity(0.05),
|
|
|
- offset: Offset(0, -2),
|
|
|
- blurRadius: 4)
|
|
|
- ],
|
|
|
- borderRadius: BorderRadius.only(
|
|
|
- topLeft: Radius.circular(16.w),
|
|
|
- topRight: Radius.circular(16.w)),
|
|
|
+ gradient: LinearGradient(
|
|
|
+ begin: Alignment.bottomCenter, // 0deg 相当于从底部开始
|
|
|
+ end: Alignment.topCenter,
|
|
|
+ colors: [
|
|
|
+ Colors.white, // #FFF
|
|
|
+ "#00FFFFFF".color,
|
|
|
+ ],
|
|
|
+ stops: [0.4368, 1.0], // 对应 43.68% 和 100%
|
|
|
+ ),
|
|
|
),
|
|
|
child: Obx(() {
|
|
|
- return Row(
|
|
|
+ return Column(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.end,
|
|
|
children: [
|
|
|
- Text('¥',
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 14.sp,
|
|
|
- color: '#EA1231'.color,
|
|
|
- fontWeight: FontWeight.bold)),
|
|
|
- Text(
|
|
|
- controller.selectedGoods?.amount.divideBy100() ?? '--',
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 24.sp,
|
|
|
- color: '#EA1231'.color,
|
|
|
- fontWeight: FontWeight.bold),
|
|
|
- ),
|
|
|
- Text(
|
|
|
- ' / ${controller.selectedGoods?.name ?? '--'}',
|
|
|
- style: TextStyle(fontSize: 12.sp, color: '#000000'.color),
|
|
|
- ),
|
|
|
- Spacer(),
|
|
|
- GestureDetector(
|
|
|
- onTap: controller.onBuyClick,
|
|
|
- child: Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: ColorName.colorPrimary,
|
|
|
- borderRadius: BorderRadius.circular(100.w)),
|
|
|
- width: 164.w,
|
|
|
- height: 44.w,
|
|
|
- child: Center(
|
|
|
- child: Text(
|
|
|
- controller.memberStatusInfo?.expired == false
|
|
|
- ? StringName.memberVipRenew
|
|
|
- : StringName.memberVipUnlock,
|
|
|
+ Container(
|
|
|
+ width: double.infinity, // 设置容器宽度
|
|
|
+ height: 50.w, // 设置容器高度
|
|
|
+ padding: EdgeInsets.only(left: 20.w),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ image: DecorationImage(
|
|
|
+ image: Assets.images.iconMemberSettlementBg.provider(),
|
|
|
+ fit: BoxFit.fill,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ // 实现内阴影效果
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ Transform.translate(
|
|
|
+ offset: Offset(0, 3), // 向下偏移4像素
|
|
|
+ child: Text('¥',
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 14.sp,
|
|
|
+ color: '#FFF8EF'.color,
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
+ ),
|
|
|
+ SizedBox(width: 3.w,),
|
|
|
+ Text(
|
|
|
+ controller.selectedGoods?.amount.divideBy100() ?? '--',
|
|
|
style: TextStyle(
|
|
|
- fontSize: 15.sp,
|
|
|
- color: Colors.white,
|
|
|
+ fontSize: 24.sp,
|
|
|
+ color: '#FFF8EF'.color,
|
|
|
fontWeight: FontWeight.bold),
|
|
|
),
|
|
|
- ),
|
|
|
+ SizedBox(width: 3.w,),
|
|
|
+ Text("/",
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 12.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ color: "#FFF8EF".color),),
|
|
|
+ Text('原价${controller.selectedGoods?.originalAmount.divideBy100()}',
|
|
|
+ style: TextStyle(
|
|
|
+ decoration: TextDecoration.lineThrough,
|
|
|
+ decorationColor: Colors.white,
|
|
|
+ decorationThickness: 1.0,
|
|
|
+ fontSize: 12.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ color: "#FFF8EF".color)),
|
|
|
+ Spacer(),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: controller.onBuyClick,
|
|
|
+ child: Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ image: DecorationImage(
|
|
|
+ image: Assets.images.iconMemberSettlementConfirm.provider(),
|
|
|
+ fit: BoxFit.fill,
|
|
|
+ )
|
|
|
+ ),
|
|
|
+ // width: 164.w,
|
|
|
+ // height: 44.w,
|
|
|
+ padding: EdgeInsets.only(left: 64.w,right: 29.w),
|
|
|
+ child: Center(
|
|
|
+ child: Text(
|
|
|
+ controller.memberStatusInfo?.expired == false
|
|
|
+ ? StringName.memberVipRenew
|
|
|
+ : StringName.memberVipUnlock,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 18.sp,
|
|
|
+ color: "#9B3800".color,
|
|
|
+ fontWeight: FontWeight.bold),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
),
|
|
|
- )
|
|
|
+ ),
|
|
|
+ SizedBox(height: 8.w,),
|
|
|
+ buildPrivacyPolicyView(),
|
|
|
],
|
|
|
);
|
|
|
}),
|
|
|
@@ -352,8 +482,8 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
? controller.getUserName(controller.phone!)
|
|
|
: StringName.mineAccountGoLogin,
|
|
|
style: TextStyle(
|
|
|
- fontSize: 16.sp,
|
|
|
- color: Colors.white,
|
|
|
+ fontSize: 13.sp,
|
|
|
+ color: "#333333".color,
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
);
|
|
|
}),
|
|
|
@@ -394,7 +524,7 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
'${DateUtil.fromMillisecondsSinceEpoch('yyyy.MM.dd', controller.memberStatusInfo?.endTimestamp ?? 0)} ${StringName.memberCardExpirationDesc}';
|
|
|
}
|
|
|
return Text(desc,
|
|
|
- style: TextStyle(fontSize: 12.sp, color: Colors.white60));
|
|
|
+ style: TextStyle(fontSize: 11.sp, color: ColorName.black50,fontWeight: FontWeight.w400));
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -419,14 +549,15 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
height: 56.w,
|
|
|
child: Stack(alignment: Alignment.center, children: [
|
|
|
Positioned(
|
|
|
- left: 12.w,
|
|
|
+ left: 15.w,
|
|
|
child: GestureDetector(
|
|
|
onTap: () => controller.onPopBack(),
|
|
|
- child: Assets.images.iconWhiteBack
|
|
|
- .image(width: 24.w, height: 24.w),
|
|
|
+ child: Assets.images.iconMemberVipBack
|
|
|
+ .image(width: 26.w, height: 26..w),
|
|
|
)),
|
|
|
+
|
|
|
Container(
|
|
|
- padding: EdgeInsets.only(left: 40.w,right: 22.w),
|
|
|
+ padding: EdgeInsets.only(left: 51.w,right: 12.w),
|
|
|
child: buildVerticalSlideshowWidget())
|
|
|
]),
|
|
|
),
|
|
|
@@ -441,11 +572,11 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
children: [
|
|
|
Visibility(visible: !Platform.isIOS, child: Spacer()),
|
|
|
Container(
|
|
|
- width: 220.w,
|
|
|
- height: 24.w,
|
|
|
+ width: 192.w,
|
|
|
+ height: 26.w,
|
|
|
decoration: BoxDecoration(
|
|
|
- color: '#1F000000'.color,
|
|
|
- borderRadius: BorderRadius.circular(100.w),
|
|
|
+ color: ColorName.black40,
|
|
|
+ borderRadius: BorderRadius.circular(87.w),
|
|
|
),
|
|
|
child: Center(
|
|
|
child: AnimatedSwitcherWidget(
|
|
|
@@ -456,15 +587,23 @@ class MemberPage extends BasePage<MemberController> {
|
|
|
visible: Platform.isIOS && controller.accountRepository.isLogin.value,
|
|
|
child: GestureDetector(
|
|
|
onTap: controller.clickRecoverSubscribe,
|
|
|
- child: Row(
|
|
|
- children: [
|
|
|
- Assets.images.iconAppleRecoverSubscribe.image(width: 14.w,height: 14.w),
|
|
|
- Text(StringName.appleRecoverSubscribeTxt,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp,
|
|
|
- color: ColorName.white,
|
|
|
- fontWeight: FontWeight.w500)),
|
|
|
- ],
|
|
|
+ child: Container(
|
|
|
+ height: 26.w,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.black40,
|
|
|
+ borderRadius: BorderRadius.circular(26.w / 2.0),
|
|
|
+ ),
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 10.w),
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ Assets.images.iconAppleRecoverSubscribe.image(width: 14.w,height: 14.w),
|
|
|
+ Text(StringName.appleRecoverSubscribeTxt,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 11.sp,
|
|
|
+ color: ColorName.white,
|
|
|
+ fontWeight: FontWeight.w500)),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
)
|
|
|
)
|