diff --git a/lib/pages/audio/controller.dart b/lib/pages/audio/controller.dart index 259b14fc..f4e5828c 100644 --- a/lib/pages/audio/controller.dart +++ b/lib/pages/audio/controller.dart @@ -385,7 +385,7 @@ class AudioController extends GetxController if (GlobalData().coins != null && GlobalData().coins! < 1) { SmartDialog.showToast('硬币不足'); - return; + // return; } PayCoinsPage.toPayCoinsPage( diff --git a/lib/pages/video/introduction/pgc/controller.dart b/lib/pages/video/introduction/pgc/controller.dart index f7535732..eab191f8 100644 --- a/lib/pages/video/introduction/pgc/controller.dart +++ b/lib/pages/video/introduction/pgc/controller.dart @@ -131,7 +131,7 @@ class PgcIntroController extends CommonIntroController { if (GlobalData().coins != null && GlobalData().coins! < 1) { SmartDialog.showToast('硬币不足'); - return; + // return; } PayCoinsPage.toPayCoinsPage( diff --git a/lib/pages/video/introduction/ugc/controller.dart b/lib/pages/video/introduction/ugc/controller.dart index 95e9b614..e6b966ea 100644 --- a/lib/pages/video/introduction/ugc/controller.dart +++ b/lib/pages/video/introduction/ugc/controller.dart @@ -287,7 +287,7 @@ class UgcIntroController extends CommonIntroController with ReloadMixin { if (GlobalData().coins != null && GlobalData().coins! < 1) { SmartDialog.showToast('硬币不足'); - return; + // return; } PayCoinsPage.toPayCoinsPage( diff --git a/lib/pages/video/pay_coins/view.dart b/lib/pages/video/pay_coins/view.dart index 98ddfb18..914818fd 100644 --- a/lib/pages/video/pay_coins/view.dart +++ b/lib/pages/video/pay_coins/view.dart @@ -1,5 +1,6 @@ import 'dart:async'; import 'dart:math' as math; +import 'dart:math' show max; import 'package:PiliPlus/utils/extension.dart'; import 'package:PiliPlus/utils/global_data.dart'; @@ -444,7 +445,7 @@ class _PayCoinsPageState extends State const SizedBox(height: 10), Center( child: Text( - '${_coins != null ? '硬币余额:${_coins.toDouble().toPrecision(1)}' : ''}${widget.hasCoin ? '${_coins != null ? ',' : ''}已投1枚硬币' : ''}', + '${_coins != null ? '硬币余额:${max(0.0, _coins.toDouble().toPrecision(1))}' : ''}${widget.hasCoin ? '${_coins != null ? ',' : ''}已投1枚硬币' : ''}', style: const TextStyle(color: Colors.white, fontSize: 13), ), ),