From 7762d5ce35f4ce9519a94c5d454f962e1eef09b5 Mon Sep 17 00:00:00 2001 From: wylyl22 <2373073266@qq.com> Date: Fri, 16 Sep 2022 15:21:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=93=E9=AA=8C=E5=8D=A1=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/user/user_page.dart | 4 ++-- lib/ui/widget/appdialog.dart | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ui/user/user_page.dart b/lib/ui/user/user_page.dart index c01a0e4..245ab50 100644 --- a/lib/ui/user/user_page.dart +++ b/lib/ui/user/user_page.dart @@ -124,12 +124,12 @@ class _UserPageState extends State { if (UserTool.userProvider.isLogin) { // var res=await apiClient.request(API.app.trialVip); - if (UserTool.userProvider.userInfo.isTrial == 0) { + if (UserTool.userProvider.userInfo.isTrial != 1) { showDialog( context: context, builder: (context) { return const AppDialog(); - }); + }).then((value) => _easyRefreshController.callRefresh()); } // print(UserTool.userProvider.userInfo.end * 1000); // print(DateTime.now().millisecondsSinceEpoch); diff --git a/lib/ui/widget/appdialog.dart b/lib/ui/widget/appdialog.dart index db86f19..e289f87 100644 --- a/lib/ui/widget/appdialog.dart +++ b/lib/ui/widget/appdialog.dart @@ -70,7 +70,9 @@ class AppDialog extends Dialog { } _getBotton(String bContent, context) { - return GestureDetector( + return + + GestureDetector( onTap: () async { var res = await apiClient.request(API.app.trialVip); if (res.code == 0) { @@ -78,9 +80,9 @@ _getBotton(String bContent, context) { UserTool.userProvider.updateUserInfo(); Navigator.pop(context); - // .refreshController.callRefresh(); } else { CloudToast.show(res.msg); + Navigator.pop(context); } }, child: Container(