chengc 1 天之前
父节点
当前提交
fece25879b

+ 2 - 2
README.md

@@ -189,7 +189,7 @@ cd tboss_oa_module
 flutter pub get
 
 # 2. 进入宿主 iOS 项目
-cd ../ios
+cd ../ios/tboss
 
 # 3. 安装 CocoaPods 依赖
 pod install
@@ -209,7 +209,7 @@ open YourApp.xcworkspace
 - 编译前确认 `tboss_oa_module/.ios/` 目录存在(由 `flutter pub get` 生成)
 - 如果 Pod 安装失败,尝试:
   ```bash
-  cd ios
+  cd ios/tboss
   pod cache clean --all
   pod deintegrate
   pod install

+ 7 - 2
lib/features/expense/expense_create_page.dart

@@ -1321,8 +1321,13 @@ class _ExpenseCreatePageState extends ConsumerState<ExpenseCreatePage>
   }
 
   void _forcePop() {
-    _isPoppingToNative = true;
-    SystemNavigator.pop();
+    final router = GoRouter.of(context);
+    if (router.canPop()) {
+      router.pop();
+    } else {
+      _isPoppingToNative = true;
+      SystemNavigator.pop();
+    }
   }
 
   void _showConfirmDialog(

+ 7 - 2
lib/features/expense_apply/expense_apply_create_page.dart

@@ -1017,8 +1017,13 @@ class _ExpenseApplyCreatePageState
   }
 
   void _forcePop() {
-    _isPoppingToNative = true;
-    SystemNavigator.pop();
+    final router = GoRouter.of(context);
+    if (router.canPop()) {
+      router.pop();
+    } else {
+      _isPoppingToNative = true;
+      SystemNavigator.pop();
+    }
   }
 
   bool _hasUnsaved() =>