Browse Source

修复用户信息展示错误

master
王子贤 2 months ago
parent
commit
166cbf5b19
2 changed files with 3 additions and 3 deletions
  1. 2
      lib/controller/home/user_information_controller.dart
  2. 4
      lib/pages/home/user_information_page.dart

2
lib/controller/home/user_information_controller.dart

@ -31,7 +31,7 @@ class UserInformationController extends GetxController {
@override @override
void onInit() { void onInit() {
super.onInit(); super.onInit();
myUserData.value = GlobalData().userData;
// //
if (miId.isEmpty) { if (miId.isEmpty) {
errorMessage.value = '用户ID无效'; errorMessage.value = '用户ID无效';

4
lib/pages/home/user_information_page.dart

@ -179,7 +179,7 @@ class UserInformationPage extends StatelessWidget {
), ),
), ),
SizedBox(width: 13.w,), SizedBox(width: 13.w,),
if(controller.myUserData.value?.genderCode == 0) Container(
if(controller.userData.value?.genderCode == 1) Container(
width: 33.w, width: 33.w,
height: 13.w, height: 13.w,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -257,7 +257,7 @@ class UserInformationPage extends StatelessWidget {
), ),
), ),
SizedBox(width: 4.w,), SizedBox(width: 4.w,),
if(controller.myUserData.value?.genderCode == 1) Container(
if(controller.userData.value?.genderCode == 0) Container(
width: 33.w, width: 33.w,
height: 13.w, height: 13.w,
decoration: BoxDecoration( decoration: BoxDecoration(

Loading…
Cancel
Save