|
@@ -6,6 +6,7 @@ import 'package:keyboard/module/store/new_discount/new_discount_controller.dart'
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:carousel_slider/carousel_slider.dart';
|
|
import 'package:carousel_slider/carousel_slider.dart';
|
|
|
import 'package:get/get.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
|
+import 'package:keyboard/widget/platform_util.dart';
|
|
|
|
|
|
|
|
import '../../../data/bean/character_info.dart';
|
|
import '../../../data/bean/character_info.dart';
|
|
|
import '../../../data/consts/payment_type.dart';
|
|
import '../../../data/consts/payment_type.dart';
|
|
@@ -57,7 +58,8 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
SizedBox(height: 16.w),
|
|
SizedBox(height: 16.w),
|
|
|
_buildGoodsCard(),
|
|
_buildGoodsCard(),
|
|
|
SizedBox(height: 12.w),
|
|
SizedBox(height: 12.w),
|
|
|
- _buildPayWayCard(),
|
|
|
|
|
|
|
+ // iOS平台,没有支付方式可以选择
|
|
|
|
|
+ if (!PlatformUtil.isIOS) _buildPayWayCard(),
|
|
|
SizedBox(height: 8.w),
|
|
SizedBox(height: 8.w),
|
|
|
_buildSelectedDesc(),
|
|
_buildSelectedDesc(),
|
|
|
SizedBox(height: 30.w),
|
|
SizedBox(height: 30.w),
|
|
@@ -91,6 +93,31 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
height: 32.w,
|
|
height: 32.w,
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
|
|
+ // iOS平台,才有恢复订阅按钮
|
|
|
|
|
+ if (PlatformUtil.isIOS)
|
|
|
|
|
+ GestureDetector(
|
|
|
|
|
+ onTap: () {
|
|
|
|
|
+ controller.clickRestore();
|
|
|
|
|
+ },
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
|
+ horizontal: 12.w,
|
|
|
|
|
+ vertical: 6.w,
|
|
|
|
|
+ ),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: ColorName.black40,
|
|
|
|
|
+ borderRadius: BorderRadius.circular(16.r),
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ StringName.recoverSubscribe,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: ColorName.white80,
|
|
|
|
|
+ fontSize: 14.sp,
|
|
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
@@ -428,7 +455,6 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
),
|
|
),
|
|
|
child: Row(
|
|
child: Row(
|
|
|
children: [
|
|
children: [
|
|
|
-
|
|
|
|
|
Text(
|
|
Text(
|
|
|
"¥",
|
|
"¥",
|
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
@@ -441,7 +467,9 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
Text(
|
|
Text(
|
|
|
- (item.code=="vip_permanent")? '${item.priceDescNumber}':'${item.amountText}',
|
|
|
|
|
|
|
+ (item.code == "vip_permanent")
|
|
|
|
|
+ ? '${item.priceDescNumber}'
|
|
|
|
|
+ : '${item.amountText}',
|
|
|
textAlign: TextAlign.center,
|
|
textAlign: TextAlign.center,
|
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
|
color:
|
|
color:
|
|
@@ -452,9 +480,9 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
fontWeight: FontWeight.w700,
|
|
fontWeight: FontWeight.w700,
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
- if (item.code=="vip_permanent")
|
|
|
|
|
|
|
+ if (item.code == "vip_permanent")
|
|
|
Text(
|
|
Text(
|
|
|
- item.priceDescUnit,
|
|
|
|
|
|
|
+ item.priceDescUnit,
|
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
|
color: Colors.black.withAlpha(153),
|
|
color: Colors.black.withAlpha(153),
|
|
|
fontSize: 12.sp,
|
|
fontSize: 12.sp,
|
|
@@ -514,7 +542,9 @@ class NewDiscountPage extends BasePage<NewDiscountController> {
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
Text(
|
|
Text(
|
|
|
- (item.code=="vip_permanent")? '${item.description}':'${item.priceDesc}',
|
|
|
|
|
|
|
+ (item.code == "vip_permanent")
|
|
|
|
|
+ ? '${item.description}'
|
|
|
|
|
+ : '${item.priceDesc}',
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
style: TextStyle(
|
|
|
color: Colors.black.withAlpha(153),
|
|
color: Colors.black.withAlpha(153),
|