更新登陆逻辑

hmxc
小赖 4 years ago
parent de64e687bf
commit bdd27c8591

@ -1,7 +1,10 @@
import 'dart:math';
import 'package:akuCommunity/pages/setting_page/agreement_page/agreement_page.dart'; import 'package:akuCommunity/pages/setting_page/agreement_page/agreement_page.dart';
import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart'; import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart';
import 'package:akuCommunity/pages/sign/user_authentication_page.dart'; import 'package:akuCommunity/pages/sign/user_authentication_page.dart';
import 'package:ani_route/ani_route.dart'; import 'package:ani_route/ani_route.dart';
import 'package:flustars/flustars.dart' show TextUtil;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
@ -124,8 +127,27 @@ class _SignInPageState extends State<SignInPage> {
InkWell _inkWellLogin() { InkWell _inkWellLogin() {
return InkWell( return InkWell(
onTap: () { onTap: () {
(_phone.text=='17855823545')&&(_code.text=='000000')? if (TextUtil.isEmpty(_phone.text))
ARoute.push(context, UserAuthenticationPage()):showToast('账号或验证码错误!'); showToast('账号不能为空');
else if (TextUtil.isEmpty(_code.text))
showToast('密码不能为空');
else {
showDialog(
context: context,
child: Center(
child: CupertinoActivityIndicator(),
),
);
Future.delayed(
Duration(milliseconds: 1000 + Random().nextInt(500)),
() {
Navigator.pop(context);
(_phone.text == '17855823545') && (_code.text == '000000')
? ARoute.push(context, UserAuthenticationPage())
: showToast('账号或验证码错误!');
},
);
}
}, },
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.2+3 version: 1.0.4+5
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save