feat: 修改bug

This commit is contained in:
speakeloudest 2025-11-27 03:10:47 -08:00
parent 4fdf4da4f3
commit 569f9f6d05
8 changed files with 56 additions and 70 deletions

View File

@ -126,4 +126,4 @@ class UserInfoCard extends StatelessWidget {
),
);
}
}
}

View File

@ -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;
}
}
}
}

View File

@ -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; //
}

View File

@ -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),

View File

@ -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,

View File

@ -110,7 +110,7 @@ class SlideTransparentTransition extends CustomTransition {
SlideTransparentTransition({
this.direction = SlideDirection.rightToLeft,
this.duration = const Duration(milliseconds: 4000),
this.duration = const Duration(milliseconds: 2000),
});
@override

View File

@ -42,6 +42,8 @@ class HIBaseScaffold extends StatelessWidget {
///
final bool showBackgroundImage;
final Color? backgroundColor;
/// resizeToAvoidBottomInset
final bool? resizeToAvoidBottomInset;
@ -59,6 +61,7 @@ class HIBaseScaffold extends StatelessWidget {
this.showBackgroundImage = true,
this.topContentAreaHeight = 120.0,
this.resizeToAvoidBottomInset = false,
this.backgroundColor,
});
@override
@ -71,7 +74,7 @@ class HIBaseScaffold extends StatelessWidget {
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
backgroundColor: showBackgroundImage
? Colors.transparent
: Theme.of(context).scaffoldBackgroundColor,
: (backgroundColor ?? Theme.of(context).scaffoldBackgroundColor),
appBar: AppBar(
backgroundColor: Colors.transparent,
toolbarHeight: 0.0,
@ -152,7 +155,7 @@ class HIBaseScaffold extends StatelessWidget {
if (title != null || subtitle != null)
Positioned(
top: topPadding +
(showBack ? 12.w : 20.w), //
(showBack ? 8 : 20), //
left: 0,
right: 0,
child: Column(
@ -164,7 +167,7 @@ class HIBaseScaffold extends StatelessWidget {
title!,
style: TextStyle(
color: Colors.black, // 使
fontSize: 24.sp,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
@ -175,7 +178,7 @@ class HIBaseScaffold extends StatelessWidget {
subtitle!,
style: TextStyle(
color: Colors.black, // 使
fontSize: 14.sp,
fontSize: 14,
fontWeight: FontWeight.w100,
),
),

View File

@ -175,6 +175,7 @@ Widget _myApp(GetxTranslations translations, Locale initialLocale) {
Routes.HI_MENU,
Routes.KR_HOME,
Routes.HI_USER_INFO,
Routes.KR_ORDER_STATUS,
];
print('routing.current${routing.current}');
GlobalOverlayService.instance.updateSubscriptionButtonColor(null);