diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index 4ee2a33d..092ca029 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -69,7 +69,8 @@ class _MineItem extends State { return; } Navigator.of(context) - .pushNamed('/router/releasePage'); + .pushNamed('/router/releasePage', + arguments: {}); }); }, child: mineItem( diff --git a/lib/mine/release_page.dart b/lib/mine/release_page.dart index dd0a21c1..f4191078 100644 --- a/lib/mine/release_page.dart +++ b/lib/mine/release_page.dart @@ -24,6 +24,7 @@ class _ReleasePage extends State { RefreshController refreshController = RefreshController(); ApiService apiService; int pageNum = 0; + String userId; List comments = []; @@ -42,6 +43,7 @@ class _ReleasePage extends State { queryCommunity() async { if (apiService == null) { SharedPreferences value = await SharedPreferences.getInstance(); + userId = value.getString('userId'); apiService = ApiService( Dio(), context: context, @@ -119,7 +121,7 @@ class _ReleasePage extends State { Navigator.of(context).pushNamed( '/router/community_details', arguments: { - "comment": comments[position], + "comment": comments[position],"userId":userId, }, ); },