feat: 增加ios支付&ui修改

This commit is contained in:
speakeloudest 2025-12-09 07:23:26 -08:00
parent ca913eb38f
commit f70b32ec3f
2 changed files with 94 additions and 95 deletions

View File

@ -872,6 +872,7 @@ class KRPurchaseMembershipController extends GetxController {
label: 'Hi快VPN 服务',
amount: kr_getPlanPrice(
kr_plans[kr_selectedPlanIndex.value],
discountIndex: kr_selectedDiscountIndex.value
).toStringAsFixed(2),
),
],

View File

@ -47,102 +47,100 @@ class KRPurchaseMembershipView extends GetView<KRPurchaseMembershipController>
padding: const EdgeInsets.only(left: 20),
child: Stack(
children: [
Padding(
padding: EdgeInsets.only(bottom: 80.0),
child: Obx(() => SingleChildScrollView(
child: Column(
children: [
/*_kr_buildAccountSection(context),*/
if (controller.kr_isLoading.value)
Container(
height:
MediaQuery.of(context).size.height * 0.5,
child: Center(
child: KRSimpleLoading(
color: Colors.white,
size: 50.0,
),
),
)
else if (controller.kr_plans.isEmpty)
Container(
height:
MediaQuery.of(context).size.height * 0.5,
child: Center(
child: Text(
AppTranslations
.kr_purchaseMembership.noData,
style: KrAppTextStyle(
fontSize: 14,
color: Theme.of(context)
.textTheme
.bodyMedium
?.color,
),
),
),
)
else
Container(
margin: EdgeInsets.only(
left: 40.0 - 20, right: 40.0),
child: Column(
children: [
//
Container(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Column(
// 使 List.generate
children: List.generate(
controller.kr_getTotalOptionsCount(
controller.kr_plans[controller
.kr_selectedPlanIndex
.value]),
(index) {
final plan = controller
.kr_plans[
controller
.kr_selectedPlanIndex
.value];
final discountIndex =
plan.kr_discount.isEmpty
? null
: index;
// 使 Padding mainAxisSpacing
return Padding(
padding: EdgeInsets.only(
bottom: 8.0),
child: SizedBox(
height: 130.0,
child:
_kr_buildPlanOptionCard(
plan,
controller
.kr_selectedPlanIndex
.value,
discountIndex,
context,
index,
),
),
);
},
),
),
],
),
),
],
Obx(() {
return Positioned.fill(
bottom: 90.0,
child: SingleChildScrollView(
child: Column(
children: [
/*_kr_buildAccountSection(context),*/
if (controller.kr_isLoading.value)
Container(
height: MediaQuery.of(context).size.height * 0.5,
child: Center(
child: KRSimpleLoading(
color: Colors.white,
size: 50.0,
),
),
],
),
)),
),
)
else if (controller.kr_plans.isEmpty)
Container(
height: MediaQuery.of(context).size.height * 0.5,
child: Center(
child: Text(
AppTranslations.kr_purchaseMembership.noData,
style: KrAppTextStyle(
fontSize: 14,
color: Theme.of(context)
.textTheme
.bodyMedium
?.color,
),
),
),
)
else
Container(
margin:
EdgeInsets.only(left: 40.0 - 20, right: 40.0),
child: Column(
children: [
//
Container(
padding: EdgeInsets.all(0.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Column(
// 使 List.generate
children: List.generate(
controller.kr_getTotalOptionsCount(
controller.kr_plans[controller
.kr_selectedPlanIndex
.value]),
(index) {
final plan = controller.kr_plans[
controller
.kr_selectedPlanIndex
.value];
final discountIndex =
plan.kr_discount.isEmpty
? null
: index;
// 使 Padding mainAxisSpacing
return Padding(
padding: EdgeInsets.only(
bottom: 8.0),
child: SizedBox(
height: 130.0,
child:
_kr_buildPlanOptionCard(
plan,
controller
.kr_selectedPlanIndex
.value,
discountIndex,
context,
index,
),
),
);
},
),
),
],
),
),
],
),
),
],
),
),
);
}),
Positioned(
top: 160.0, //
right: 10.0, // 20.w
@ -151,7 +149,7 @@ class KRPurchaseMembershipView extends GetView<KRPurchaseMembershipController>
imageType: ImageType.svg,
),
),
const HIHelpEntrance(isLight: false)
const HIHelpEntrance(isLight: false)
],
),
),