feat: 修改bug
Build Windows / build (push) Has been cancelled
Build Windows / 编译 libcore (Windows) (20.15.1) (push) Has started running

This commit is contained in:
2025-11-20 06:19:05 -08:00
parent 89d13e6237
commit b442289b8a
6 changed files with 27 additions and 19 deletions
@@ -305,19 +305,24 @@ class KRLoginController extends GetxController
/// 发送验证码(仅支持邮箱)
void kr_sendCode() async {
final either = await KRAuthApi().kr_sendCode(
accountController.text,
2
); // 重置密码验证码类型为3
/*
*
* kr_loginStatus.value == KRLoginProgressStatus.kr_registerSendCode
? 2 // 注册验证码类型为2
: 3*/
if (accountController.text.isEmpty) {
KRCommonUtil.kr_showToast(AppTranslations.kr_login.enterAccount);
return;
}
int type;
final check = await KRAuthApi().kr_isRegister(accountController.text);
final result = check.fold((l) {
KRCommonUtil.kr_showToast(l.msg);
return null;
}, (isRegistered) => isRegistered ? 2 : 1);
if (result == null) return;
type = result;
final either = await KRAuthApi().kr_sendCode(accountController.text, type);
either.fold((l) {
KRCommonUtil.kr_showToast(l.msg);
}, (r) async {
/// 开始倒计时
_startCountdown();
});
}
@@ -76,10 +76,13 @@ class KRLoginView extends GetView<KRLoginController> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
Obx(() {
final _ = KRAppRunData.getInstance().kr_isLogin.value;
final email = KRAppRunData.getInstance().kr_account.value ?? '';
final account = KRAppRunData.getInstance().kr_account.value;
final isDeviceLogin = account != null && account.startsWith('9000');
if (isDeviceLogin) return const SizedBox();
return Text(
email.isNotEmpty ? email : '',
account ?? '',
style: TextStyle(
color: Colors.white,
fontSize: 20.sp,