|
|
|
@ -1,17 +1,19 @@
|
|
|
|
|
import 'dart:math';
|
|
|
|
|
import 'dart:ui';
|
|
|
|
|
|
|
|
|
|
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/sign/user_authentication_page.dart';
|
|
|
|
|
import 'package:ani_route/ani_route.dart';
|
|
|
|
|
import 'package:extended_text/extended_text.dart';
|
|
|
|
|
import 'package:flustars/flustars.dart' show TextUtil;
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:akuCommunity/utils/screenutil.dart';
|
|
|
|
|
import 'package:akuCommunity/base/base_style.dart';
|
|
|
|
|
import 'package:akuCommunity/base/assets_image.dart';
|
|
|
|
|
import 'package:flutter_screenutil/screenutil.dart';
|
|
|
|
|
import 'package:oktoast/oktoast.dart';
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
|
|
|
|
|
class SignInPage extends StatefulWidget {
|
|
|
|
|
SignInPage({Key key}) : super(key: key);
|
|
|
|
@ -133,21 +135,39 @@ class _SignInPageState extends State<SignInPage> {
|
|
|
|
|
else if (TextUtil.isEmpty(_code.text))
|
|
|
|
|
showToast('密码不能为空');
|
|
|
|
|
else {
|
|
|
|
|
showDialog(
|
|
|
|
|
showCupertinoDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: CupertinoActivityIndicator(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
builder: (context) {
|
|
|
|
|
return CupertinoAlertDialog(
|
|
|
|
|
title: Text('点击登录即表示您已阅读并同意'),
|
|
|
|
|
content: Text(
|
|
|
|
|
'''点击登录即表示您已阅读并同意《闲鱼用户服务协议》《支付服务协议》(特别是免除或限制责任、管辖等粗体下划线标注的条款)。如您不同意上述协议的任何条款,您应立即停止登录及使用本软件及服务。'''),
|
|
|
|
|
actions: [
|
|
|
|
|
CupertinoDialogAction(
|
|
|
|
|
child: Text('同意'),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Future.delayed(
|
|
|
|
|
Duration(milliseconds: 1000 + Random().nextInt(500)),
|
|
|
|
|
() {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
(_phone.text == '17855823545') && (_code.text == '000000')
|
|
|
|
|
(_phone.text == '17855823545') &&
|
|
|
|
|
(_code.text == '000000')
|
|
|
|
|
? ARoute.push(context, UserAuthenticationPage())
|
|
|
|
|
: showToast('账号或密码错误!');
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
CupertinoDialogAction(
|
|
|
|
|
child: Text('拒绝'),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
@ -176,7 +196,8 @@ class _SignInPageState extends State<SignInPage> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
double _statusHeight = MediaQuery.of(context).padding.top;
|
|
|
|
|
ScreenUtil.init(context, designSize: Size(750, 1334), allowFontScaling: true);
|
|
|
|
|
ScreenUtil.init(context,
|
|
|
|
|
designSize: Size(750, 1334), allowFontScaling: true);
|
|
|
|
|
return Scaffold(
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
appBar: _appBar(),
|
|
|
|
@ -231,10 +252,9 @@ class _SignInPageState extends State<SignInPage> {
|
|
|
|
|
},
|
|
|
|
|
child: Text('隐私政策'))
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|