mod: 订阅视频类型补充
This commit is contained in:
@ -6,7 +6,6 @@ import '../../models/user/sub_folder.dart';
|
||||
|
||||
class SubDetailController extends GetxController {
|
||||
late SubFolderItemData item;
|
||||
|
||||
late int seasonId;
|
||||
late String heroTag;
|
||||
int currentPage = 1;
|
||||
@ -26,17 +25,23 @@ class SubDetailController extends GetxController {
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
Future<dynamic> queryUserSubFolderDetail({type = 'init'}) async {
|
||||
Future<dynamic> queryUserSeasonList({type = 'init'}) async {
|
||||
if (type == 'onLoad' && subList.length >= mediaCount) {
|
||||
loadingText.value = '没有更多了';
|
||||
return;
|
||||
}
|
||||
isLoadingMore = true;
|
||||
var res = await UserHttp.userSubFolderDetail(
|
||||
seasonId: seasonId,
|
||||
ps: 20,
|
||||
pn: currentPage,
|
||||
);
|
||||
var res = type == 21
|
||||
? await UserHttp.userSeasonList(
|
||||
seasonId: seasonId,
|
||||
ps: 20,
|
||||
pn: currentPage,
|
||||
)
|
||||
: await UserHttp.userResourceList(
|
||||
seasonId: seasonId,
|
||||
ps: 20,
|
||||
pn: currentPage,
|
||||
);
|
||||
if (res['status']) {
|
||||
subInfo.value = res['data'].info;
|
||||
if (currentPage == 1 && type == 'init') {
|
||||
@ -55,6 +60,6 @@ class SubDetailController extends GetxController {
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
queryUserSubFolderDetail(type: 'onLoad');
|
||||
queryUserSeasonList(type: 'onLoad');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user