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

@ -494,7 +494,6 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
Widget _buildAddDeviceCard() { Widget _buildAddDeviceCard() {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
print('可用设备 2222');
print('可用设备 ${controller.kr_subscribeService.kr_currentSubscribe}'); print('可用设备 ${controller.kr_subscribeService.kr_currentSubscribe}');
// //
HIDialog.show( HIDialog.show(
@ -506,7 +505,7 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
children: [ children: [
// 2. Text // 2. Text
Text( Text(
'请使用邮箱登录新设备', '请使用绑定邮箱登录新设备',
style: KrAppTextStyle( style: KrAppTextStyle(
color: Colors.black, // 使 color: Colors.black, // 使
fontSize: 14.sp, 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( child: Container(

View File

@ -137,7 +137,7 @@ class _HISubscriptionCornerButtonState extends State<HISubscriptionCornerButton>
if(currentRoute.isEmpty) return if(currentRoute.isEmpty) return
print('🔥 当前路由: $currentRoute'); print('🔥 当前路由: $currentRoute');
if (currentRoute == Routes.KR_PURCHASE_MEMBERSHIP) { if (currentRoute == Routes.KR_PURCHASE_MEMBERSHIP || currentRoute == Routes.KR_ORDER_STATUS ) {
print('🔥 已经在 KRPurchaseMembership 页面,无需跳转'); print('🔥 已经在 KRPurchaseMembership 页面,无需跳转');
return; // 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 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
import '../controllers/kr_order_status_controller.dart'; import '../controllers/kr_order_status_controller.dart';
import 'package:kaer_with_panels/app/routes/app_pages.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> { class KROrderStatusView extends GetView<KROrderStatusController> {
@ -13,66 +15,39 @@ class KROrderStatusView extends GetView<KROrderStatusController> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return HIBaseScaffold(
extendBodyBehindAppBar: true, showBackgroundImage: false,
title: AppTranslations.kr_orderStatus.title,
backgroundColor: Theme.of(context).primaryColor, backgroundColor: Theme.of(context).primaryColor,
appBar: AppBar( topContentAreaHeight: 110,
backgroundColor: Colors.transparent, child: Obx(
elevation: 0, () => Stack(
leading: IconButton( children: [
icon: Icon( Center(
Icons.arrow_back_ios, child: Padding(
size: 20.r, padding: EdgeInsets.symmetric(horizontal: 24.w),
color: Theme.of(context).textTheme.bodyMedium?.color, child: Column(
), mainAxisAlignment: MainAxisAlignment.center,
onPressed: () => Get.back(), children: [
), //
centerTitle: true, // _buildStatusIcon(),
title: Text( SizedBox(height: 122.h),
AppTranslations.kr_orderStatus.title, //
style: KrAppTextStyle( _buildStatusText(),
color: Theme.of(context).textTheme.bodyMedium?.color, SizedBox(height: 16.h),
fontSize: 16, //
fontWeight: FontWeight.w500, _buildDescriptionText(),
), SizedBox(height: 32.h),
), //
), if (controller.kr_isPaymentSuccess.value)
body: Container( _buildSuccessButtons(),
decoration: BoxDecoration( SizedBox(height: 100.w),
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(),
],
), ),
), ),
), const HIHelpEntrance(isLight: false),
],
), ),
), ),
); );
@ -134,7 +109,7 @@ class KROrderStatusView extends GetView<KROrderStatusController> {
Get.offAllNamed(Routes.KR_HOME); Get.offAllNamed(Routes.KR_HOME);
}, },
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: Colors.white, backgroundColor: Colors.white,
foregroundColor: Colors.white, foregroundColor: Colors.white,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.r), borderRadius: BorderRadius.circular(12.r),

View File

@ -27,7 +27,7 @@ class KRPurchaseMembershipView extends GetView<KRPurchaseMembershipController> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return HIBaseScaffold( return HIBaseScaffold(
showBackgroundImage: false, showBackgroundImage: false,
title: AppTranslations.kr_purchaseMembership.purchasePackage, title: '套餐选择',
subtitle: '*所有套餐均不限流量不限速度', subtitle: '*所有套餐均不限流量不限速度',
topContentAreaHeight: 110, topContentAreaHeight: 110,
child: Obx(() { child: Obx(() {
@ -676,7 +676,7 @@ class KRPurchaseMembershipView extends GetView<KRPurchaseMembershipController> {
'${controller.kr_getDiscountText(plan, discountIndex!)} OFF', '${controller.kr_getDiscountText(plan, discountIndex!)} OFF',
style: TextStyle( style: TextStyle(
color: Colors.black, // color: Colors.black, //
fontSize: 14.sp, fontSize: 14,
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,

View File

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

View File

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

View File

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