From 126028b94910ad25ef54b2e275d967e66e9dad67 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Mon, 26 Jun 2023 10:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/home/home_page.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 4af0f03f..d5a996c4 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -100,12 +100,12 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ///活动海报弹窗 posterShowAlertDialog(ActivityPos activityPos,firstLoginCouponList) { - // var today = DateTime.now().day; - // SharedPreferences.getInstance().then((value) { - // if(value.getInt("today")==today && (value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};")) - // return; - // value.setString("ActivityPosCode", "${(value.getString("ActivityPosCode")??"")}${activityPos.code}_${value.getString("userId")};"); - // value.setInt("today", today); + var today = DateTime.now().day; + SharedPreferences.getInstance().then((value) { + if(value.getInt("today")==today && (value.getString("ActivityPosCode") ?? "").contains("${activityPos.code}_${value.getString("userId")};")) + return; + value.setString("ActivityPosCode", "${(value.getString("ActivityPosCode")??"")}${activityPos.code}_${value.getString("userId")};"); + value.setInt("today", today); //显示对话框 showDialog( context: context, @@ -113,7 +113,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { return ActivityPoster(activityPos,firstLoginCouponList); }, ); - // }); + }); } ///推荐渠道弹窗