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(