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); }, ); - // }); + }); } ///推荐渠道弹窗