|
|
@@ -1,4 +1,5 @@
|
|
|
import 'package:electronic_assistant/base/base_page.dart';
|
|
|
+import 'package:electronic_assistant/data/repositories/account_repository.dart';
|
|
|
import 'package:electronic_assistant/resource/assets.gen.dart';
|
|
|
import 'package:electronic_assistant/resource/colors.gen.dart';
|
|
|
import 'package:electronic_assistant/utils/expand.dart';
|
|
|
@@ -35,9 +36,9 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
backgroundColor: Colors.transparent,
|
|
|
appBar: AppBar(
|
|
|
leading: IconButton(
|
|
|
- icon: const Icon(Icons.arrow_back_ios),
|
|
|
+ icon: const Icon(Icons.arrow_back_ios_new_rounded),
|
|
|
onPressed: () {
|
|
|
- Navigator.pop(context);
|
|
|
+ Get.back(result: accountRepository.isLogin.value);
|
|
|
},
|
|
|
),
|
|
|
backgroundColor: Colors.transparent,
|
|
|
@@ -61,42 +62,6 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
),
|
|
|
],
|
|
|
);
|
|
|
- // return Scaffold(
|
|
|
- // body: Column(
|
|
|
- // children: <Widget>[
|
|
|
- // TextField(
|
|
|
- // onChanged: (text) {
|
|
|
- // controller.setPhone(text);
|
|
|
- // },
|
|
|
- // decoration: const InputDecoration(
|
|
|
- // labelText: "手机号",
|
|
|
- // hintText: "您的手机号",
|
|
|
- // prefixIcon: Icon(Icons.person)),
|
|
|
- // ),
|
|
|
- // TextField(
|
|
|
- // onChanged: (text) {
|
|
|
- // controller.setCode(text);
|
|
|
- // },
|
|
|
- // decoration: const InputDecoration(
|
|
|
- // labelText: "验证码",
|
|
|
- // hintText: "您的验证码",
|
|
|
- // prefixIcon: Icon(Icons.lock)),
|
|
|
- // ),
|
|
|
- // ElevatedButton(
|
|
|
- // child: const Text("获取验证码"),
|
|
|
- // onPressed: () {
|
|
|
- // controller.getUserCode();
|
|
|
- // },
|
|
|
- // ),
|
|
|
- // ElevatedButton(
|
|
|
- // child: const Text("登录"),
|
|
|
- // onPressed: () {
|
|
|
- // controller.login();
|
|
|
- // },
|
|
|
- // )
|
|
|
- // ],
|
|
|
- // ),
|
|
|
- // );
|
|
|
}
|
|
|
|
|
|
// 背景图片
|
|
|
@@ -119,9 +84,10 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
),
|
|
|
),
|
|
|
child: TextField(
|
|
|
+ focusNode: controller.phoneFocusNode,
|
|
|
maxLines: 1,
|
|
|
textAlignVertical: TextAlignVertical.center,
|
|
|
- textInputAction: TextInputAction.search,
|
|
|
+ textInputAction: TextInputAction.next,
|
|
|
decoration: InputDecoration(
|
|
|
hintText: '输入手机号码',
|
|
|
hintStyle: TextStyle(fontSize: 16, color: "#AFAFAF".toColor()),
|
|
|
@@ -161,7 +127,7 @@ class LoginPage extends BasePage<LoginController> {
|
|
|
child: TextField(
|
|
|
maxLines: 1,
|
|
|
textAlignVertical: TextAlignVertical.center,
|
|
|
- textInputAction: TextInputAction.search,
|
|
|
+ textInputAction: TextInputAction.done,
|
|
|
decoration: InputDecoration(
|
|
|
hintText: '输入验证码',
|
|
|
hintStyle: TextStyle(fontSize: 16, color: "#AFAFAF".toColor()),
|