Quellcode durchsuchen

[feat]添加token获取

Destiny vor 7 Monaten
Ursprung
Commit
7ec6ed669d

+ 1 - 1
ios/Podfile.lock

@@ -232,4 +232,4 @@ SPEC CHECKSUMS:
 
 PODFILE CHECKSUM: 46e41cd7a608d3db06d8570d6fb41a774efc4103
 
-COCOAPODS: 1.16.2
+COCOAPODS: 1.15.2

+ 2 - 3
ios/Runner.xcodeproj/xcshareddata/xcschemes/AiKeyboard.xcscheme

@@ -2,7 +2,7 @@
 <Scheme
    LastUpgradeVersion = "1500"
    wasCreatedForAppExtension = "YES"
-   version = "2.0">
+   version = "1.7">
    <BuildAction
       parallelizeBuildables = "YES"
       buildImplicitDependencies = "YES">
@@ -49,7 +49,6 @@
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"
-      askForAppToLaunch = "Yes"
       useCustomWorkingDirectory = "NO"
       ignoresPersistentStateOnLaunch = "NO"
       debugDocumentVersioning = "YES"
@@ -64,7 +63,7 @@
             BlueprintName = "Runner"
             ReferencedContainer = "container:Runner.xcodeproj">
          </BuildableReference>
-      </MacroExpansion>
+      </BuildableProductRunnable>
    </LaunchAction>
    <ProfileAction
       buildConfiguration = "Release"

+ 18 - 0
lib/data/repository/account_repository.dart

@@ -255,6 +255,24 @@ class AccountRepository {
     });
   }
 
+  // 保存token到ios端
+  Future<void> saveAuthToken(String token) async {
+    // 通知iOS键盘扩展
+    if (Platform.isIOS) {
+      const MethodChannel channel = MethodChannel('keyboard_ios');
+      channel.invokeMethod('saveAuthToken', {'token': token});
+    }
+  }
+
+  // 保存token到ios端
+  Future<void> clearAuthToken() async {
+    // 通知iOS键盘扩展
+    if (Platform.isIOS) {
+      const MethodChannel channel = MethodChannel('keyboard_ios');
+      channel.invokeMethod('clearAuthToken');
+    }
+  }
+
   // 意见反馈
   Future<void> complaintSubmit(String? phone, String content) {
     return atmobApi

Datei-Diff unterdrückt, da er zu groß ist
+ 208 - 208
pubspec.lock