config.js 534 B

1234567891011121314151617181920212223242526
  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. report: "",
  11. api: 'https://pblyt.cocorobo.cn/api/pbl/',
  12. socket: "https://poll.cocorobo.cn",
  13. // socket: "http://localhost:1473",
  14. // api: 'http://localhost:7222/api/pbl/',
  15. },
  16. mutations: {
  17. update(state, [key, value]) {
  18. state[key] = value;
  19. },
  20. }
  21. })
  22. export default store