mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: coin/like item jump
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -32,7 +32,7 @@ class VideoCardV extends StatelessWidget {
|
||||
}
|
||||
|
||||
void onPushDetail(heroTag) async {
|
||||
String goto = videoItem.goto!;
|
||||
String? goto = videoItem.goto;
|
||||
switch (goto) {
|
||||
case 'bangumi':
|
||||
PageUtils.viewBangumi(epId: videoItem.param!);
|
||||
|
||||
@@ -20,7 +20,7 @@ class VideoCardVMemberHome extends StatelessWidget {
|
||||
});
|
||||
|
||||
void onPushDetail(heroTag) async {
|
||||
String goto = videoItem.goto ?? '';
|
||||
String? goto = videoItem.goto;
|
||||
switch (goto) {
|
||||
case 'bangumi':
|
||||
PageUtils.viewBangumi(epId: videoItem.param);
|
||||
|
||||
@@ -4,6 +4,7 @@ class MemberCoinsDataModel extends HotVideoItemModel {
|
||||
String? subtitle;
|
||||
int? coins;
|
||||
int? time;
|
||||
String? resourceType;
|
||||
// int? get view => stat.view;
|
||||
// int? get danmaku => stat.danmu;
|
||||
|
||||
@@ -12,6 +13,8 @@ class MemberCoinsDataModel extends HotVideoItemModel {
|
||||
coins = json['coins'];
|
||||
subtitle = json['subtitle'];
|
||||
time = json['time'];
|
||||
resourceType = json['resource_type'];
|
||||
redirectUrl = json['redirect_url'];
|
||||
// view = json['stat']['view'];
|
||||
// danmaku = json['stat']['danmaku'];
|
||||
}
|
||||
|
||||
@@ -291,10 +291,11 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
return switch (loadingState) {
|
||||
Success() || Loading() => SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
top: StyleString.cardSpace,
|
||||
left: StyleString.cardSpace,
|
||||
right: StyleString.cardSpace,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 80),
|
||||
top: StyleString.safeSpace,
|
||||
left: StyleString.safeSpace,
|
||||
right: StyleString.safeSpace,
|
||||
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||
),
|
||||
sliver: SliverGrid(
|
||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||
mainAxisSpacing: StyleString.cardSpace,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:PiliPlus/common/widgets/image_save.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:PiliPlus/common/constants.dart';
|
||||
@@ -24,6 +25,14 @@ class MemberCoinsItem extends StatelessWidget {
|
||||
margin: EdgeInsets.zero,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
if (coinItem.resourceType != 'ugc') {
|
||||
if (coinItem.redirectUrl?.isNotEmpty == true) {
|
||||
if (await PiliScheme.routePushFromUrl(coinItem.redirectUrl!,
|
||||
selfHandle: true)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
int cid =
|
||||
await SearchHttp.ab2c(aid: coinItem.aid, bvid: coinItem.bvid);
|
||||
PageUtils.toVideoPage(
|
||||
|
||||
@@ -31,11 +31,8 @@ class _RcmdPageState extends CommonPageState<RcmdPage, RcmdController>
|
||||
super.build(context);
|
||||
return Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
margin: const EdgeInsets.only(
|
||||
left: StyleString.safeSpace, right: StyleString.safeSpace),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: StyleString.mdRadius,
|
||||
),
|
||||
margin: const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
|
||||
decoration: const BoxDecoration(borderRadius: StyleString.mdRadius),
|
||||
child: refreshIndicator(
|
||||
onRefresh: () async {
|
||||
await controller.onRefresh();
|
||||
|
||||
Reference in New Issue
Block a user