|
|
@ -39,7 +39,7 @@ class _LoginPageState extends State<LoginPage> {
|
|
|
|
int _countDownNum = 59;
|
|
|
|
int _countDownNum = 59;
|
|
|
|
late TextEditingController _phoneController;
|
|
|
|
late TextEditingController _phoneController;
|
|
|
|
late TextEditingController _smsCodeController;
|
|
|
|
late TextEditingController _smsCodeController;
|
|
|
|
late FocusNode _phoneFocusNode;
|
|
|
|
late FocusNode _phoneFocusNode ;
|
|
|
|
late FocusNode _smsCodeFocusNode;
|
|
|
|
late FocusNode _smsCodeFocusNode;
|
|
|
|
bool _cantSelected = false;
|
|
|
|
bool _cantSelected = false;
|
|
|
|
|
|
|
|
|
|
|
@ -63,8 +63,8 @@ class _LoginPageState extends State<LoginPage> {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
void dispose() {
|
|
|
|
_phoneFocusNode.dispose();
|
|
|
|
_phoneFocusNode.unfocus();
|
|
|
|
_smsCodeFocusNode.dispose();
|
|
|
|
_smsCodeFocusNode.unfocus();
|
|
|
|
_phoneController.dispose();
|
|
|
|
_phoneController.dispose();
|
|
|
|
_smsCodeController.dispose();
|
|
|
|
_smsCodeController.dispose();
|
|
|
|
super.dispose();
|
|
|
|
super.dispose();
|
|
|
@ -132,7 +132,7 @@ class _LoginPageState extends State<LoginPage> {
|
|
|
|
data: {'phone': _phoneController.text, 'code': _smsCodeController.text});
|
|
|
|
data: {'phone': _phoneController.text, 'code': _smsCodeController.text});
|
|
|
|
if (base.code == 0) {
|
|
|
|
if (base.code == 0) {
|
|
|
|
await UserTool.userProvider.setToken(base.data['token']);
|
|
|
|
await UserTool.userProvider.setToken(base.data['token']);
|
|
|
|
Get.to(() => const TabNavigator());
|
|
|
|
Get.offAll(() => const TabNavigator());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
CloudToast.show(base.msg);
|
|
|
|
CloudToast.show(base.msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|