feat: match info

opt dateformat

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-06-15 20:12:57 +08:00
parent 25f4ed6636
commit a2c24fb33c
108 changed files with 1703 additions and 877 deletions

View File

@@ -13,7 +13,7 @@ import 'package:PiliPlus/pages/video/introduction/pgc/controller.dart';
import 'package:PiliPlus/pages/video/introduction/pgc/widgets/pgc_panel.dart';
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/action_item.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:PiliPlus/utils/num_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show HapticFeedback;
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@@ -273,7 +273,7 @@ class _PgcIntroPageState extends State<PgcIntroPage>
selectStatus: pgcIntroController.hasLike.value,
isLoading: false,
semanticsLabel: '点赞',
text: Utils.numFormat(item.stat!.likes),
text: NumUtil.numFormat(item.stat!.likes),
needAnim: true,
hasTriple: pgcIntroController.hasLike.value &&
pgcIntroController.hasCoin &&
@@ -299,7 +299,7 @@ class _PgcIntroPageState extends State<PgcIntroPage>
selectStatus: pgcIntroController.hasCoin,
isLoading: false,
semanticsLabel: '投币',
text: Utils.numFormat(item.stat!.coins),
text: NumUtil.numFormat(item.stat!.coins),
needAnim: true,
),
),
@@ -314,7 +314,7 @@ class _PgcIntroPageState extends State<PgcIntroPage>
selectStatus: pgcIntroController.hasFav.value,
isLoading: false,
semanticsLabel: '收藏',
text: Utils.numFormat(item.stat!.favorite),
text: NumUtil.numFormat(item.stat!.favorite),
needAnim: true,
),
),
@@ -325,7 +325,7 @@ class _PgcIntroPageState extends State<PgcIntroPage>
selectStatus: false,
isLoading: false,
semanticsLabel: '评论',
text: Utils.numFormat(item.stat!.reply),
text: NumUtil.numFormat(item.stat!.reply),
),
ActionItem(
icon: const Icon(FontAwesomeIcons.shareFromSquare),
@@ -333,7 +333,7 @@ class _PgcIntroPageState extends State<PgcIntroPage>
selectStatus: false,
isLoading: false,
semanticsLabel: '转发',
text: Utils.numFormat(item.stat!.share),
text: NumUtil.numFormat(item.stat!.share),
),
],
),

View File

@@ -16,9 +16,11 @@ import 'package:PiliPlus/pages/video/introduction/ugc/widgets/action_item.dart';
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/page.dart';
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/season.dart';
import 'package:PiliPlus/utils/app_scheme.dart';
import 'package:PiliPlus/utils/date_util.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/feed_back.dart';
import 'package:PiliPlus/utils/id_utils.dart';
import 'package:PiliPlus/utils/num_util.dart';
import 'package:PiliPlus/utils/page_utils.dart';
import 'package:PiliPlus/utils/request_utils.dart';
import 'package:PiliPlus/utils/storage.dart';
@@ -345,7 +347,7 @@ class _VideoInfoState extends State<VideoInfo> {
const SizedBox(height: 0),
Obx(
() => Text(
'${Utils.numFormat(videoIntroController.userStat['follower'])}粉丝 ${videoIntroController.userStat['archive_count'] != null ? '${Utils.numFormat(videoIntroController.userStat['archive_count'])}视频' : ''}',
'${NumUtil.numFormat(videoIntroController.userStat['follower'])}粉丝 ${videoIntroController.userStat['archive_count'] != null ? '${NumUtil.numFormat(videoIntroController.userStat['archive_count'])}视频' : ''}',
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,
@@ -570,11 +572,11 @@ class _VideoInfoState extends State<VideoInfo> {
color: theme.colorScheme.outline,
),
Text(
Utils.dateFormat(
!widget.isLoading
? videoDetail.pubdate
: videoItem['pubdate'],
formatType: 'detail'),
DateUtil.format(
!widget.isLoading
? videoDetail.pubdate
: videoItem['pubdate'],
),
style: TextStyle(
fontSize: 12,
color: theme.colorScheme.outline,
@@ -853,7 +855,7 @@ class _VideoInfoState extends State<VideoInfo> {
isLoading: widget.isLoading,
semanticsLabel: '点赞',
text: !widget.isLoading
? Utils.numFormat(videoDetail.stat!.like!)
? NumUtil.numFormat(videoDetail.stat!.like!)
: '-',
needAnim: true,
hasTriple: videoIntroController.hasLike.value &&
@@ -892,7 +894,7 @@ class _VideoInfoState extends State<VideoInfo> {
isLoading: widget.isLoading,
semanticsLabel: '投币',
text: !widget.isLoading
? Utils.numFormat(videoDetail.stat!.coin!)
? NumUtil.numFormat(videoDetail.stat!.coin!)
: '-',
needAnim: true,
),
@@ -909,7 +911,7 @@ class _VideoInfoState extends State<VideoInfo> {
isLoading: widget.isLoading,
semanticsLabel: '收藏',
text: !widget.isLoading
? Utils.numFormat(videoDetail.stat!.favorite!)
? NumUtil.numFormat(videoDetail.stat!.favorite!)
: '-',
needAnim: true,
),
@@ -932,7 +934,7 @@ class _VideoInfoState extends State<VideoInfo> {
isLoading: widget.isLoading,
semanticsLabel: '分享',
text: !widget.isLoading
? Utils.numFormat(videoDetail.stat!.share!)
? NumUtil.numFormat(videoDetail.stat!.share!)
: '分享',
),
],