
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    loadding: false,
    pageSize: 10,
  }
})
export const modules = {
  app: () => require('./app/app').default,
  index: () => require('./index/index').default,
  fiveA: () => require('./fiveA/fiveA').default,
  userCenter: () => require('./userCenter/userCenter').default,
  majorProjects: () => require('./majorProjects/majorProjects').default,
  placeOrderForCoffee: () => require('./placeOrderForCoffee/index').default,
  case: () => require('./case/case').default,
  goodsOrder: () => require('./goods/order').default,
  login: () => require('./login/login').default,
  myCustomer: () => require('./myCustomer/index').default,
  myCard: () => require('./myCard/index').default,
  card: () => require('./card/index').default,
  forbid: () => require('./forbid/index').default,
  share: () => require('./share/index').default,
  bodyCheck: () => require('./bodyCheck/index').default,
  vip: () => require('./vip/index').default,
  remark: () => require('./remark/index').default,
  rush: () => require('./rush/index').default,
  making: () => require('./making/index').default,
  customization: () => require('./customization/index').default,
  library: () => require('./library/index').default,
  book: () => require('./book/index').default,
}

Object.keys(modules).forEach((modKey) => {
  const modNS = modKey.split('/')
  const getMod = modules[modKey]
  store.registerModule(...modNS, getMod())
})

export default store
