Jelajahi Sumber

remove state-isShowUserCard

Melon 1 tahun lalu
induk
melakukan
536bcabf9d

+ 0 - 1
lib/architecture/utils/json_rpc_ex_interceptor.dart

@@ -35,7 +35,6 @@ class JsonRpcExInterceptor extends JsonRpcInterceptor {
           _isDisplayingAlertRelogin = true;
           await _alertRelogin(code);
           _isDisplayingAlertRelogin = false;
-          Store.user.isShowUserCard = false;
         }
         return error;
       }

+ 0 - 10
lib/components/floating_window/index.dart

@@ -155,16 +155,6 @@ class _HoveringPatientCardState extends State<HoveringPatientCard> {
     );
   }
 
-  Future<void> _onChangePatint() async {
-    try {
-      final homeController = Get.find<HomeController>();
-      homeController.switchNavByName('/patient/list');
-    } catch (e) {
-      print(e);
-    }
-    Store.user.isShowUserCard = true;
-  }
-
   _onPanUpdate(DragUpdateDetails detail, double maxHeight, double maxWidth) {
     //用户手指滑动时,更新偏移,重新构建
     //顶部

+ 0 - 4
lib/pages/patient/create/controller.dart

@@ -302,7 +302,6 @@ class CreatePatientController extends FControllerBase with HomeNavMixin {
     if (!verifyResult) {
       return;
     }
-    Store.user.isShowUserCard = false;
     final IdCardScanResult? result = await Get.to<IdCardScanResult>(
       () => const IdCardScanPage(),
     );
@@ -313,7 +312,6 @@ class CreatePatientController extends FControllerBase with HomeNavMixin {
     } else {
       print("识别取消");
     }
-    Store.user.isShowUserCard = true;
   }
 
   /// 点击身份识别(拍摄扫描身份证)
@@ -383,7 +381,6 @@ class CreatePatientController extends FControllerBase with HomeNavMixin {
     if (!verifyResult) {
       return;
     }
-    Store.user.isShowUserCard = false;
     final FaceRecognitionResult? result = await Get.to<FaceRecognitionResult>(
       () => const FacialRecognitionPage(
         mode: FacialRecognitionMode.faceRecognition,
@@ -398,7 +395,6 @@ class CreatePatientController extends FControllerBase with HomeNavMixin {
     } else {
       print("识别取消");
     }
-    Store.user.isShowUserCard = true;
   }
 
   void onIdcardInfoIsCreateRecord(

+ 0 - 1
lib/pages/splash/controller.dart

@@ -13,7 +13,6 @@ class SplashController extends FControllerBase {
   void onRouteTo() async {
     if (Store.user.isLogOn) {
       Get.offAllNamed("/");
-      Store.user.isShowUserCard = true;
     } else {
       Get.offAllNamed("/login");
     }

+ 1 - 11
lib/store/modules/user.dart

@@ -27,7 +27,6 @@ class UserState extends StateModuleBase {
   final RxList<String> _features = RxList<String>();
   final Rx<String> _headImageToken = Rx('');
   final Rx<PatientDTO?> _currentSelectPatientInfo = Rx(null);
-  final Rx<bool> _isShowUserCard = Rx(false);
 
   /// 登录令牌
   String? get token => _token;
@@ -35,7 +34,7 @@ class UserState extends StateModuleBase {
   /// 是否登录中
   bool get isLogOn => token != null && token!.isNotEmpty;
 
-  /// 是否记住密码
+  /// 是否自动登录
   bool get isAutoLogin => _isAutoLogin;
 
   /// 登录账号
@@ -51,10 +50,6 @@ class UserState extends StateModuleBase {
   String get displayName => _displayName.value;
   set displayName(String val) => _displayName.value = val;
 
-  /// 是否显示用户卡片
-  bool get isShowUserCard => _isShowUserCard.value;
-  set isShowUserCard(bool val) => _isShowUserCard.value = val;
-
   /// 团队名称
   String get teamName => _userInfo?.teamName ?? "";
 
@@ -126,16 +121,11 @@ class UserState extends StateModuleBase {
     await templateController.saveTemplate();
     await _fetchFeatures();
     await Store.persistent();
-
-    Future.delayed(const Duration(milliseconds: 300), () {
-      isShowUserCard = true;
-    });
   }
 
   /// 处理登出
   Future<void> handleLogOut() async {
     _token = null;
-    isShowUserCard = false;
     _currentSelectPatientInfo.value = null;
     _updateRpcResEncryptKey("");