import store from '@/store/index';
import wxAuth from './wxAuth';

export default {
  install() {
    if (!store.state.system) {
      store.registerModule(['system'], {
        namespaced: true,
      });
    }
    if (!store.state.system.wxAuth) {
      store.registerModule(['system', 'wxAuth'], wxAuth);
    }
  },
  uninstall() {
    store.unregisterModule(['system', 'wxAuth']);
  },
};
