@@ -2,6 +2,8 @@ import R from 'ramda'
22import { message } from 'antd'
33/* import Router from 'next/router' */
44
5+ import { PAGE_SIZE } from '@config'
6+
57import {
68 asyncRes ,
79 asyncErr ,
@@ -14,15 +16,14 @@ import {
1416 ROUTE ,
1517 scrollIntoEle ,
1618 closePreviewer ,
17- dispatchEvent ,
19+ send ,
1820} from '@utils'
1921
20- import { PAGE_SIZE } from '@config'
2122import SR71 from 'utils/network/sr71'
2223import S from './schema'
2324
2425const sr71$ = new SR71 ( {
25- resv_event : [
26+ recieve : [
2627 EVENT . LOGOUT ,
2728 EVENT . LOGIN ,
2829 EVENT . PREVIEW_CLOSE ,
@@ -134,13 +135,13 @@ export function onEdit(record) {
134135}
135136
136137export const onEditCategory = record =>
137- dispatchEvent ( EVENT . NAV_UPDATE_CATEGORY , {
138+ send ( EVENT . NAV_UPDATE_CATEGORY , {
138139 type : TYPE . PREVIEW_UPDATE_CATEGORY ,
139140 data : record ,
140141 } )
141142
142143export const onEditTag = record =>
143- dispatchEvent ( EVENT . NAV_UPDATE_TAG , {
144+ send ( EVENT . NAV_UPDATE_TAG , {
144145 type : TYPE . PREVIEW_UPDATE_TAG ,
145146 data : record ,
146147 } )
@@ -161,7 +162,7 @@ export function onDeleteCagegory(record) {
161162}
162163
163164export const setCommunity = ( thread , source ) =>
164- dispatchEvent ( EVENT . NAV_SET_COMMUNITY , {
165+ send ( EVENT . NAV_SET_COMMUNITY , {
165166 type : TYPE . PREVIEW_SET_COMMUNITY ,
166167 data : {
167168 source,
@@ -188,7 +189,7 @@ export const unsetThread = (communityId, thread) =>
188189 } )
189190
190191export const setThread = source =>
191- dispatchEvent ( EVENT . NAV_SET_THREAD , {
192+ send ( EVENT . NAV_SET_THREAD , {
192193 type : TYPE . PREVIEW_SET_THREAD ,
193194 data : source ,
194195 } )
@@ -200,13 +201,13 @@ export const unsetCategory = (communityId, category) =>
200201 } )
201202
202203export const setCategory = source =>
203- dispatchEvent ( EVENT . NAV_SET_CATEGORY , {
204+ send ( EVENT . NAV_SET_CATEGORY , {
204205 type : TYPE . PREVIEW_SET_CATEGORY ,
205206 data : source ,
206207 } )
207208
208209export const setTag = ( thread , source ) =>
209- dispatchEvent ( EVENT . NAV_SET_TAG , {
210+ send ( EVENT . NAV_SET_TAG , {
210211 type : TYPE . PREVIEW_SET_TAG ,
211212 data : {
212213 thread,
0 commit comments