Browse Source

update community

glglove 3 months ago
parent
commit
65a8087ca7

+ 16 - 0
packages/cpt_community/lib/router/component/community_component_service.dart

@@ -1,6 +1,7 @@
 /*
  * Community 组件的组件路由
  */
+import 'package:cpt_community/router/page/community_page_router.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:router/componentRouter/community_service.dart';
 import 'package:flutter/material.dart';
@@ -8,6 +9,9 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
 import 'package:riverpod_annotation/riverpod_annotation.dart';
 
 import '../../modules/community/community_page.dart';
+import '../../modules/my_following/my_follow/my_follow_page.dart';
+import '../../modules/my_following/my_follower/my_follower_page.dart';
+import '../../modules/my_posts/my_posts_page.dart';
 
 part 'community_component_service.g.dart';
 
@@ -22,4 +26,16 @@ class CommunityComponentService extends CommunityService {
     CommunityPage.startInstance();
   }
 
+  void startMyPostsPage() {
+    MyPostsPage.startInstance();
+  }
+
+  void startMyFollowPage() {
+    MyFollowPage.startInstance();
+  }
+
+  void startMyFollowerPage() {
+    MyFollowerPage.startInstance();
+  }
+
 }

+ 6 - 3
packages/cpt_main/lib/modules/me/me_view_model.dart

@@ -21,7 +21,8 @@ class MeViewModel extends _$MeViewModel {
 
   //去我的发布页面
   void gotoMyPostPage() {
-    ToastEngine.show("去我的发布页面");
+    // ToastEngine.show("去我的发布页面");
+    ComponentServiceManager().communityService.startMyPostsPage();
   }
 
   //去设置页面
@@ -31,12 +32,14 @@ class MeViewModel extends _$MeViewModel {
 
   //我的关注Tab
   void gotoFollowingPage() {
-    ToastEngine.show("我的关注Tab");
+    // ToastEngine.show("我的关注Tab");
+    ComponentServiceManager().communityService.startMyFollowPage();
   }
 
   //我的粉丝Tab
   void gotoFollowerPage() {
-    ToastEngine.show("我的粉丝Tab");
+    // ToastEngine.show("我的粉丝Tab");
+    ComponentServiceManager().communityService.startMyFollowerPage();
   }
 
   //编辑附加信息

+ 6 - 0
packages/cs_router/lib/componentRouter/community_service.dart

@@ -5,4 +5,10 @@ abstract class CommunityService {
 
   void startCommunityPage();
 
+  void startMyPostsPage();
+
+  void startMyFollowPage();
+
+  void startMyFollowerPage();
+
 }