|
|
|
@ -42,7 +42,7 @@ class _LoginPageState extends State<LoginPage> {
|
|
|
|
|
late FocusNode _phoneFocusNode ;
|
|
|
|
|
late FocusNode _smsCodeFocusNode;
|
|
|
|
|
bool _cantSelected = false;
|
|
|
|
|
|
|
|
|
|
DateTime? _lastTap;
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
@ -129,6 +129,11 @@ class _LoginPageState extends State<LoginPage> {
|
|
|
|
|
}else if(!_chooseAgreement){
|
|
|
|
|
BotToast.showText(text: "请同意并勾选隐私政策");
|
|
|
|
|
}else{
|
|
|
|
|
if(_lastTap != null &&DateTime.now().difference(_lastTap!).inSeconds < 2){
|
|
|
|
|
BotToast.showText(text: "过快");
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
_lastTap = DateTime.now();
|
|
|
|
|
var base = await apiClient.request(API.app.login,
|
|
|
|
|
data: {'phone': _phoneController.text, 'code': _smsCodeController.text});
|
|
|
|
|
if (base.code == 0) {
|
|
|
|
@ -137,16 +142,9 @@ class _LoginPageState extends State<LoginPage> {
|
|
|
|
|
Get.offAll(const TabNavigator());
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
CloudToast.show(base.msg);
|
|
|
|
|
}
|
|
|
|
|
// if(_lastTap != null && DateTime.now().difference(_lastTap!).inSeconds < 2){
|
|
|
|
|
// BotToast.showText(text: "点太快");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// _lastTap = DateTime.now();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
text: "立即登录",
|
|
|
|
|