|
|
@ -26,7 +26,7 @@ class OtherLoginPage extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
|
|
class _OtherLoginPageState extends State<OtherLoginPage> {
|
|
|
|
class _OtherLoginPageState extends State<OtherLoginPage> {
|
|
|
|
PageController _controller = PageController();
|
|
|
|
PageController _controller = PageController();
|
|
|
|
List<String> _tabs = ['账号登录', '验证码登录'];
|
|
|
|
List<String> _tabs = [ '验证码登录','账号登录'];
|
|
|
|
int _currentIndex = 0;
|
|
|
|
int _currentIndex = 0;
|
|
|
|
TextEditingController _tel = TextEditingController();
|
|
|
|
TextEditingController _tel = TextEditingController();
|
|
|
|
TextEditingController _psd = TextEditingController();
|
|
|
|
TextEditingController _psd = TextEditingController();
|
|
|
@ -66,7 +66,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
|
|
|
Flexible(
|
|
|
|
Flexible(
|
|
|
|
child: PageView(
|
|
|
|
child: PageView(
|
|
|
|
controller: _controller,
|
|
|
|
controller: _controller,
|
|
|
|
children: [_accountView(), _verificationView()],
|
|
|
|
children: [_verificationView(), _accountView()],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
BottomTip(),
|
|
|
|
BottomTip(),
|
|
|
@ -86,6 +86,9 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
|
|
|
40.w.heightBox,
|
|
|
|
40.w.heightBox,
|
|
|
|
TelTextField(
|
|
|
|
TelTextField(
|
|
|
|
controller: _tel,
|
|
|
|
controller: _tel,
|
|
|
|
|
|
|
|
onChange: (String) {
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
40.w.heightBox,
|
|
|
|
40.w.heightBox,
|
|
|
|
PsdTextField(
|
|
|
|
PsdTextField(
|
|
|
@ -110,7 +113,8 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
|
|
|
await UserTool.dataProvider.addHistories();
|
|
|
|
await UserTool.dataProvider.addHistories();
|
|
|
|
await UserTool.userProvider.setLogin(response.data['data']);
|
|
|
|
await UserTool.userProvider.setLogin(response.data['data']);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
BotToast.showText(text: response.data['message']);
|
|
|
|
// BotToast.showText(text: response.data['message']);
|
|
|
|
|
|
|
|
BotToast.showText(text: '账号尚未注册,请使用验证码登陆');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
print(e.toString());
|
|
|
|
print(e.toString());
|
|
|
@ -156,7 +160,12 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
|
|
|
|
align: MainAxisAlignment.start,
|
|
|
|
align: MainAxisAlignment.start,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
40.w.heightBox,
|
|
|
|
40.w.heightBox,
|
|
|
|
TelTextField(controller: _tel),
|
|
|
|
TelTextField(
|
|
|
|
|
|
|
|
controller: _tel,
|
|
|
|
|
|
|
|
onChange: (String) {
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
100.w.heightBox,
|
|
|
|
100.w.heightBox,
|
|
|
|
LoginButtonWidget(
|
|
|
|
LoginButtonWidget(
|
|
|
|
onTap: UserTool.appProvider.second < 60
|
|
|
|
onTap: UserTool.appProvider.second < 60
|
|
|
|