event.js 501 Bytes
Newer Older
1
import { store } from '@wisdom-utils/utils';
邓晓峰's avatar
邓晓峰 committed
2
import { appService } from '../api';
邓晓峰's avatar
邓晓峰 committed
3 4 5
store.on('event:route', url => {
  // eslint-disable-next-line no-restricted-globals
  history.pushState(null, `/civbase/${url}`, `/civbase/${url}`);
邓晓峰's avatar
邓晓峰 committed
6
});
邓晓峰's avatar
邓晓峰 committed
7 8 9
window.share &&
  window.share.event &&
  window.share.event.on('event:logs', params => {
邓晓峰's avatar
邓晓峰 committed
10
    delete params.site;
11
    appService.pvLogs(Object.assign({ ignoreSite: true }, params));
邓晓峰's avatar
邓晓峰 committed
12
  });
13 14 15 16 17

// store.on('event:logout', () => {
//     window.globalConfig = {};
// })