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

@ -62,7 +62,11 @@ class _ForgotPsdPageState extends State<ForgotPsdPage> {
],
),
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<ForgotPsdPage> {
} else {
BotToast.showText(text: base.msg);
}
setState(() {});
}
: null,
text: '下一步'),

@ -26,7 +26,7 @@ class OtherLoginPage extends StatefulWidget {
class _OtherLoginPageState extends State<OtherLoginPage> {
PageController _controller = PageController();
List<String> _tabs = ['账号登录', '验证码登录'];
List<String> _tabs = [ '验证码登录','账号登录'];
int _currentIndex = 0;
TextEditingController _tel = TextEditingController();
TextEditingController _psd = TextEditingController();
@ -66,7 +66,7 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
Flexible(
child: PageView(
controller: _controller,
children: [_accountView(), _verificationView()],
children: [_verificationView(), _accountView()],
),
),
BottomTip(),
@ -86,6 +86,9 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
40.w.heightBox,
TelTextField(
controller: _tel,
onChange: (String) {
setState(() {});
},
),
40.w.heightBox,
PsdTextField(
@ -110,7 +113,8 @@ class _OtherLoginPageState extends State<OtherLoginPage> {
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<OtherLoginPage> {
align: MainAxisAlignment.start,
),
40.w.heightBox,
TelTextField(controller: _tel),
TelTextField(
controller: _tel,
onChange: (String) {
setState(() {});
},
),
100.w.heightBox,
LoginButtonWidget(
onTap: UserTool.appProvider.second < 60

@ -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<SelectCommunity> {
},
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,

@ -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<TelTextField> {
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
keyboardType: TextInputType.number,
controller: widget.controller,
onChanged: widget.onChange,
decoration: InputDecoration(
isDense: true,
border: InputBorder.none,

Loading…
Cancel
Save