diff --git a/lib/components/page_appbar.dart b/lib/components/page_appbar.dart index 13f6782..68dd6a7 100644 --- a/lib/components/page_appbar.dart +++ b/lib/components/page_appbar.dart @@ -5,10 +5,10 @@ class PageAppbar extends StatelessWidget implements PreferredSizeWidget { final Color? backgroundColor; final Color? color; - + final bool? bottom; final String title; final Widget? right; - const PageAppbar({super.key, required this.title, this.backgroundColor, this.color, this.right}); + const PageAppbar({super.key, required this.title, this.backgroundColor, this.color, this.right, this.bottom}); @override Widget build(BuildContext context) { @@ -26,6 +26,13 @@ class PageAppbar extends StatelessWidget implements PreferredSizeWidget { color: const Color.fromRGBO(51, 51, 51, 1) ), ), + bottom: (bottom != null && bottom!) ? PreferredSize( + preferredSize: Size.fromHeight(0.5), + child: Container( + color: Colors.grey[300], + height: 0.5, + ), + ) : null, ); } @override diff --git a/lib/controller/mine/user_info_controller.dart b/lib/controller/mine/user_info_controller.dart index d0cedc3..e5a6458 100644 --- a/lib/controller/mine/user_info_controller.dart +++ b/lib/controller/mine/user_info_controller.dart @@ -281,6 +281,9 @@ class UserInfoController extends GetxController { // 更新本地存储的用户信息 GlobalData().userData!.id = miId; + + final genderCode = gender.value == 'male' ? 0 : 1;// 1:男, 2:女 + GlobalData().userData!.genderCode = genderCode; GlobalData().userData!.nickName = nickname.value; GlobalData().userData!.profilePhoto = avatarUrl.value; GlobalData().userData!.education = education.value; diff --git a/lib/model/mine/user_data.dart b/lib/model/mine/user_data.dart index 2f6ea69..d0cdd1c 100644 --- a/lib/model/mine/user_data.dart +++ b/lib/model/mine/user_data.dart @@ -5,7 +5,7 @@ class UserData { final String? name; String? profilePhoto; String? identityCard; - final int? genderCode; + int? genderCode; final String? genderValue; final String? homeCountryCode; final String? homeCountry; diff --git a/lib/pages/mine/phone_page.dart b/lib/pages/mine/phone_page.dart index 7464d83..117c3fa 100644 --- a/lib/pages/mine/phone_page.dart +++ b/lib/pages/mine/phone_page.dart @@ -14,7 +14,7 @@ class PhonePage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( backgroundColor: Color(0xffFFFFFF), - appBar: PageAppbar(title: "手机认证"), + appBar: PageAppbar(title: "手机认证", bottom: true), body: Obx(() { return IndexedStack( index: controller.tabIndex.value,