@@ -50,6 +50,13 @@ export function loadJobs(page = 1) {
5050 sr71$ . query ( S . pagedJobs , commonFilter ( page , community ) )
5151}
5252
53+ export function loadVideos ( page = 1 ) {
54+ scrollIntoEle ( TYPE . APP_HEADER_ID )
55+ store . markState ( { videosLoading : true } )
56+ const { mainPath : community } = store . curRoute
57+ sr71$ . query ( S . pagedVideos , commonFilter ( page , community ) )
58+ }
59+
5360export function loadTags ( ) {
5461 scrollIntoEle ( TYPE . APP_HEADER_ID )
5562 store . markState ( { tagsLoading : true } )
@@ -69,6 +76,8 @@ const cancleLoading = () => {
6976 // communitiesLoading: false,
7077 postsLoading : false ,
7178 jobsLoading : false ,
79+ videosLoading : false ,
80+ reposLoading : false ,
7281 tagsLoading : false ,
7382 } )
7483}
@@ -88,6 +97,13 @@ const DataSolver = [
8897 store . markState ( { pagedJobs } )
8998 } ,
9099 } ,
100+ {
101+ match : asyncRes ( 'pagedVideos' ) ,
102+ action : ( { pagedVideos } ) => {
103+ cancleLoading ( )
104+ store . markState ( { pagedVideos } )
105+ } ,
106+ } ,
91107 {
92108 match : asyncRes ( 'partialTags' ) ,
93109 action : ( { partialTags } ) => {
@@ -102,9 +118,6 @@ const DataSolver = [
102118 debug ( 'SIDEBAR_MENU_CHANGE ' , res [ EVENT . SIDEBAR_MENU_CHANGE ] . data )
103119
104120 switch ( subPath ) {
105- case ROUTE . CATEGORIES : {
106- return console . log ( 'todo' )
107- }
108121 case ROUTE . TAGS : {
109122 return loadTags ( )
110123 }
@@ -121,7 +134,7 @@ const DataSolver = [
121134 return console . log ( 'todo' )
122135 }
123136 case ROUTE . VIDEOS : {
124- return console . log ( 'todo' )
137+ return loadVideos ( )
125138 }
126139 default : {
127140 return console . log ( 'todo' )
0 commit comments