refa: video model (#523)

This commit is contained in:
My-Responsitories
2025-03-25 10:12:44 +08:00
committed by GitHub
parent bf464994df
commit 7a6085e923
52 changed files with 761 additions and 1494 deletions

View File

@@ -50,15 +50,16 @@ class SubDetailController extends GetxController {
);
}
if (res['status']) {
subInfo.value = res['data'].info;
SubDetailModelData data = res['data'];
subInfo.value = data.info!;
if (currentPage == 1 && type == 'init') {
subList.value = res['data'].medias;
mediaCount = res['data'].info.mediaCount;
subList.value = data.list!;
mediaCount = data.info!.mediaCount!;
if (item.type == 11) {
playCount.value = res['data'].info.cntInfo!['play'];
playCount.value = data.info!.cntInfo!['play'];
}
} else if (type == 'onLoad') {
subList.addAll(res['data'].medias);
subList.addAll(data.list!);
}
if (subList.length >= mediaCount) {
loadingText.value = '没有更多了';

View File

@@ -129,13 +129,13 @@ class SubVideoCardH extends StatelessWidget {
StatView(
context: context,
theme: 'gray',
value: videoItem.cntInfo?['play'],
value: Utils.numFormat(videoItem.cntInfo?['play']),
),
const SizedBox(width: 8),
StatDanMu(
context: context,
theme: 'gray',
value: videoItem.cntInfo?['danmaku'],
value: Utils.numFormat(videoItem.cntInfo?['danmaku']),
),
const Spacer(),
],