mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
28 lines
661 B
Dart
28 lines
661 B
Dart
import 'package:PiliPlus/http/loading_state.dart';
|
|
import 'package:PiliPlus/http/video.dart';
|
|
import 'package:PiliPlus/pages/common/common_list_controller.dart';
|
|
|
|
class ZoneController extends CommonListController {
|
|
ZoneController({this.rid, this.seasonType});
|
|
|
|
int? rid;
|
|
int? seasonType;
|
|
|
|
@override
|
|
void onInit() {
|
|
super.onInit();
|
|
queryData();
|
|
}
|
|
|
|
@override
|
|
Future<LoadingState> customGetData() {
|
|
if (rid != null) {
|
|
return VideoHttp.getRankVideoList(rid!);
|
|
}
|
|
if (seasonType == 1) {
|
|
return VideoHttp.pgcRankList(seasonType: seasonType!);
|
|
}
|
|
return VideoHttp.pgcSeasonRankList(seasonType: seasonType!);
|
|
}
|
|
}
|