feat: 修改bug
This commit is contained in:
parent
4fdf4da4f3
commit
569f9f6d05
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
),
|
||||
),
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user