From 9a1fad9b0a99d0d40e465fdc94bf39225cb9de58 Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 25 Aug 2024 13:48:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=99=BB=E5=BD=95=E9=A3=8E=E6=8E=A7?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=BB=A7=E7=BB=AD=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/http/login.dart | 2 +- lib/pages/login/controller.dart | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/http/login.dart b/lib/http/login.dart index c2d4d3cf0..4327bbfa6 100644 --- a/lib/http/login.dart +++ b/lib/http/login.dart @@ -355,7 +355,7 @@ class LoginHttp { required String tmpCode, }) async { var res = await Request().get(Api.safeCenterGetInfo, data: { - tmpCode: tmpCode, + 'tmp_code': tmpCode, }); print(res); if (res.data['code'] == 0) { diff --git a/lib/pages/login/controller.dart b/lib/pages/login/controller.dart index 517c547d0..187d7a691 100644 --- a/lib/pages/login/controller.dart +++ b/lib/pages/login/controller.dart @@ -310,6 +310,7 @@ class LoginPageController extends GetxController Uri currentUri = Uri.parse(Url); var safeCenterRes = await LoginHttp.safeCenterGetInfo( tmpCode: currentUri.queryParameters['tmp_token']!); + //{"code":0,"message":"0","ttl":1,"data":{"account_info":{"hide_tel":"111*****111","hide_mail":"aaa*****aaaa.aaa","bind_mail":true,"bind_tel":true,"tel_verify":true,"mail_verify":true,"unneeded_check":false,"bind_safe_question":false,"mid":1111111},"member_info":{"nickname":"xxxxxxx","face":"https://i0.hdslb.com/bfs/face/xxxxxxx.jpg","realname_status":false},"sns_info":{"bind_google":false,"bind_fb":false,"bind_apple":false,"bind_qq":true,"bind_weibo":true,"bind_wechat":false},"account_safe":{"score":80}}} if (!safeCenterRes['status']) { SmartDialog.showToast("获取安全验证信息失败,请尝试其它登录方式\n" "(${safeCenterRes['code']}) ${safeCenterRes['msg']}"); @@ -317,9 +318,9 @@ class LoginPageController extends GetxController } Map accountInfo = { "telVerify": safeCenterRes['data']['account_info']!['tel_verify'], - "bindTel": safeCenterRes['data']['account_info']!["bind_tel"], + "hindTel": safeCenterRes['data']['account_info']!["hide_tel"], "mailVerify": safeCenterRes['data']['account_info']!['mailVerify'], - "bindMail": safeCenterRes['data']['account_info']!["bind_mail"], + "hindMail": safeCenterRes['data']['account_info']!["hide_mail"], }; TextEditingController _textFieldController = TextEditingController(); String captchaKey = ''; @@ -327,7 +328,7 @@ class LoginPageController extends GetxController title: const Text("本次登录需要验证您的手机号"), content: Column( children:[ - Text(accountInfo['bindTel'] ?? '未能获取手机号'), + Text(accountInfo['hindTel'] ?? '未能获取手机号'), TextField( controller: _textFieldController, decoration: const InputDecoration(hintText: "请输入短信验证码"),