mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-02 00:58:19 +08:00
Compare commits
2 Commits
de6e402d97
...
db30aa8041
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db30aa8041 | ||
|
|
6f95456d20 |
@@ -433,7 +433,9 @@ class _EpisodePanelState extends State<EpisodePanel>
|
|||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (episode.badge == "会员" && vipStatus != 1) {
|
if (episode.badge == "会员" &&
|
||||||
|
Accounts.mainEqVideo &&
|
||||||
|
vipStatus != 1) {
|
||||||
SmartDialog.showToast('需要大会员');
|
SmartDialog.showToast('需要大会员');
|
||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -221,10 +221,10 @@ class _MemberPageState extends State<MemberPage> {
|
|||||||
isFollow: isFollow,
|
isFollow: isFollow,
|
||||||
);
|
);
|
||||||
if (res.isSuccess) {
|
if (res.isSuccess) {
|
||||||
if (!context.mounted) return;
|
|
||||||
e
|
e
|
||||||
..total += isFollow ? -1 : 1
|
..total += isFollow ? -1 : 1
|
||||||
..isFollow = !isFollow;
|
..isFollow = !isFollow;
|
||||||
|
if (!context.mounted) return;
|
||||||
(context as Element).markNeedsBuild();
|
(context as Element).markNeedsBuild();
|
||||||
} else {
|
} else {
|
||||||
res.toast();
|
res.toast();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import 'package:PiliPlus/pages/video/controller.dart';
|
|||||||
import 'package:PiliPlus/pages/video/introduction/ugc/controller.dart';
|
import 'package:PiliPlus/pages/video/introduction/ugc/controller.dart';
|
||||||
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/page.dart';
|
import 'package:PiliPlus/pages/video/introduction/ugc/widgets/page.dart';
|
||||||
import 'package:PiliPlus/services/download/download_service.dart';
|
import 'package:PiliPlus/services/download/download_service.dart';
|
||||||
|
import 'package:PiliPlus/utils/accounts.dart';
|
||||||
import 'package:PiliPlus/utils/date_utils.dart';
|
import 'package:PiliPlus/utils/date_utils.dart';
|
||||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||||
@@ -254,7 +255,7 @@ class _DownloadPanelState extends State<DownloadPanel> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kReleaseMode && episode.badge == '会员') {
|
if (kReleaseMode && episode.badge == '会员' && Accounts.mainEqVideo) {
|
||||||
if (vipStatus != 1) {
|
if (vipStatus != 1) {
|
||||||
if (!isDownloadAll) {
|
if (!isDownloadAll) {
|
||||||
SmartDialog.showToast('需要大会员');
|
SmartDialog.showToast('需要大会员');
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:PiliPlus/models_new/pgc/pgc_info_model/new_ep.dart';
|
|||||||
import 'package:PiliPlus/models_new/video/video_detail/episode.dart'
|
import 'package:PiliPlus/models_new/video/video_detail/episode.dart'
|
||||||
hide EpisodeItem;
|
hide EpisodeItem;
|
||||||
import 'package:PiliPlus/pages/video/controller.dart';
|
import 'package:PiliPlus/pages/video/controller.dart';
|
||||||
|
import 'package:PiliPlus/utils/accounts.dart';
|
||||||
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
import 'package:PiliPlus/utils/extension/num_ext.dart';
|
||||||
import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
import 'package:PiliPlus/utils/extension/theme_ext.dart';
|
||||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||||
@@ -166,7 +167,7 @@ class _PgcPanelState extends State<PgcPanel> {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (item.badge == '会员' && vipStatus) {
|
if (item.badge == '会员' && Accounts.mainEqVideo && vipStatus) {
|
||||||
SmartDialog.showToast('需要大会员');
|
SmartDialog.showToast('需要大会员');
|
||||||
}
|
}
|
||||||
widget.onChangeEpisode(item);
|
widget.onChangeEpisode(item);
|
||||||
|
|||||||
@@ -1282,7 +1282,8 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
!isFullScreen &&
|
!isFullScreen &&
|
||||||
!videoDetailController.plPlayerController.isDesktopPip &&
|
!videoDetailController.plPlayerController.isDesktopPip &&
|
||||||
(videoDetailController.horizontalScreen || isPortrait),
|
(videoDetailController.horizontalScreen || isPortrait),
|
||||||
onPopInvokedWithResult: _onPopInvokedWithResult,
|
onPopInvokedWithResult:
|
||||||
|
videoDetailController.plPlayerController.onPopInvokedWithResult,
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() =>
|
() =>
|
||||||
!videoDetailController.videoState.value ||
|
!videoDetailController.videoState.value ||
|
||||||
@@ -2117,13 +2118,6 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onPopInvokedWithResult(bool didPop, result) {
|
|
||||||
videoDetailController.plPlayerController.onPopInvokedWithResult(
|
|
||||||
didPop,
|
|
||||||
result,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void onShowMemberPage(int? mid) {
|
void onShowMemberPage(int? mid) {
|
||||||
videoDetailController.childKey.currentState?.showBottomSheet(
|
videoDetailController.childKey.currentState?.showBottomSheet(
|
||||||
shape: const RoundedRectangleBorder(),
|
shape: const RoundedRectangleBorder(),
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ abstract final class Accounts {
|
|||||||
AccountType.values.length,
|
AccountType.values.length,
|
||||||
AnonymousAccount(),
|
AnonymousAccount(),
|
||||||
);
|
);
|
||||||
|
static bool get mainEqVideo => main == video;
|
||||||
static Account get main => accountMode[AccountType.main.index];
|
static Account get main => accountMode[AccountType.main.index];
|
||||||
|
static Account get video => accountMode[AccountType.video.index];
|
||||||
static Account get heartbeat => accountMode[AccountType.heartbeat.index];
|
static Account get heartbeat => accountMode[AccountType.heartbeat.index];
|
||||||
static Account get history {
|
static Account get history {
|
||||||
final heartbeat = Accounts.heartbeat;
|
final heartbeat = Accounts.heartbeat;
|
||||||
|
|||||||
Reference in New Issue
Block a user