pull/1/head
张萌 3 years ago
commit 59abb6e51c

@ -62,7 +62,11 @@ class _ForgotPsdPageState extends State<ForgotPsdPage> {
], ],
), ),
144.w.heightBox, 144.w.heightBox,
TelTextField(controller: _telController), TelTextField(
controller: _telController,
onChange: (content) {
setState(() {});
}),
100.w.heightBox, 100.w.heightBox,
LoginButtonWidget( LoginButtonWidget(
onTap: _telController.text.isNotEmpty onTap: _telController.text.isNotEmpty
@ -83,6 +87,7 @@ class _ForgotPsdPageState extends State<ForgotPsdPage> {
} else { } else {
BotToast.showText(text: base.msg); BotToast.showText(text: base.msg);
} }
setState(() {});
} }
: null, : null,
text: '下一步'), text: '下一步'),

@ -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

@ -1,4 +1,5 @@
import 'package:aku_new_community/constants/saas_api.dart'; 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/community_model.dart';
import 'package:aku_new_community/saas_model/login/history_login_model.dart'; import 'package:aku_new_community/saas_model/login/history_login_model.dart';
import 'package:aku_new_community/utils/network/net_util.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:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import '../../../base/base_style.dart';
class SelectCommunity extends StatefulWidget { class SelectCommunity extends StatefulWidget {
const SelectCommunity({ const SelectCommunity({
Key? key, Key? key,
@ -159,6 +162,23 @@ class _SelectCommunityState extends State<SelectCommunity> {
}, },
child: BeeScaffold( child: BeeScaffold(
title: '选择登录小区', 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( body: ListView(
children: [ children: [
selectCity, selectCity,

@ -6,7 +6,8 @@ import 'package:velocity_x/velocity_x.dart';
class TelTextField extends StatefulWidget { class TelTextField extends StatefulWidget {
final TextEditingController controller; 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 @override
_TelTextFieldState createState() => _TelTextFieldState(); _TelTextFieldState createState() => _TelTextFieldState();
@ -26,6 +27,7 @@ class _TelTextFieldState extends State<TelTextField> {
inputFormatters: [FilteringTextInputFormatter.digitsOnly], inputFormatters: [FilteringTextInputFormatter.digitsOnly],
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
controller: widget.controller, controller: widget.controller,
onChanged: widget.onChange,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
border: InputBorder.none, border: InputBorder.none,

Loading…
Cancel
Save