Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ChatGPT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
关振斌
ChatGPT
Commits
726abbf8
Commit
726abbf8
authored
Apr 17, 2023
by
skeyboy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录页调整
parent
153beb76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
29 deletions
+85
-29
lib/pages/frame/sign_in/controller.dart
lib/pages/frame/sign_in/controller.dart
+4
-0
lib/pages/frame/sign_in/view.dart
lib/pages/frame/sign_in/view.dart
+52
-18
lib/pages/home/controller.dart
lib/pages/home/controller.dart
+1
-3
lib/pages/my/view.dart
lib/pages/my/view.dart
+28
-8
No files found.
lib/pages/frame/sign_in/controller.dart
View file @
726abbf8
...
...
@@ -189,6 +189,10 @@ class SignInController extends GetxController {
EasyLoading
.
showToast
(
'请先输入手机号'
);
return
;
}
if
(
codeEnable
.
value
==
false
)
{
EasyLoading
.
show
(
status:
"验证码发送太过频繁,请稍后再试"
);
return
;
}
if
(
codeEnable
.
value
)
{
EasyLoading
.
show
(
status:
"发送验证码中"
);
MsmEntity
?
res
=
...
...
lib/pages/frame/sign_in/view.dart
View file @
726abbf8
import
'dart:io'
;
import
'dart:math'
;
import
'package:chart/common/routers/routes.dart'
;
import
'package:chart/pages/application/index.dart'
;
...
...
@@ -628,7 +629,7 @@ class SignInPage extends GetView<SignInController> {
const
Spacer
(),
],
),
SizedBox
(
height:
defaultPadding
*
4
),
SizedBox
(
height:
defaultPadding
*
6
),
],
),
Row
(
...
...
@@ -645,32 +646,66 @@ class SignInPage extends GetView<SignInController> {
textInputAction:
TextInputAction
.
next
,
cursorColor:
kPrimaryColor
,
onSaved:
(
email
)
{},
style:
const
TextStyle
(
color:
Color
(
0xFF6F35A5
)),
decoration:
const
InputDecoration
(
labelStyle:
TextStyle
(
color:
Colors
.
black
),
fillColor:
kPrimaryLightColor
,
iconColor:
Color
(
0xFF6F35A5
),
prefixIconColor:
Color
(
0xFF6F35A5
),
filled:
true
,
contentPadding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
30
)),
borderSide:
BorderSide
.
none
,
),
hintText:
"输入手机号"
,
hintStyle:
TextStyle
(
color:
Color
(
0xFF6F35A5
)),
prefixIcon:
Padding
(
padding:
EdgeInsets
.
all
(
defaultPadding
),
padding:
EdgeInsets
.
only
(
left:
defaultPadding
,
right:
defaultPadding
),
child:
Icon
(
Icons
.
phone_android
),
),
),
),
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
defaultPadding
),
vertical:
defaultPadding
*
1.5
),
child:
TextFormField
(
controller:
controller
.
codeController
,
keyboardType:
TextInputType
.
number
,
textInputAction:
TextInputAction
.
done
,
obscureText:
true
,
cursorColor:
kPrimaryColor
,
style:
TextStyle
(
color:
Color
(
0xFF6F35A5
)),
decoration:
const
InputDecoration
(
labelStyle:
TextStyle
(
color:
Colors
.
black
),
fillColor:
kPrimaryLightColor
,
contentPadding:
EdgeInsets
.
fromLTRB
(
10
,
10
,
10
,
10
),
iconColor:
Color
(
0xFF6F35A5
),
prefixIconColor:
Color
(
0xFF6F35A5
),
filled:
true
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
30
)),
borderSide:
BorderSide
.
none
,
),
hintText:
"输入验证码"
,
hintStyle:
TextStyle
(
color:
Color
(
0xFF6F35A5
)),
prefixIcon:
Padding
(
padding:
EdgeInsets
.
all
(
defaultPadding
),
child:
Icon
(
Icons
.
verified_sharp
),
child:
Icon
(
Icons
.
lock
),
),
),
),
),
const
SizedBox
(
height:
defaultPadding
),
Row
(
children:
[
Flexible
(
child:
Container
()),
...
...
@@ -684,22 +719,21 @@ class SignInPage extends GetView<SignInController> {
)
],
),
const
SizedBox
(
height:
defaultPadding
),
const
SizedBox
(
height:
defaultPadding
*
6
),
Hero
(
tag:
"login_btn"
,
child:
Container
(
width:
Get
.
width
-
40
,
height:
45
,
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
ElevatedButton
(
// style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Color(0xFF6F35A5))),
onPressed:
()
{
controller
.
handleSignIn
();
},
child:
Text
(
"登录"
.
toUpperCase
(),
),
child:
GestureDetector
(
onTap:
()
=>
controller
.
handleSignIn
(),
child:
Container
(
width:
Get
.
width
-
40
,
height:
50
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
45
/
2.0
)),
color:
Color
(
0xFF6F35A5
)),
child:
Text
(
"登录"
.
toUpperCase
(),
),
),
),
...
...
lib/pages/home/controller.dart
View file @
726abbf8
...
...
@@ -395,9 +395,7 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
//只有Android才会存在登录情况
if
(
GetPlatform
.
isAndroid
)
{
var
rev
=
await
Get
.
toNamed
(
AppRoutes
.
SIGN_IN
);
if
(
isLogin
)
{
virtualPay
();
}
print
(
rev
);
}
}
else
{
if
(
GetPlatform
.
isAndroid
)
{
...
...
lib/pages/my/view.dart
View file @
726abbf8
...
...
@@ -30,8 +30,7 @@ class MyPage extends GetView<MyController> {
alignment:
Alignment
.
center
,
child:
Container
(
// color: Colors.amber,
padding:
EdgeInsets
.
symmetric
(
horizontal:
20
,
vertical:
0
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
20
,
vertical:
0
),
child:
RichText
(
textAlign:
TextAlign
.
center
,
text:
TextSpan
(
children:
[
...
...
@@ -182,12 +181,33 @@ class MyPage extends GetView<MyController> {
),
),
),
UserStore
.
to
.
isLogin
?
Column
(
children:
[
SizedBox
(
height:
145
,),
BrnBigMainButton
(
title:
"退出"
,
onTap:
()
{
UserStore
.
to
.
logout
();
Get
.
back
();
})],)
:
Container
()
UserStore
.
to
.
isLogin
?
Column
(
children:
[
SizedBox
(
height:
145
,
),
GestureDetector
(
onTap:
()
{
UserStore
.
to
.
logout
();
Get
.
back
();
},
child:
Container
(
width:
Get
.
width
-
40
,
height:
45
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
45
/
2.0
)),
color:
Color
(
0xFF6F35A5
)),
child:
Text
(
"退出"
.
toUpperCase
(),
),
),
),
],
)
:
Container
()
// GradientButton(child: Text("321"), callback: () {})
],
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment