diff --git a/lib/ui/community/activity/activity_card.dart b/lib/ui/community/activity/activity_card.dart index 352ce8f3..c9cd443d 100644 --- a/lib/ui/community/activity/activity_card.dart +++ b/lib/ui/community/activity/activity_card.dart @@ -41,7 +41,7 @@ class ActivityCard extends StatelessWidget { firstPath == null ? SizedBox() : Hero( - tag: API.image(firstPath), + tag: firstPath, child: Material( color: Colors.grey, child: FadeInImage.assetNetwork( diff --git a/lib/ui/community/community_views/widgets/chat_card.dart b/lib/ui/community/community_views/widgets/chat_card.dart index fadd618d..1ed60867 100644 --- a/lib/ui/community/community_views/widgets/chat_card.dart +++ b/lib/ui/community/community_views/widgets/chat_card.dart @@ -1,5 +1,6 @@ import 'dart:math'; +import 'package:akuCommunity/model/common/img_model.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -65,9 +66,9 @@ class _ChatCardState extends State { borderRadius: BorderRadius.circular(8.w), ), onPressed: () { - Get.to( - BeeImagePreview.path(path: widget.model.imgUrls.first.url), - opaque: false, + BeeImagePreview.toPath( + path: ImgModel.first(widget.model.imgUrls), + tag: ImgModel.first(widget.model.imgUrls), ); }, child: ConstrainedBox( diff --git a/lib/ui/community/community_views/widgets/my_event_card.dart b/lib/ui/community/community_views/widgets/my_event_card.dart index 16dba44a..4b64f147 100644 --- a/lib/ui/community/community_views/widgets/my_event_card.dart +++ b/lib/ui/community/community_views/widgets/my_event_card.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/model/common/img_model.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; @@ -76,16 +77,13 @@ class MyEventCard extends StatelessWidget { ? SizedBox(height: 152.w) : GestureDetector( onTap: () { - Get.to( - BeeImagePreview.path( - path: model.imgUrl.first.url, - tag: API.image(model.imgUrl.first.url), - ), - opaque: false, + BeeImagePreview.toPath( + path: ImgModel.first(model.imgUrl), + tag: ImgModel.first(model.imgUrl), ); }, child: Hero( - tag: API.image(model.imgUrl.first.url), + tag: ImgModel.first(model.imgUrl), child: Container( clipBehavior: Clip.antiAlias, decoration: BoxDecoration( @@ -94,7 +92,7 @@ class MyEventCard extends StatelessWidget { ), child: FadeInImage.assetNetwork( placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: API.image(model.imgUrl.first.url), + image: API.image(ImgModel.first(model.imgUrl)), width: 152.w, height: 152.w, fit: BoxFit.cover, diff --git a/lib/ui/community/notice/notice_card.dart b/lib/ui/community/notice/notice_card.dart index d3756121..eeea3df3 100644 --- a/lib/ui/community/notice/notice_card.dart +++ b/lib/ui/community/notice/notice_card.dart @@ -1,3 +1,4 @@ +import 'package:akuCommunity/model/common/img_model.dart'; import 'package:flutter/material.dart'; import 'package:flustars/flustars.dart'; @@ -84,9 +85,9 @@ class NoticeCard extends StatelessWidget { ? SizedBox(height: 152.w) : GestureDetector( onTap: () { - Get.to( - BeeImagePreview.path(path: model.imgUrls.first.url), - opaque: false, + BeeImagePreview.toPath( + path: ImgModel.first(model.imgUrls), + tag: ImgModel.first(model.imgUrls), ); }, child: Container( @@ -95,12 +96,15 @@ class NoticeCard extends StatelessWidget { color: Colors.black12, borderRadius: BorderRadius.circular(8.w), ), - child: FadeInImage.assetNetwork( - placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, - image: API.image(model.imgUrls.first.url), - width: 152.w, - height: 152.w, - fit: BoxFit.cover, + child: Hero( + tag: ImgModel.first(model.imgUrls), + child: FadeInImage.assetNetwork( + placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, + image: ImgModel.first(model.imgUrls), + width: 152.w, + height: 152.w, + fit: BoxFit.cover, + ), ), ), ), diff --git a/lib/ui/community/notice/notice_detail_page.dart b/lib/ui/community/notice/notice_detail_page.dart index 7d849ef9..e119b551 100644 --- a/lib/ui/community/notice/notice_detail_page.dart +++ b/lib/ui/community/notice/notice_detail_page.dart @@ -92,15 +92,11 @@ class _NoticeDetailPageState extends State { .map( (e) => GestureDetector( onTap: () { - Get.to( - BeeImagePreview.path(path: e.url), - opaque: false, - ); + BeeImagePreview.toPath(path: e.url, tag: e.url); }, child: Hero( tag: e.url, child: Container( - height: 228.w, clipBehavior: Clip.antiAlias, decoration: BoxDecoration( borderRadius: BorderRadius.circular(8.w), diff --git a/lib/utils/login_util.dart b/lib/utils/login_util.dart index a97aeac4..56a80f4e 100644 --- a/lib/utils/login_util.dart +++ b/lib/utils/login_util.dart @@ -32,7 +32,8 @@ class LoginUtil { static bool get isNotLogin => !isLogin; static bool haveRoom(String name) { - if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修'))) return true; + if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费'))) + return true; final appProvider = Provider.of(Get.context, listen: false); if (appProvider.selectedHouse == null) { BotToast.showText(text: '请先添加房屋'); diff --git a/lib/widget/views/bee_grid_image_view.dart b/lib/widget/views/bee_grid_image_view.dart index ed9594ef..a0b3fa61 100644 --- a/lib/widget/views/bee_grid_image_view.dart +++ b/lib/widget/views/bee_grid_image_view.dart @@ -29,10 +29,7 @@ class BeeGridImageView extends StatelessWidget { itemBuilder: (context, index) { return GestureDetector( onTap: () { - Get.to( - BeeImagePreview.path(path: urls[index]), - opaque: false, - ); + BeeImagePreview.toPath(path: urls[index], tag: urls[index]); }, child: Hero( tag: urls[index],