diff --git a/lib/pages/sign/login/forgot_psd_page.dart b/lib/pages/sign/login/forgot_psd_page.dart index 69035b6b..020726d8 100644 --- a/lib/pages/sign/login/forgot_psd_page.dart +++ b/lib/pages/sign/login/forgot_psd_page.dart @@ -62,7 +62,11 @@ class _ForgotPsdPageState extends State { ], ), 144.w.heightBox, - TelTextField(controller: _telController), + TelTextField( + controller: _telController, + onChange: (content) { + setState(() {}); + }), 100.w.heightBox, LoginButtonWidget( onTap: _telController.text.isNotEmpty @@ -83,6 +87,7 @@ class _ForgotPsdPageState extends State { } else { BotToast.showText(text: base.msg); } + setState(() {}); } : null, text: '下一步'), diff --git a/lib/pages/sign/login/other_login_page.dart b/lib/pages/sign/login/other_login_page.dart index 9fdcc040..3118ca5a 100644 --- a/lib/pages/sign/login/other_login_page.dart +++ b/lib/pages/sign/login/other_login_page.dart @@ -26,7 +26,7 @@ class OtherLoginPage extends StatefulWidget { class _OtherLoginPageState extends State { PageController _controller = PageController(); - List _tabs = ['账号登录', '验证码登录']; + List _tabs = [ '验证码登录','账号登录']; int _currentIndex = 0; TextEditingController _tel = TextEditingController(); TextEditingController _psd = TextEditingController(); @@ -66,7 +66,7 @@ class _OtherLoginPageState extends State { Flexible( child: PageView( controller: _controller, - children: [_accountView(), _verificationView()], + children: [_verificationView(), _accountView()], ), ), BottomTip(), @@ -86,6 +86,9 @@ class _OtherLoginPageState extends State { 40.w.heightBox, TelTextField( controller: _tel, + onChange: (String) { + setState(() {}); + }, ), 40.w.heightBox, PsdTextField( @@ -110,7 +113,8 @@ class _OtherLoginPageState extends State { await UserTool.dataProvider.addHistories(); await UserTool.userProvider.setLogin(response.data['data']); } else { - BotToast.showText(text: response.data['message']); + // BotToast.showText(text: response.data['message']); + BotToast.showText(text: '账号尚未注册,请使用验证码登陆'); } } catch (e) { print(e.toString()); @@ -156,7 +160,12 @@ class _OtherLoginPageState extends State { align: MainAxisAlignment.start, ), 40.w.heightBox, - TelTextField(controller: _tel), + TelTextField( + controller: _tel, + onChange: (String) { + setState(() {}); + }, + ), 100.w.heightBox, LoginButtonWidget( onTap: UserTool.appProvider.second < 60 diff --git a/lib/pages/sign/login/select_community_page.dart b/lib/pages/sign/login/select_community_page.dart index 2ae1425b..a26d3796 100644 --- a/lib/pages/sign/login/select_community_page.dart +++ b/lib/pages/sign/login/select_community_page.dart @@ -1,4 +1,5 @@ import 'package:aku_new_community/constants/saas_api.dart'; +import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:aku_new_community/saas_model/login/community_model.dart'; import 'package:aku_new_community/saas_model/login/history_login_model.dart'; import 'package:aku_new_community/utils/network/net_util.dart'; @@ -12,6 +13,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:velocity_x/velocity_x.dart'; +import '../../../base/base_style.dart'; + class SelectCommunity extends StatefulWidget { const SelectCommunity({ Key? key, @@ -159,6 +162,23 @@ class _SelectCommunityState extends State { }, child: BeeScaffold( title: '选择登录小区', + actions: [ + Hero( + tag: 'event_add', + child: MaterialButton( + elevation: 0, + minWidth: 116.w, + padding: EdgeInsets.zero, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4.w), + ), + color: kPrimaryColor, + onPressed: (){Navigator.pop(context);}, + child: '提交'.text.size(34.sp).make(), + ).centered(), + ), + 32.wb, + ], body: ListView( children: [ selectCity, diff --git a/lib/pages/sign/widget/tel_text_field.dart b/lib/pages/sign/widget/tel_text_field.dart index b02af4e6..650bbc1a 100644 --- a/lib/pages/sign/widget/tel_text_field.dart +++ b/lib/pages/sign/widget/tel_text_field.dart @@ -6,7 +6,8 @@ import 'package:velocity_x/velocity_x.dart'; class TelTextField extends StatefulWidget { final TextEditingController controller; - const TelTextField({Key? key, required this.controller}) : super(key: key); + final Function(String) onChange; + const TelTextField({Key? key, required this.controller, required this.onChange}) : super(key: key); @override _TelTextFieldState createState() => _TelTextFieldState(); @@ -26,6 +27,7 @@ class _TelTextFieldState extends State { inputFormatters: [FilteringTextInputFormatter.digitsOnly], keyboardType: TextInputType.number, controller: widget.controller, + onChanged: widget.onChange, decoration: InputDecoration( isDense: true, border: InputBorder.none,