|
|
@@ -39,40 +39,49 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
Widget buildBody(BuildContext context) {
|
|
|
return Stack(
|
|
|
children: [
|
|
|
- Positioned(top: 0.w, child: _buildBanner()),
|
|
|
+ // Positioned(top: 0.w, child: _buildBanner()),
|
|
|
Positioned(
|
|
|
- top: 408.w,
|
|
|
- child: Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: ColorName.white,
|
|
|
- borderRadius: BorderRadius.only(
|
|
|
- topLeft: Radius.circular(24.r),
|
|
|
- topRight: Radius.circular(24.r),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ top: 0.w,
|
|
|
+ child: SizedBox(
|
|
|
width: 360.w,
|
|
|
- height: 392.w,
|
|
|
+ height: ScreenUtil().screenHeight,
|
|
|
child: SingleChildScrollView(
|
|
|
child: Column(
|
|
|
children: [
|
|
|
- SizedBox(height: 16.w),
|
|
|
- _buildGoodsCard(),
|
|
|
- SizedBox(height: 12.w),
|
|
|
- // iOS平台,没有支付方式可以选择
|
|
|
- if (!PlatformUtil.isIOS) _buildPayWayCard(),
|
|
|
- SizedBox(height: 8.w),
|
|
|
- _buildSelectedDesc(),
|
|
|
- SizedBox(height: 30.w),
|
|
|
- _buildMemberCard(),
|
|
|
-
|
|
|
- SizedBox(height: 200.w),
|
|
|
+ _buildBanner(),
|
|
|
+ Transform.translate(
|
|
|
+ offset: Offset(0, -20.w),
|
|
|
+ child: Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: ColorName.white,
|
|
|
+ borderRadius: BorderRadius.only(
|
|
|
+ topLeft: Radius.circular(24.r),
|
|
|
+ topRight: Radius.circular(24.r),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ width: 360.w,
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 16.w),
|
|
|
+ _buildGoodsCard(),
|
|
|
+ SizedBox(height: 12.w),
|
|
|
+ // iOS平台,没有支付方式可以选择
|
|
|
+ if (!PlatformUtil.isIOS) _buildPayWayCard(),
|
|
|
+ SizedBox(height: 8.w),
|
|
|
+ _buildSelectedDesc(),
|
|
|
+ SizedBox(height: 30.w),
|
|
|
+ _buildMemberCard(),
|
|
|
+ SizedBox(height: 200.w),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
Positioned(top: 0, left: 0, right: 0, child: _buildTitle()),
|
|
|
-
|
|
|
Positioned(bottom: 0, left: 0, right: 0, child: _buildBuyButtonCard()),
|
|
|
],
|
|
|
);
|
|
|
@@ -365,7 +374,7 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
children: [
|
|
|
GestureDetector(
|
|
|
onTap: () => controller.onGoodsItemClick(item),
|
|
|
- child: _buildGoodsItem(item, isSelected),
|
|
|
+ child: _buildGoodsItem(item, index, isSelected),
|
|
|
),
|
|
|
if (index != goodsList.length - 1) SizedBox(height: 10.w),
|
|
|
],
|
|
|
@@ -432,7 +441,15 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildGoodsItem(GoodsInfo item, bool isSelected) {
|
|
|
+ Widget _buildGoodsItem(GoodsInfo item, int index, bool isSelected) {
|
|
|
+ var amountText = item.amountText;
|
|
|
+ var priceDesc = item.priceDesc;
|
|
|
+ if (index == 0) {
|
|
|
+ if (controller.isDiscount.value) {
|
|
|
+ amountText = item.firstAmountText;
|
|
|
+ priceDesc = item.discountPriceDesc ?? "";
|
|
|
+ }
|
|
|
+ }
|
|
|
return Container(
|
|
|
height: 70.w,
|
|
|
width: 328.w,
|
|
|
@@ -469,7 +486,7 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
Text(
|
|
|
(item.code == "vip_permanent")
|
|
|
? '${item.priceDescNumber}'
|
|
|
- : '${item.amountText}',
|
|
|
+ : '$amountText',
|
|
|
textAlign: TextAlign.center,
|
|
|
style: TextStyle(
|
|
|
color:
|
|
|
@@ -544,7 +561,7 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
Text(
|
|
|
(item.code == "vip_permanent")
|
|
|
? '${item.description}'
|
|
|
- : '${item.priceDesc}',
|
|
|
+ : priceDesc,
|
|
|
|
|
|
style: TextStyle(
|
|
|
color: Colors.black.withAlpha(153),
|
|
|
@@ -621,7 +638,7 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
),
|
|
|
SizedBox(height: 8.w),
|
|
|
_buildMemberCardItem(),
|
|
|
- SizedBox(height: 28.w,),
|
|
|
+ SizedBox(height: 28.w),
|
|
|
_buildUserNotice(),
|
|
|
],
|
|
|
),
|
|
|
@@ -768,21 +785,24 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
url: WebUrl.privacyPolicy,
|
|
|
),
|
|
|
|
|
|
- ClickTextSpan(
|
|
|
- text: StringName.textSpanServiceTerms,
|
|
|
- url: WebUrl.serviceAgreement,
|
|
|
- ),
|
|
|
- TextSpan(
|
|
|
- text: StringName.textSpanAnd,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.black.withAlpha(153),
|
|
|
- fontSize: 10.sp,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
- ),
|
|
|
+ ClickTextSpan(
|
|
|
+ text: StringName.textSpanServiceTerms,
|
|
|
+ url: WebUrl.serviceAgreement,
|
|
|
+ ),
|
|
|
+ TextSpan(
|
|
|
+ text: StringName.textSpanAnd,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.black.withAlpha(153),
|
|
|
+ fontSize: 10.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ClickTextSpan(
|
|
|
+ text: StringName.textSpanMembershipAgreement,
|
|
|
+ url: WebUrl.memberServiceAgreement,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
- ClickTextSpan(text: StringName.textSpanMembershipAgreement, url: WebUrl.memberServiceAgreement)
|
|
|
- ],
|
|
|
- ),
|
|
|
),
|
|
|
],
|
|
|
);
|
|
|
@@ -791,26 +811,20 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
// 用户须知
|
|
|
Widget _buildUserNotice() {
|
|
|
return Container(
|
|
|
-
|
|
|
-
|
|
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.r)),
|
|
|
child: Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
Text('购买须知', style: Styles.getTextStyleBlack204W400(12.sp)),
|
|
|
SizedBox(height: 8.h),
|
|
|
- Text(
|
|
|
- "1.会员权益将在购买成功后自动生效,如遇延迟,请耐心等待5-10分钟。若长时间未生效,请联系客服处理;\n"
|
|
|
- "2.本服务为虚拟商品,一经购买成功即视为使用,恕不支持退款或转让,感谢您的理解;\n"
|
|
|
- "3.您的支持是我们持续优化与服务的动力,我们将竭诚为您提供更好的体验;\n"
|
|
|
- "4.相关细则以《会员服务协议》为准,在法律允许范围内,我们保留最终解释权。开通即视为同意协议条款,请谨慎购买。\n"
|
|
|
- "如有疑问,欢迎随时咨询在线客服!",
|
|
|
- style: Styles.getTextStyleBlack153W400(10.sp),
|
|
|
- ),
|
|
|
-
|
|
|
+ Obx(() {
|
|
|
+ return Text(
|
|
|
+ controller.configRepository.memberTips.value,
|
|
|
+ style: Styles.getTextStyleBlack153W400(10.sp),
|
|
|
+ );
|
|
|
+ }),
|
|
|
],
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
}
|