|
|
@@ -45,43 +45,44 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
controller.clickBack();
|
|
|
},
|
|
|
child: Stack(
|
|
|
- children: [
|
|
|
- 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),
|
|
|
- ),
|
|
|
- ),
|
|
|
- width: 360.w,
|
|
|
- height: 392.w,
|
|
|
- child: SingleChildScrollView(
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- SizedBox(height: 16.w),
|
|
|
- _buildGoodsCard(),
|
|
|
- SizedBox(height: 12.w),
|
|
|
- _buildPayWayCard(),
|
|
|
- SizedBox(height: 8.w),
|
|
|
- _buildSelectedDesc(),
|
|
|
- SizedBox(height: 30.w),
|
|
|
- _buildMemberCard(),
|
|
|
+ children: [
|
|
|
+ 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),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ width: 360.w,
|
|
|
+ height: 392.w,
|
|
|
+ child: SingleChildScrollView(
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ SizedBox(height: 16.w),
|
|
|
+ _buildGoodsCard(),
|
|
|
+ SizedBox(height: 12.w),
|
|
|
+ _buildPayWayCard(),
|
|
|
+ SizedBox(height: 8.w),
|
|
|
+ _buildSelectedDesc(),
|
|
|
+ SizedBox(height: 30.w),
|
|
|
+ _buildMemberCard(),
|
|
|
|
|
|
- SizedBox(height: 200.w),
|
|
|
- ],
|
|
|
+ SizedBox(height: 200.w),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- ),
|
|
|
- Positioned(top: 0, left: 0, right: 0, child: _buildTitle()),
|
|
|
+ Positioned(top: 0, left: 0, right: 0, child: _buildTitle()),
|
|
|
|
|
|
- Positioned(bottom: 0, left: 0, right: 0, child: _buildBuyButtonCard()),
|
|
|
- ],
|
|
|
- ));
|
|
|
+ Positioned(
|
|
|
+ bottom: 0, left: 0, right: 0, child: _buildBuyButtonCard()),
|
|
|
+ ],
|
|
|
+ ));
|
|
|
}
|
|
|
|
|
|
_buildTitle() {
|
|
|
@@ -129,9 +130,9 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
),
|
|
|
|
|
|
items:
|
|
|
- controller.bannerList.map((item) {
|
|
|
- return item.image(width: 360.w, fit: BoxFit.contain);
|
|
|
- }).toList(),
|
|
|
+ controller.bannerList.map((item) {
|
|
|
+ return item.image(width: 360.w, fit: BoxFit.contain);
|
|
|
+ }).toList(),
|
|
|
),
|
|
|
Positioned(
|
|
|
bottom: 149.16.w,
|
|
|
@@ -162,36 +163,40 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
_buildIndicator() {
|
|
|
return Row(
|
|
|
children:
|
|
|
- controller.bannerList.asMap().entries.map((entry) {
|
|
|
- return Obx(() {
|
|
|
- final isSelectedBanner =
|
|
|
- controller.currentBannerIndex == entry.key;
|
|
|
- return Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
- children: [
|
|
|
- GestureDetector(
|
|
|
- onTap:
|
|
|
- () => controller.carouselSliderController.animateToPage(
|
|
|
- entry.key,
|
|
|
- ),
|
|
|
- child: AnimatedContainer(
|
|
|
- duration: const Duration(milliseconds: 300),
|
|
|
- margin: EdgeInsets.only(right: 5.w),
|
|
|
- height: 5.w,
|
|
|
- width: isSelectedBanner ? 10.w : 5.w,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color:
|
|
|
- isSelectedBanner
|
|
|
- ? const Color(0xff483459)
|
|
|
- : const Color(0xffAFB4BF),
|
|
|
- borderRadius: BorderRadius.circular(5.r),
|
|
|
- ),
|
|
|
+ controller.bannerList
|
|
|
+ .asMap()
|
|
|
+ .entries
|
|
|
+ .map((entry) {
|
|
|
+ return Obx(() {
|
|
|
+ final isSelectedBanner =
|
|
|
+ controller.currentBannerIndex == entry.key;
|
|
|
+ return Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
+ children: [
|
|
|
+ GestureDetector(
|
|
|
+ onTap:
|
|
|
+ () =>
|
|
|
+ controller.carouselSliderController.animateToPage(
|
|
|
+ entry.key,
|
|
|
),
|
|
|
+ child: AnimatedContainer(
|
|
|
+ duration: const Duration(milliseconds: 300),
|
|
|
+ margin: EdgeInsets.only(right: 5.w),
|
|
|
+ height: 5.w,
|
|
|
+ width: isSelectedBanner ? 10.w : 5.w,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color:
|
|
|
+ isSelectedBanner
|
|
|
+ ? const Color(0xff483459)
|
|
|
+ : const Color(0xffAFB4BF),
|
|
|
+ borderRadius: BorderRadius.circular(5.r),
|
|
|
),
|
|
|
- ],
|
|
|
- );
|
|
|
- });
|
|
|
- }).toList(),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }).toList(),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -209,46 +214,46 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
int rowCount = 2;
|
|
|
int startIndex = columnIndex * rowCount;
|
|
|
final List<CharacterInfo> columnItems =
|
|
|
- controller.charactersList
|
|
|
- .skip(startIndex)
|
|
|
- .take(rowCount)
|
|
|
- .toList();
|
|
|
+ controller.charactersList
|
|
|
+ .skip(startIndex)
|
|
|
+ .take(rowCount)
|
|
|
+ .toList();
|
|
|
return Column(
|
|
|
children:
|
|
|
- columnItems.map((item) {
|
|
|
- final emoji = item.emoji ?? "";
|
|
|
- final name = item.name ?? "";
|
|
|
- return Padding(
|
|
|
- padding: EdgeInsets.symmetric(
|
|
|
- vertical: 4.w,
|
|
|
- horizontal: 4.w,
|
|
|
- ),
|
|
|
- child: Container(
|
|
|
- padding: EdgeInsets.symmetric(
|
|
|
- horizontal: 12.w,
|
|
|
- vertical: 6.w,
|
|
|
- ),
|
|
|
- decoration: ShapeDecoration(
|
|
|
- color: Colors.white,
|
|
|
- shape: RoundedRectangleBorder(
|
|
|
- side: BorderSide(
|
|
|
- width: 1.w,
|
|
|
- color: const Color(0xFFF4F1FF),
|
|
|
- ),
|
|
|
- borderRadius: BorderRadius.circular(31.r),
|
|
|
- ),
|
|
|
- ),
|
|
|
- child: Text(
|
|
|
- "$emoji$name",
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.black.withAlpha(204),
|
|
|
- fontSize: 13.sp,
|
|
|
- fontWeight: FontWeight.w400,
|
|
|
- ),
|
|
|
+ columnItems.map((item) {
|
|
|
+ final emoji = item.emoji ?? "";
|
|
|
+ final name = item.name ?? "";
|
|
|
+ return Padding(
|
|
|
+ padding: EdgeInsets.symmetric(
|
|
|
+ vertical: 4.w,
|
|
|
+ horizontal: 4.w,
|
|
|
+ ),
|
|
|
+ child: Container(
|
|
|
+ padding: EdgeInsets.symmetric(
|
|
|
+ horizontal: 12.w,
|
|
|
+ vertical: 6.w,
|
|
|
+ ),
|
|
|
+ decoration: ShapeDecoration(
|
|
|
+ color: Colors.white,
|
|
|
+ shape: RoundedRectangleBorder(
|
|
|
+ side: BorderSide(
|
|
|
+ width: 1.w,
|
|
|
+ color: const Color(0xFFF4F1FF),
|
|
|
),
|
|
|
+ borderRadius: BorderRadius.circular(31.r),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ child: Text(
|
|
|
+ "$emoji$name",
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.black.withAlpha(204),
|
|
|
+ fontSize: 13.sp,
|
|
|
+ fontWeight: FontWeight.w400,
|
|
|
),
|
|
|
- );
|
|
|
- }).toList(),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }).toList(),
|
|
|
);
|
|
|
},
|
|
|
),
|
|
|
@@ -419,30 +424,30 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
width: 328.w,
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
|
|
decoration:
|
|
|
- isSelected
|
|
|
- ? BoxDecoration(
|
|
|
- borderRadius: BorderRadius.circular(16.w),
|
|
|
- image: DecorationImage(
|
|
|
- image: Assets.images.bgNewDiscountItemSelect.provider(),
|
|
|
- fit: BoxFit.fill,
|
|
|
- ),
|
|
|
- )
|
|
|
- : BoxDecoration(
|
|
|
- borderRadius: BorderRadius.circular(16.w),
|
|
|
- image: DecorationImage(
|
|
|
- image: Assets.images.bgNewDiscountItemUnselect.provider(),
|
|
|
- fit: BoxFit.fill,
|
|
|
- ),
|
|
|
- ),
|
|
|
+ isSelected
|
|
|
+ ? BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.circular(16.w),
|
|
|
+ image: DecorationImage(
|
|
|
+ image: Assets.images.bgNewDiscountItemSelect.provider(),
|
|
|
+ fit: BoxFit.fill,
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ : BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.circular(16.w),
|
|
|
+ image: DecorationImage(
|
|
|
+ image: Assets.images.bgNewDiscountItemUnselect.provider(),
|
|
|
+ fit: BoxFit.fill,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
child: Row(
|
|
|
children: [
|
|
|
Text(
|
|
|
"¥",
|
|
|
style: TextStyle(
|
|
|
color:
|
|
|
- isSelected
|
|
|
- ? const Color(0xFFFF684E)
|
|
|
- : Colors.black.withAlpha(204),
|
|
|
+ isSelected
|
|
|
+ ? const Color(0xFFFF684E)
|
|
|
+ : Colors.black.withAlpha(204),
|
|
|
fontSize: 16.sp,
|
|
|
fontWeight: FontWeight.w700,
|
|
|
),
|
|
|
@@ -454,9 +459,9 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
textAlign: TextAlign.center,
|
|
|
style: TextStyle(
|
|
|
color:
|
|
|
- isSelected
|
|
|
- ? const Color(0xFFFF684E)
|
|
|
- : Colors.black.withAlpha(204),
|
|
|
+ isSelected
|
|
|
+ ? const Color(0xFFFF684E)
|
|
|
+ : Colors.black.withAlpha(204),
|
|
|
fontSize: 29.sp,
|
|
|
fontWeight: FontWeight.w700,
|
|
|
),
|
|
|
@@ -677,27 +682,27 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
controller.isAgree.value = !controller.isAgree.value;
|
|
|
},
|
|
|
child:
|
|
|
- controller.isAgree.value
|
|
|
- ? Assets.images.iconStoreAgreePrivacy.image(
|
|
|
- width: 16.w,
|
|
|
- height: 16.w,
|
|
|
- )
|
|
|
- : SizedBox(
|
|
|
- child: Container(
|
|
|
- padding: EdgeInsets.all(1.w),
|
|
|
- width: 16.w,
|
|
|
- height: 16.w,
|
|
|
- child: Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- shape: BoxShape.circle,
|
|
|
- border: Border.all(
|
|
|
- color: Colors.black.withAlpha(153),
|
|
|
- width: 1.w,
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ controller.isAgree.value
|
|
|
+ ? Assets.images.iconStoreAgreePrivacy.image(
|
|
|
+ width: 16.w,
|
|
|
+ height: 16.w,
|
|
|
+ )
|
|
|
+ : SizedBox(
|
|
|
+ child: Container(
|
|
|
+ padding: EdgeInsets.all(1.w),
|
|
|
+ width: 16.w,
|
|
|
+ height: 16.w,
|
|
|
+ child: Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ shape: BoxShape.circle,
|
|
|
+ border: Border.all(
|
|
|
+ color: Colors.black.withAlpha(153),
|
|
|
+ width: 1.w,
|
|
|
),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
);
|
|
|
}),
|
|
|
Text.rich(
|
|
|
@@ -748,14 +753,12 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
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),
|
|
|
+ );
|
|
|
+ }),
|
|
|
],
|
|
|
),
|
|
|
);
|