mod: handle dispose

This commit is contained in:
bggRGjQaUbCoE
2024-08-29 17:45:41 +08:00
parent 536a2177c7
commit 33a4b408e1
43 changed files with 274 additions and 150 deletions

View File

@@ -326,14 +326,13 @@ class LoginPageController extends GetxController
String captchaKey = '';
Get.dialog(AlertDialog(
title: const Text("本次登录需要验证您的手机号"),
content: Column(
children:[
Text(accountInfo['hindTel'] ?? '未能获取手机号'),
TextField(
controller: _textFieldController,
decoration: const InputDecoration(hintText: "请输入短信验证码"),
),]),
content: Column(children: [
Text(accountInfo['hindTel'] ?? '未能获取手机号'),
TextField(
controller: _textFieldController,
decoration: const InputDecoration(hintText: "请输入短信验证码"),
),
]),
actions: <Widget>[
TextButton(
child: const Text("发送验证码 "),
@@ -349,12 +348,13 @@ class LoginPageController extends GetxController
captchaData.token = preCaptureRes['data']['recaptcha_token']!;
getCaptcha(geeGt, geeChallenge, () async {
var safeCenterSendSmsCodeRes = await LoginHttp.safeCenterSmsCode(
tmpCode: currentUri.queryParameters['tmp_token']!,
geeChallenge: geeChallenge,
geeSeccode: captchaData.seccode!,
geeValidate: captchaData.validate!,
recaptchaToken: captchaData.token!);
var safeCenterSendSmsCodeRes =
await LoginHttp.safeCenterSmsCode(
tmpCode: currentUri.queryParameters['tmp_token']!,
geeChallenge: geeChallenge,
geeSeccode: captchaData.seccode!,
geeValidate: captchaData.validate!,
recaptchaToken: captchaData.token!);
if (!safeCenterSendSmsCodeRes['status']) {
SmartDialog.showToast("发送短信验证码失败,请尝试其它登录方式\n"
"(${safeCenterSendSmsCodeRes['code']}) ${safeCenterSendSmsCodeRes['msg']}");
@@ -376,12 +376,13 @@ class LoginPageController extends GetxController
SmartDialog.showToast("请输入短信验证码");
return;
}
var safeCenterSmsVerifyRes = await LoginHttp.safeCenterSmsVerify(
code: code,
tmpCode: currentUri.queryParameters['tmp_token']!,
requestId: currentUri.queryParameters['request_id']!,
source: currentUri.queryParameters['source']!,
captchaKey: captchaKey,
var safeCenterSmsVerifyRes =
await LoginHttp.safeCenterSmsVerify(
code: code,
tmpCode: currentUri.queryParameters['tmp_token']!,
requestId: currentUri.queryParameters['request_id']!,
source: currentUri.queryParameters['source']!,
captchaKey: captchaKey,
);
if (!safeCenterSmsVerifyRes['status']) {
SmartDialog.showToast("验证短信验证码失败,请尝试其它登录方式\n"
@@ -396,7 +397,6 @@ class LoginPageController extends GetxController
],
));
return;
}
if (data['token_info'] == null || data['cookie_info'] == null) {