Browse Source

登录修改优化

zyh
w-R 3 years ago
parent
commit
a399f08246
  1. 40
      lib/login/new_login_page.dart
  2. 3
      lib/login/phone_address_page.dart

40
lib/login/new_login_page.dart

@ -192,12 +192,12 @@ class _NewLoginPage extends State<NewLoginPage> {
setState(() {}); setState(() {});
return; return;
} }
if (mobile.length != 11) { // if (mobile.length != 11) {
mobileStatus = 2; // mobileStatus = 2;
mobileErrorText = S.of(context).phone_error; // mobileErrorText = S.of(context).phone_error;
setState(() {}); // setState(() {});
return; // return;
} // }
var code = _controllerCode.text; var code = _controllerCode.text;
if (code == "") { if (code == "") {
@ -213,7 +213,7 @@ class _NewLoginPage extends State<NewLoginPage> {
return; return;
} }
var invite = _controllerInviteCode.text; var invite = _controllerInviteCode.text;
var param = {"capcha": code, "mobile": mobile, "invite": invite}; var param = {"capcha": code, "mobile": mobile, "invite": invite,"areaCode":area};
EasyLoading.show(status: S.of(context).zhengzaijiazai); EasyLoading.show(status: S.of(context).zhengzaijiazai);
BaseData value = await apiService.memberLogin(param).catchError((error) { BaseData value = await apiService.memberLogin(param).catchError((error) {
print(error.message); print(error.message);
@ -416,7 +416,8 @@ class _NewLoginPage extends State<NewLoginPage> {
style: TextStyle( style: TextStyle(
height: 1.h, height: 1.h,
fontSize: 16.sp, fontSize: 16.sp,
color: statusPhoneTextColor, // color: statusPhoneTextColor,
color: Color(0xFF353535),
), ),
onChanged: (value) { onChanged: (value) {
if (value != null && value.isNotEmpty) { if (value != null && value.isNotEmpty) {
@ -456,20 +457,21 @@ class _NewLoginPage extends State<NewLoginPage> {
Container( Container(
height: 1.h, height: 1.h,
width: MediaQuery.of(context).size.width - 80.h, width: MediaQuery.of(context).size.width - 80.h,
color: statusPhoneLineColor, // color: statusPhoneLineColor,
color: _controllerPhone.text== "" ? Color(0xFFE7E3E3):Color(0xFF32A060),
), ),
SizedBox( SizedBox(
height: 30.h, height: 30.h,
child: Visibility( // child: Visibility(
visible: statusPhoneVisible, // visible: statusPhoneVisible,
child: Text( // child: Text(
S.of(context).phone_error, // S.of(context).phone_error,
style: TextStyle( // style: TextStyle(
color: Color(0xFFF72626), // color: Color(0xFFF72626),
fontSize: 12.sp, // fontSize: 12.sp,
), // ),
), // ),
), // ),
), ),
Text( Text(
S.of(context).yanzhengma, S.of(context).yanzhengma,

3
lib/login/phone_address_page.dart

@ -3,11 +3,8 @@ import 'dart:convert';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
class PhoneAddressPage extends StatefulWidget { class PhoneAddressPage extends StatefulWidget {

Loading…
Cancel
Save