mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-20 09:06:36 +08:00
common dyn page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -3,28 +3,30 @@ import 'package:PiliPlus/grpc/reply.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/http/match.dart';
|
||||
import 'package:PiliPlus/models_new/match/match_info/contest.dart';
|
||||
import 'package:PiliPlus/pages/common/reply_controller.dart';
|
||||
import 'package:PiliPlus/pages/common/dyn/common_dyn_controller.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class MatchInfoController extends ReplyController<MainListReply> {
|
||||
final int cid = int.parse(Get.parameters['cid']!);
|
||||
|
||||
class MatchInfoController extends CommonDynController<MainListReply> {
|
||||
@override
|
||||
final int oid = int.parse(Get.parameters['cid']!);
|
||||
@override
|
||||
int get replyType => 27;
|
||||
|
||||
@override
|
||||
dynamic get sourceId => cid.toString();
|
||||
dynamic get sourceId => oid.toString();
|
||||
|
||||
final Rx<LoadingState<MatchContest?>> infoState =
|
||||
LoadingState<MatchContest?>.loading().obs;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
offsetDy = 2;
|
||||
super.onInit();
|
||||
getMatchInfo();
|
||||
}
|
||||
|
||||
Future<void> getMatchInfo() async {
|
||||
var res = await MatchHttp.matchInfo(cid);
|
||||
var res = await MatchHttp.matchInfo(oid);
|
||||
if (res.isSuccess) {
|
||||
queryData();
|
||||
}
|
||||
@@ -39,7 +41,7 @@ class MatchInfoController extends ReplyController<MainListReply> {
|
||||
@override
|
||||
Future<LoadingState<MainListReply>> customGetData() => ReplyGrpc.mainList(
|
||||
type: replyType,
|
||||
oid: cid,
|
||||
oid: oid,
|
||||
mode: mode.value,
|
||||
cursorNext: cursorNext,
|
||||
offset: paginationReply?.nextOffset,
|
||||
|
||||
Reference in New Issue
Block a user