mod: app端推荐参数补充,统一部分代码位置

This commit is contained in:
orz12
2024-07-11 17:17:22 +08:00
parent 376dae8570
commit 212a87b84c
11 changed files with 290 additions and 306 deletions

View File

@@ -18,6 +18,13 @@ class Constants {
static const String thirdApi =
'https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png';
static const String traceId =
'11111111111111111111111111111111:1111111111111111:0:0';
static const String userAgent =
'Mozilla/5.0 BiliDroid/1.46.2 (bbcallen@gmail.com) os/android model/vivo mobi_app/android_hd build/1462100 channel/yingyongbao innerVer/1462100 osVer/14 network/2';
static const String statistics = '%7B%22appId%22%3A5%2C%22platform%22%3A3%2C%22version%22%3A%221.46.2%22%2C%22abtest%22%3A%22%22%7D';
//Uri.encodeComponent('{"appId": 5,"platform": 3,"version": "1.46.2","abtest": ""}');
//内容来自 https://passport.bilibili.com/web/generic/country/list
static const List<Map<String, dynamic>> internationalDialingPrefix = [
{"id": 1, "cname": "中国大陆", "country_id": "86"},

View File

@@ -187,8 +187,8 @@ class VideoCardV extends StatelessWidget {
),
if (videoItem.goto == 'av')
Positioned(
right: 0,
bottom: 0,
right: -5,
bottom: -2,
child: VideoPopupMenu(
size: 29,
iconSize: 17,
@@ -239,10 +239,9 @@ class VideoContent extends StatelessWidget {
fs: 9,
)
],
if (videoItem.rcmdReason != null &&
videoItem.rcmdReason.content != '') ...[
if (videoItem.rcmdReason != null) ...[
PBadge(
text: videoItem.rcmdReason.content,
text: videoItem.rcmdReason,
stack: 'normal',
size: 'small',
type: 'color',
@@ -280,7 +279,7 @@ class VideoContent extends StatelessWidget {
),
),
),
if (videoItem.goto == 'av') const SizedBox(width: 24)
if (videoItem.goto == 'av') const SizedBox(width: 10)
],
),
],
@@ -307,7 +306,7 @@ class VideoStat extends StatelessWidget {
view: videoItem.stat.view,
goto: videoItem.goto,
),
const SizedBox(width: 8),
const SizedBox(width: 6),
if (videoItem.goto != 'picture')
StatDanMu(
theme: 'gray',
@@ -315,16 +314,23 @@ class VideoStat extends StatelessWidget {
),
if (videoItem is RecVideoItemModel) ...<Widget>[
const Spacer(),
RichText(
maxLines: 1,
text: TextSpan(
style: TextStyle(
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize,
color: Theme.of(context).colorScheme.outline.withOpacity(0.8),
),
text: Utils.formatTimestampToRelativeTime(videoItem.pubdate)),
),
const SizedBox(width: 4),
Expanded(
flex: 0,
child: RichText(
maxLines: 1,
text: TextSpan(
style: TextStyle(
fontSize:
Theme.of(context).textTheme.labelSmall!.fontSize,
color: Theme.of(context)
.colorScheme
.outline
.withOpacity(0.8),
),
text:
Utils.formatTimestampToRelativeTime(videoItem.pubdate)),
)),
const SizedBox(width: 2),
]
],
);