mod: 本地缓存字段修改、登录状态

This commit is contained in:
guozhigq
2023-08-20 14:28:50 +08:00
parent 8627869309
commit 83341cd62b
29 changed files with 217 additions and 167 deletions

View File

@ -17,7 +17,7 @@ class ApiInterceptor extends Interceptor {
handler.next(options);
}
Box user = GStrorage.user;
Box localCache = GStrorage.localCache;
@override
void onResponse(Response response, ResponseInterceptorHandler handler) {
@ -29,7 +29,8 @@ class ApiInterceptor extends Interceptor {
final uri = Uri.parse(locations.first);
final accessKey = uri.queryParameters['access_key'];
final mid = uri.queryParameters['mid'];
user.put(UserBoxKey.accessKey, {'mid': mid, 'value': accessKey});
localCache
.put(LocalCacheKey.accessKey, {'mid': mid, 'value': accessKey});
}
}
}