mod: 登录逻辑优化

This commit is contained in:
guozhigq
2023-08-31 22:41:19 +08:00
parent 01df8622e0
commit 9b1bb8c566
10 changed files with 71 additions and 74 deletions

View File

@ -35,6 +35,7 @@ class MediaController extends GetxController {
},
];
var userInfo;
int? mid;
@override
void onInit() {
@ -44,13 +45,13 @@ class MediaController extends GetxController {
}
Future<dynamic> queryFavFolder() async {
if (!userLogin.value || GStrorage.userInfo.get('userInfoCache') == null) {
if (!userLogin.value) {
return {'status': false, 'data': [], 'msg': '未登录'};
}
var res = await await UserHttp.userfavFolder(
pn: 1,
ps: 5,
mid: GStrorage.userInfo.get('userInfoCache').mid,
mid: mid ?? GStrorage.userInfo.get('userInfoCache').mid,
);
favFolderData.value = res['data'];
return res;