|
|
@@ -148,7 +148,28 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
- )
|
|
|
+ ),
|
|
|
+ Positioned(
|
|
|
+ child: GestureDetector(
|
|
|
+ onTap: (){
|
|
|
+ MyTools().toPage(context, LoginPage(), (then) {},
|
|
|
+ noBack: true);
|
|
|
+ },
|
|
|
+ behavior: HitTestBehavior.translucent,
|
|
|
+ child: Container(
|
|
|
+ height: 30,
|
|
|
+ width: 60,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: Colors.white,
|
|
|
+ borderRadius: BorderRadius.circular(15),
|
|
|
+ ),
|
|
|
+ child: Text('去登录',style: TextStyle(color: MyColors.cFF4233,fontSize: 12),),
|
|
|
+ alignment: Alignment.center,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ top: 67,
|
|
|
+ right: 10,
|
|
|
+ ),
|
|
|
],
|
|
|
alignment: Alignment.topCenter,
|
|
|
),
|
|
|
@@ -270,7 +291,7 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
Container(
|
|
|
height: 1,
|
|
|
color:
|
|
|
- focus == 2 ? MyColors.cFF4233 : MyColors.cD7D7D7,
|
|
|
+ focus == 2 ? MyColors.cFF4233 : MyColors.cD7D7D7,
|
|
|
margin: EdgeInsets.only(top: 8, bottom: 39),
|
|
|
),
|
|
|
Row(
|
|
|
@@ -307,8 +328,8 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
hintStyle: TextStyle(
|
|
|
color: MyColors.c999999, fontSize: 16),
|
|
|
isDense: true,
|
|
|
- contentPadding:
|
|
|
- const EdgeInsets.fromLTRB(14, 4.5, 8, 4.5)),
|
|
|
+ contentPadding: const EdgeInsets.fromLTRB(
|
|
|
+ 14, 4.5, 8, 4.5)),
|
|
|
maxLines: 1,
|
|
|
style: TextStyle(
|
|
|
color: MyColors.c333333,
|
|
|
@@ -320,8 +341,8 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
),
|
|
|
),
|
|
|
GestureDetector(
|
|
|
- onTap: (){
|
|
|
- if(verificationCodeText!='发送验证码'){
|
|
|
+ onTap: () {
|
|
|
+ if (verificationCodeText != '发送验证码') {
|
|
|
showToast('验证码发送中');
|
|
|
return;
|
|
|
}
|
|
|
@@ -332,8 +353,12 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
decoration: BoxDecoration(
|
|
|
color: MyColors.c19FF4233,
|
|
|
borderRadius:
|
|
|
- BorderRadius.all(Radius.circular(4))),
|
|
|
- child: Text(verificationCodeText,style: TextStyle(color: MyColors.cFF4233,fontSize: 14),),
|
|
|
+ BorderRadius.all(Radius.circular(4))),
|
|
|
+ child: Text(
|
|
|
+ verificationCodeText,
|
|
|
+ style: TextStyle(
|
|
|
+ color: MyColors.cFF4233, fontSize: 14),
|
|
|
+ ),
|
|
|
alignment: Alignment.center,
|
|
|
height: 34,
|
|
|
width: 90,
|
|
|
@@ -402,7 +427,8 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
},
|
|
|
behavior: HitTestBehavior.translucent,
|
|
|
child: Container(
|
|
|
- height: 30,width: 30,
|
|
|
+ height: 30,
|
|
|
+ width: 30,
|
|
|
padding: EdgeInsets.all(4),
|
|
|
child: SvgPicture.asset(showPW
|
|
|
? 'images/svg/不显示.svg'
|
|
|
@@ -517,25 +543,25 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
padding: EdgeInsets.only(bottom: 2),
|
|
|
),
|
|
|
),
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(top: 20),
|
|
|
- alignment: Alignment.centerRight,
|
|
|
- child: GestureDetector(
|
|
|
- onTap: () {
|
|
|
- MyTools().toPage(context, LoginPage(), (then) {},
|
|
|
- noBack: true);
|
|
|
- },
|
|
|
- behavior: HitTestBehavior.translucent,
|
|
|
- child: Container(
|
|
|
- child: Text(
|
|
|
- '已有账号,去登录',
|
|
|
- style: TextStyle(
|
|
|
- color: MyColors.cFF4233, fontSize: 13),
|
|
|
- ),
|
|
|
- padding: EdgeInsets.all(8),
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
+ // Container(
|
|
|
+ // margin: EdgeInsets.only(top: 20),
|
|
|
+ // alignment: Alignment.centerRight,
|
|
|
+ // child: GestureDetector(
|
|
|
+ // onTap: () {
|
|
|
+ // MyTools().toPage(context, LoginPage(), (then) {},
|
|
|
+ // noBack: true);
|
|
|
+ // },
|
|
|
+ // behavior: HitTestBehavior.translucent,
|
|
|
+ // child: Container(
|
|
|
+ // child: Text(
|
|
|
+ // '已有账号,去登录',
|
|
|
+ // style: TextStyle(
|
|
|
+ // color: MyColors.cFF4233, fontSize: 13),
|
|
|
+ // ),
|
|
|
+ // padding: EdgeInsets.all(8),
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
+ // ),
|
|
|
],
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
),
|
|
|
@@ -591,17 +617,15 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
}
|
|
|
|
|
|
int countdown = 60;
|
|
|
+
|
|
|
void sendTheVerificationCode() {
|
|
|
- if(_phoneNum.text.isEmpty||_phoneNum.text.length!=11){
|
|
|
+ if (_phoneNum.text.isEmpty || _phoneNum.text.length != 11) {
|
|
|
showToast('请输入正确的手机号');
|
|
|
return;
|
|
|
}
|
|
|
- MyDio().post(MyApis.getApi('sendCode'), {
|
|
|
- 'mobile':_phoneNum.text
|
|
|
- }, (response, hasError) {
|
|
|
- if(!hasError){
|
|
|
-
|
|
|
- }
|
|
|
+ MyDio().post(MyApis.getApi('sendCode'), {'mobile': _phoneNum.text},
|
|
|
+ (response, hasError) {
|
|
|
+ if (!hasError) {}
|
|
|
}, (error) {
|
|
|
showToast('发送失败');
|
|
|
countdown = 2;
|
|
|
@@ -614,7 +638,7 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
});
|
|
|
});
|
|
|
_timer = Timer.periodic(Duration(seconds: 1), (timer) {
|
|
|
- if(countdown==0){
|
|
|
+ if (countdown == 0) {
|
|
|
timer.cancel();
|
|
|
setState(() {
|
|
|
countdown = 60;
|
|
|
@@ -631,10 +655,10 @@ class _RegisteredPageState extends State<RegisteredPage> {
|
|
|
|
|
|
void verificationCode() {
|
|
|
MyDio().post(MyApis.getApi('verifyCode'), {
|
|
|
- 'mobile':_phoneNum.text,
|
|
|
- 'code':int.parse(_verificationCode.text),
|
|
|
+ 'mobile': _phoneNum.text,
|
|
|
+ 'code': int.parse(_verificationCode.text),
|
|
|
}, (response, hasError) {
|
|
|
- if(!hasError){
|
|
|
+ if (!hasError) {
|
|
|
uploadAvatar();
|
|
|
}
|
|
|
}, (error) {
|