Browse Source

[feat]添加token获取

Destiny 7 tháng trước cách đây
mục cha
commit
2e275a3787
2 tập tin đã thay đổi với 187 bổ sung169 xóa
  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

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 169 - 169
pubspec.lock