Pārlūkot izejas kodu

[feat]添加token获取

Destiny 7 mēneši atpakaļ
vecāks
revīzija
79f635892f
2 mainītis faili ar 187 papildinājumiem un 169 dzēšanām
  1. 18 0
      lib/data/repository/account_repository.dart
  2. 169 169
      pubspec.lock

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

@@ -273,6 +273,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

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 169 - 169
pubspec.lock