优化支付后流程

This commit is contained in:
Rust 2025-10-22 17:51:22 +08:00
parent 2e7e85fb27
commit db247d253b

View File

@ -63,6 +63,10 @@ class KROrderStatusView extends GetView<KROrderStatusController> {
SizedBox(height: 16.h),
//
_buildDescriptionText(),
SizedBox(height: 32.h),
//
if (controller.kr_isPaymentSuccess.value)
_buildSuccessButtons(),
const Spacer(),
],
),
@ -112,4 +116,73 @@ class KROrderStatusView extends GetView<KROrderStatusController> {
),
);
}
///
Widget _buildSuccessButtons() {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: Column(
children: [
//
SizedBox(
width: double.infinity,
height: 48.h,
child: ElevatedButton(
onPressed: () {
//
Get.offAllNamed('/');
},
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(Get.context!).primaryColor,
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.r),
),
elevation: 0,
),
child: Text(
AppTranslations.kr_orderStatus.backToHome ?? '返回首页',
style: KrAppTextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
),
SizedBox(height: 12.h),
//
SizedBox(
width: double.infinity,
height: 48.h,
child: OutlinedButton(
onPressed: () {
//
Get.offAllNamed('/');
// 线tab
},
style: OutlinedButton.styleFrom(
foregroundColor: Theme.of(Get.context!).primaryColor,
side: BorderSide(
color: Theme.of(Get.context!).primaryColor,
width: 1.5,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.r),
),
),
child: Text(
AppTranslations.kr_orderStatus.viewSubscription ?? '查看订阅',
style: KrAppTextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
color: Theme.of(Get.context!).primaryColor,
),
),
),
),
],
),
);
}
}