Initial commit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
谢宇宁
2026-11-05 10:38:11 +07:00
co-authored by Claude Opus 5.5
commit 2d26ea8f90
1071 changed files with 100151 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hjsq/hj_page/live/live_service.dart';
import 'live_model.dart';
//直播主逻辑
class LiveMainLogic extends GetxController with GetTickerProviderStateMixin {
TabController? tabController;
LiveMainModel? liveMainModel;
List<LiveModule> liveTabs = [];
@override
void onReady() {
super.onReady();
loadData();
}
@override
void onClose() {
tabController?.dispose();
super.onClose();
}
//获取媒体详情
loadData() async {
liveMainModel = await LiveService.getLiveModuleList();
if (liveMainModel != null) {
if (liveMainModel?.module != null &&
liveMainModel?.module?.isNotEmpty == true) {
liveTabs.clear();
liveTabs.add(LiveModule(id: '-1', title: '推荐')); //添加推荐数据
liveTabs.addAll(liveMainModel?.module ?? []);
tabController = TabController(
initialIndex: 0,
length: liveTabs.length,
vsync: this,
);
}
}
update();
}
}