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