config.js 419 B

1234567891011121314151617181920212223
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. Vue.use(Vuex)
  4. const store = new Vuex.Store({
  5. state: {
  6. isLogin: false,
  7. luyou: 1,
  8. nCount:0,
  9. userInfo: {},
  10. api: 'https://ld.api.cocorobo.cn/edu/',
  11. // api: 'http://localhost:7003/edu/',
  12. },
  13. mutations: {
  14. update(state, [key, value]) {
  15. state[key] = value;
  16. },
  17. }
  18. })
  19. export default store