config.js 418 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. userInfo: {},
  9. nCount:0,
  10. api: 'https://pbl.cocorobo.cn/api/pbl/',
  11. // api: 'http://localhost:7003/pbl/',
  12. },
  13. mutations: {
  14. update(state, [key, value]) {
  15. state[key] = value;
  16. },
  17. }
  18. })
  19. export default store