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

@ -5,19 +5,22 @@ import 'package:pilipala/models/follow/result.dart';
import 'package:pilipala/utils/storage.dart';
class FollowController extends GetxController {
Box user = GStrorage.user;
Box userInfoCache = GStrorage.userInfo;
int pn = 1;
int total = 0;
RxList<FollowItemModel> followList = [FollowItemModel()].obs;
late int mid;
late String name;
var userInfo;
@override
void onInit() {
super.onInit();
mid = int.parse(
Get.parameters['mid'] ?? user.get(UserBoxKey.userMid).toString());
name = Get.parameters['name'] ?? user.get(UserBoxKey.userName);
userInfo = userInfoCache.get('userInfoCache');
mid = Get.parameters['mid'] != null
? int.parse(Get.parameters['mid']!)
: userInfo.mid;
name = Get.parameters['name'] ?? userInfo.uname;
}
Future queryFollowings(type) async {