feat: 增加发送验证码的样式,调试设备限制数量

This commit is contained in:
speakeloudest 2025-11-28 01:25:20 -08:00
parent 55d7508807
commit c058c2cea6
6 changed files with 24 additions and 14 deletions

View File

@ -39,7 +39,7 @@ class HIMenuView extends GetView<HIMenuController> {
Obx(() { Obx(() {
final account = KRAppRunData.getInstance().kr_account.value; final account = KRAppRunData.getInstance().kr_account.value;
final isDeviceLogin = account != null && account.startsWith('9000'); final isDeviceLogin = account != null && account.startsWith('9000');
final accountText = isDeviceLogin ? '待绑定' : 'ID: ${KRAppRunData.getInstance().kr_account.value.toString()}'; final accountText = isDeviceLogin ? '待绑定' : '${KRAppRunData.getInstance().kr_account.value.toString()}';
return UserInfoCard( return UserInfoCard(
controller: controller, controller: controller,
userId: accountText, userId: accountText,

View File

@ -77,7 +77,7 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
account.startsWith('9000'); account.startsWith('9000');
final accountText = isDeviceLogin final accountText = isDeviceLogin
? '待绑定' ? '待绑定'
: 'ID: ${KRAppRunData.getInstance().kr_account.value.toString()}'; : '${KRAppRunData.getInstance().kr_account.value.toString()}';
return Text( return Text(
accountText, accountText,
style: TextStyle( style: TextStyle(
@ -494,19 +494,11 @@ class HIUserInfoView extends GetView<HIUserInfoController> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
) )
/*Obx(() {
// final current = controller.kr_subscribeService.kr_currentSubscribe.value;
// current null 0
// final deviceLimit = current?.deviceLimit ?? 0;
return
}),*/
], ],
), ),
), ),
confirmText: KRAppRunData.getInstance().isDeviceLogin() ? '前往' : null, confirmText: KRAppRunData.getInstance().isDeviceLogin() ? '前往' : null,
cancelText: '取消', cancelText: KRAppRunData.getInstance().isDeviceLogin() ? '取消' : null,
onConfirm: () { onConfirm: () {
Get.toNamed( Get.toNamed(
Routes.MR_LOGIN, Routes.MR_LOGIN,

View File

@ -6,6 +6,7 @@ import 'package:kaer_with_panels/app/model/enum/kr_request_type.dart';
import 'package:kaer_with_panels/app/services/api_service/kr_auth_api.dart'; import 'package:kaer_with_panels/app/services/api_service/kr_auth_api.dart';
import 'package:kaer_with_panels/app/utils/kr_common_util.dart'; import 'package:kaer_with_panels/app/utils/kr_common_util.dart';
import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart'; import 'package:kaer_with_panels/app/services/kr_subscribe_service.dart';
import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart';
import '../../../localization/app_translations.dart'; import '../../../localization/app_translations.dart';
@ -65,6 +66,11 @@ class KRDeleteAccountController extends GetxController {
KRCommonUtil.kr_showToast(error.msg); KRCommonUtil.kr_showToast(error.msg);
}, },
(success) { (success) {
HIDialog.show(
title: '*重要提示',
message:
'验证邮件已发送至邮箱,如无法找到,请检查垃圾邮件箱或营销邮件箱。',
);
kr_canSendCode.value = false; kr_canSendCode.value = false;
kr_countdown.value = 60; kr_countdown.value = 60;

View File

@ -136,7 +136,7 @@ class KRDeleteAccountView extends GetView<KRDeleteAccountController> {
account.startsWith('9000'); account.startsWith('9000');
final accountText = isDeviceLogin final accountText = isDeviceLogin
? '待绑定' ? '待绑定'
: 'ID: ${KRAppRunData.getInstance().kr_account.value.toString()}'; : '${KRAppRunData.getInstance().kr_account.value.toString()}';
return Text( return Text(
accountText, accountText,
style: TextStyle( style: TextStyle(

View File

@ -326,6 +326,12 @@ class KRLoginController extends GetxController
either.fold((l) { either.fold((l) {
KRCommonUtil.kr_showToast(l.msg); KRCommonUtil.kr_showToast(l.msg);
}, (r) async { }, (r) async {
HIDialog.show(
title: '*重要提示',
message:
'验证邮件已发送至邮箱,如无法找到,请检查垃圾邮件箱或营销邮件箱。',
);
_startCountdown(); _startCountdown();
}); });
} }
@ -388,7 +394,13 @@ class KRLoginController extends GetxController
); );
either.fold( either.fold(
(l) => KRCommonUtil.kr_showToast(l.msg), (l) {
HIDialog.show(
message: l.msg,
preventBackDismiss: true,
confirmText: '确定',
);
},
(r) async { (r) async {
_saveLoginData(r); _saveLoginData(r);
KRCommonUtil.kr_showToast('登录成功'); KRCommonUtil.kr_showToast('登录成功');

View File

@ -86,7 +86,7 @@ class KRLoginView extends GetView<KRLoginController> {
account.startsWith('9000'); account.startsWith('9000');
final accountText = isDeviceLogin final accountText = isDeviceLogin
? '待绑定' ? '待绑定'
: 'ID: ${KRAppRunData.getInstance().kr_account.value.toString()}'; : '${KRAppRunData.getInstance().kr_account.value.toString()}';
return Text( return Text(
accountText, accountText,