|
|
|
@ -133,17 +133,19 @@ class _LoginPageState extends State<LoginPage> {
|
|
|
|
|
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) {
|
|
|
|
|
print("123123${base.data['token']}");
|
|
|
|
|
await UserTool.userProvider.setToken(base.data['token']);
|
|
|
|
|
Get.offAll(const TabNavigator());
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
_lastTap = DateTime.now();
|
|
|
|
|
var base = await apiClient.request(API.app.login,
|
|
|
|
|
data: {'phone': _phoneController.text, 'code': _smsCodeController.text});
|
|
|
|
|
if (base.code == 0) {
|
|
|
|
|
print("123123${base.data['token']}");
|
|
|
|
|
var a= await UserTool.userProvider.setToken(base.data['token']);
|
|
|
|
|
print(a);
|
|
|
|
|
print("4567899");
|
|
|
|
|
Get.offAll(const TabNavigator());
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
CloudToast.show(base.msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -220,7 +222,12 @@ class _LoginPageState extends State<LoginPage> {
|
|
|
|
|
await apiClient.request(API.app.captcha, data: {
|
|
|
|
|
'phone': _phoneController.text,
|
|
|
|
|
});
|
|
|
|
|
_beginCountDown();
|
|
|
|
|
if((_phoneController.text).isEmpty ){
|
|
|
|
|
BotToast.showText(text: "手机号不能为空");
|
|
|
|
|
}else{
|
|
|
|
|
_beginCountDown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_cantSelected) return;
|
|
|
|
|
_cantSelected = true;
|
|
|
|
|
Future.delayed(const Duration(seconds: 1), () {
|
|
|
|
|