feat: 修改bug

This commit is contained in:
2025-11-27 03:10:47 -08:00
parent 4fdf4da4f3
commit 569f9f6d05
8 changed files with 56 additions and 70 deletions
@@ -126,4 +126,4 @@ class UserInfoCard extends StatelessWidget {
),
);
}
}
}
@@ -494,7 +494,6 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
Widget _buildAddDeviceCard() {
return GestureDetector(
onTap: () {
print('可用设备 2222');
print('可用设备 ${controller.kr_subscribeService.kr_currentSubscribe}');
// 在这里处理点击“添加设备”的逻辑
HIDialog.show(
@@ -506,7 +505,7 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
children: [
// 2. 第一个 Text 组件
Text(
'请使用邮箱登录新设备',
'请使用绑定邮箱登录新设备',
style: KrAppTextStyle(
color: Colors.black, // 可以使用稍浅
fontSize: 14.sp,
@@ -533,6 +532,14 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
],
),
),
confirmText: KRAppRunData.getInstance().isDeviceLogin() ? '前往' : null,
cancelText: '取消',
onConfirm: () {
Get.toNamed(
Routes.MR_LOGIN,
arguments: {'entry': 'bind_email'},
);
},
);
},
child: Container(
@@ -632,4 +639,4 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
return Icons.devices;
}
}
}
}
@@ -137,7 +137,7 @@ class _HISubscriptionCornerButtonState extends State<HISubscriptionCornerButton>
if(currentRoute.isEmpty) return
print('🔥 当前路由: $currentRoute');
if (currentRoute == Routes.KR_PURCHASE_MEMBERSHIP) {
if (currentRoute == Routes.KR_PURCHASE_MEMBERSHIP || currentRoute == Routes.KR_ORDER_STATUS ) {
print('🔥 已经在 KRPurchaseMembership 页面,无需跳转');
return; // 已在目标页面,直接返回
}
@@ -6,6 +6,8 @@ import 'package:kaer_with_panels/app/localization/app_translations.dart';
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import '../controllers/kr_order_status_controller.dart';
import 'package:kaer_with_panels/app/routes/app_pages.dart';
import 'package:kaer_with_panels/app/widgets/hi_base_scaffold.dart';
import 'package:kaer_with_panels/app/widgets/hi_help_entrance.dart';
/// 订单状态视图
class KROrderStatusView extends GetView<KROrderStatusController> {
@@ -13,66 +15,39 @@ class KROrderStatusView extends GetView<KROrderStatusController> {
@override
Widget build(BuildContext context) {
return Scaffold(
extendBodyBehindAppBar: true,
return HIBaseScaffold(
showBackgroundImage: false,
title: AppTranslations.kr_orderStatus.title,
backgroundColor: Theme.of(context).primaryColor,
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
leading: IconButton(
icon: Icon(
Icons.arrow_back_ios,
size: 20.r,
color: Theme.of(context).textTheme.bodyMedium?.color,
),
onPressed: () => Get.back(),
),
centerTitle: true,
title: Text(
AppTranslations.kr_orderStatus.title,
style: KrAppTextStyle(
color: Theme.of(context).textTheme.bodyMedium?.color,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
),
body: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color.fromRGBO(23, 151, 255, 0.15),
Color.fromRGBO(23, 151, 255, 0.05),
],
stops: [0.0, 0.28],
),
),
child: Obx(
() => SafeArea(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(height: 60.h),
// 状态图标
_buildStatusIcon(),
SizedBox(height: 32.h),
// 状态文本
_buildStatusText(),
SizedBox(height: 16.h),
// 描述文本
_buildDescriptionText(),
SizedBox(height: 32.h),
// 操作按钮(支付成功时显示)
if (controller.kr_isPaymentSuccess.value)
_buildSuccessButtons(),
const Spacer(),
],
topContentAreaHeight: 110,
child: Obx(
() => Stack(
children: [
Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// 状态图标
// _buildStatusIcon(),
SizedBox(height: 122.h),
// 状态文本
_buildStatusText(),
SizedBox(height: 16.h),
// 描述文本
_buildDescriptionText(),
SizedBox(height: 32.h),
// 操作按钮(支付成功时显示)
if (controller.kr_isPaymentSuccess.value)
_buildSuccessButtons(),
SizedBox(height: 100.w),
],
),
),
),
),
const HIHelpEntrance(isLight: false),
],
),
),
);
@@ -134,7 +109,7 @@ class KROrderStatusView extends GetView<KROrderStatusController> {
Get.offAllNamed(Routes.KR_HOME);
},
style: ElevatedButton.styleFrom(
backgroundColor: Colors.white,
backgroundColor: Colors.white,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.r),
@@ -27,7 +27,7 @@ class KRPurchaseMembershipView extends GetView<KRPurchaseMembershipController> {
Widget build(BuildContext context) {
return HIBaseScaffold(
showBackgroundImage: false,
title: AppTranslations.kr_purchaseMembership.purchasePackage,
title: '套餐选择',
subtitle: '*所有套餐均不限流量不限速度',
topContentAreaHeight: 110,
child: Obx(() {
@@ -676,7 +676,7 @@ class KRPurchaseMembershipView extends GetView<KRPurchaseMembershipController> {
'${controller.kr_getDiscountText(plan, discountIndex!)} OFF',
style: TextStyle(
color: Colors.black, // 白色文字更清晰
fontSize: 14.sp,
fontSize: 14,
fontWeight: FontWeight.w300,
),
textAlign: TextAlign.center,