Explorar el Código

use global store

xiaohu hace 7 años
padre
commit
d32d460a67
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      src/utils/request.js

+ 2 - 3
src/utils/request.js

@@ -4,9 +4,8 @@ import { routerRedux } from 'dva/router';
 
 // TODO set store
 // import store from '../global';
-const store = {
-  dispatch: () => {},
-};
+// use global store
+const store = window.g_app._store
 
 const codeMessage = {
   200: '服务器成功返回请求的数据。',